diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-11-18 14:30:20 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-11-18 14:30:20 +0100 |
commit | 273a0c4983ecff9fe53258755b155227afe2938f (patch) | |
tree | 9dd8769cf25b1e29331af8d0830a5549c323e7b6 /support/namespace.h | |
parent | 8adfb0eeffd1888f9b53b8d8677eb1656cd20e47 (diff) | |
download | glibc-273a0c4983ecff9fe53258755b155227afe2938f.tar glibc-273a0c4983ecff9fe53258755b155227afe2938f.tar.gz glibc-273a0c4983ecff9fe53258755b155227afe2938f.tar.bz2 glibc-273a0c4983ecff9fe53258755b155227afe2938f.zip |
support_enter_mount_namespace: Unshare with mount --make-rprivate
System defaults vary, and a mere unshare (CLONE_NEWNS) (which is part of
support_become_root) is no longer sufficient.
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'support/namespace.h')
-rw-r--r-- | support/namespace.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/support/namespace.h b/support/namespace.h index 9eddb1a0e9..b5e2d1474a 100644 --- a/support/namespace.h +++ b/support/namespace.h @@ -51,6 +51,11 @@ bool support_can_chroot (void); has sufficient privileges. */ bool support_enter_network_namespace (void); +/* Enter a mount namespace and mark / as private (not shared). If + this function returns true, mount operations in this process will + not affect the host system afterwards. */ +bool support_enter_mount_namespace (void); + /* Return true if support_enter_network_namespace managed to enter a UTS namespace. */ bool support_in_uts_namespace (void); |