bind mount recursively
This commit is contained in:
parent
7a2cf18c19
commit
a7c6ef6c57
4
qssb.h
4
qssb.h
@ -333,12 +333,12 @@ int qssb_enable_policy(struct qssb_policy *policy)
|
|||||||
|
|
||||||
if(policy->readonly_paths != NULL || policy->writable_paths != NULL)
|
if(policy->readonly_paths != NULL || policy->writable_paths != NULL)
|
||||||
{
|
{
|
||||||
if(mount_to_chroot(policy->chroot_target_path, policy->readonly_paths, MS_BIND | MS_RDONLY) < 0)
|
if(mount_to_chroot(policy->chroot_target_path, policy->readonly_paths, MS_BIND | MS_RDONLY | MS_REC) < 0)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mount_to_chroot(policy->chroot_target_path, policy->writable_paths, MS_BIND) < 0)
|
if(mount_to_chroot(policy->chroot_target_path, policy->writable_paths, MS_BIND | MS_REC) < 0)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user