kernel: respect the app profile's umount modules field for kernel umounting

This commit is contained in:
weishu
2023-06-04 00:03:49 +08:00
parent 1491465b55
commit 5980c113fe

View File

@@ -417,7 +417,12 @@ static bool should_umount(struct path *path)
if (path->mnt && path->mnt->mnt_sb && path->mnt->mnt_sb->s_type) { if (path->mnt && path->mnt->mnt_sb && path->mnt->mnt_sb->s_type) {
const char *fstype = path->mnt->mnt_sb->s_type->name; const char *fstype = path->mnt->mnt_sb->s_type->name;
return strcmp(fstype, "overlay") == 0; if (strcmp(fstype, "overlay") == 0) {
return ksu_is_uid_should_umount(current_uid().val);
}
#ifdef CONFIG_KSU_DEBUG
pr_info("uid: %d should not umount!\n")
#endif
} }
return false; return false;
} }