diff options
Diffstat (limited to 'src/libutil/namespaces.hh')
-rw-r--r-- | src/libutil/namespaces.hh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libutil/namespaces.hh b/src/libutil/namespaces.hh index 0b7eeb66c..3a920e665 100644 --- a/src/libutil/namespaces.hh +++ b/src/libutil/namespaces.hh @@ -3,6 +3,26 @@ namespace nix { +/** + * Save the current mount namespace. Ignored if called more than + * once. + */ +void saveMountNamespace(); + +/** + * Restore the mount namespace saved by saveMountNamespace(). Ignored + * if saveMountNamespace() was never called. + */ +void restoreMountNamespace(); + +/** + * Cause this thread to not share any FS attributes with the main + * thread, because this causes setns() in restoreMountNamespace() to + * fail. + */ +void unshareFilesystem(); + + #if __linux__ bool userNamespacesSupported(); |