Commit 89330b89 authored by topjohnwu's avatar topjohnwu

Clone attributes to new tmpfs mountpoint

parent a8f3718e
......@@ -277,8 +277,16 @@ static void clone_skeleton(struct node_entry *node) {
closedir(dir);
if (node->status & IS_SKEL) {
struct stat s;
char *con;
xstat(full_path, &s);
getfilecon(full_path, &con);
LOGI("tmpfs: %s\n", full_path);
mount("tmpfs", full_path, "tmpfs", 0, NULL);
chmod(full_path, s.st_mode & 0777);
chown(full_path, s.st_uid, s.st_gid);
setfilecon(full_path, con);
free(con);
}
vec_for_each(node->children, child) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment