mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 18:07:39 +00:00
Clone attributes to new tmpfs mountpoint
This commit is contained in:
parent
a8f3718ed0
commit
89330b89d8
@ -277,8 +277,16 @@ static void clone_skeleton(struct node_entry *node) {
|
|||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
|
||||||
if (node->status & IS_SKEL) {
|
if (node->status & IS_SKEL) {
|
||||||
|
struct stat s;
|
||||||
|
char *con;
|
||||||
|
xstat(full_path, &s);
|
||||||
|
getfilecon(full_path, &con);
|
||||||
LOGI("tmpfs: %s\n", full_path);
|
LOGI("tmpfs: %s\n", full_path);
|
||||||
mount("tmpfs", full_path, "tmpfs", 0, NULL);
|
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) {
|
vec_for_each(node->children, child) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user