CernVM-FS
2.12.0
|
Go to the source code of this file.
Enumerations | |
enum | NamespaceFailures { kFailNsOk = 0, kFailNsUnsuppored, kFailNsUnshare, kFailNsMapUidOpen, kFailNsMapUidWrite, kFailNsSetgroupsOpen, kFailNsSetgroupsWrite, kFailNsMapGidOpen, kFailNsMapGidWrite } |
Functions | |
CVMFS_EXPORT int | CheckNamespaceFeatures () |
CVMFS_EXPORT NamespaceFailures | CreateUserNamespace (uid_t map_uid_to, gid_t map_gid_to) |
CVMFS_EXPORT bool | CreateMountNamespace () |
CVMFS_EXPORT bool | CreatePidNamespace (int *fd_parent) |
CVMFS_EXPORT bool | BindMount (const std::string &from, const std::string &to) |
CVMFS_EXPORT bool | ProcMount (const std::string &to) |
Variables | |
const int | kNsFeatureMount = 0x01 |
const int | kNsFeaturePid = 0x02 |
const int | kNsFeatureUserAvailable = 0x04 |
const int | kNsFeatureUserEnabled = 0x08 |
enum NamespaceFailures |
Enumerator | |
---|---|
kFailNsOk | |
kFailNsUnsuppored | |
kFailNsUnshare | |
kFailNsMapUidOpen | |
kFailNsMapUidWrite | |
kFailNsSetgroupsOpen | |
kFailNsSetgroupsWrite | |
kFailNsMapGidOpen | |
kFailNsMapGidWrite |
Definition at line 22 of file namespace.h.
CVMFS_EXPORT bool BindMount | ( | const std::string & | from, |
const std::string & | to | ||
) |
Definition at line 100 of file namespace.cc.
Referenced by publish::CmdEnter::CreateUnderlay(), and publish::CmdEnter::MountCvmfs().
CVMFS_EXPORT int CheckNamespaceFeatures | ( | ) |
CVMFS_EXPORT bool CreateMountNamespace | ( | ) |
Definition at line 120 of file namespace.cc.
Referenced by anonymous_namespace{cmd_enter.cc}::EnterRootContainer().
CVMFS_EXPORT bool CreatePidNamespace | ( | int * | fd_parent | ) |
The fd_parent file descriptor, if passed, is the read end of a pipe whose write end is connected to the parent process. This gives the namespace's init process a means to know its pid in the context of the parent namespace.
Definition at line 155 of file namespace.cc.
Referenced by anonymous_namespace{cmd_enter.cc}::EnterRootContainer().
CVMFS_EXPORT NamespaceFailures CreateUserNamespace | ( | uid_t | map_uid_to, |
gid_t | map_gid_to | ||
) |
Definition at line 60 of file namespace.cc.
Referenced by anonymous_namespace{cmd_enter.cc}::EnterRootContainer(), and publish::CmdEnter::Main().
CVMFS_EXPORT bool ProcMount | ( | const std::string & | to | ) |
Definition at line 110 of file namespace.cc.
Referenced by publish::CmdEnter::Main().
const int kNsFeatureMount = 0x01 |
This file is part of the CernVM File System.
Wrappers around the unshare() call. Implementation on Linux only, on macOS implementation is empty and returns with error codes.
Definition at line 17 of file namespace.h.
Referenced by CheckNamespaceFeatures().
const int kNsFeaturePid = 0x02 |
Definition at line 18 of file namespace.h.
Referenced by CheckNamespaceFeatures().
const int kNsFeatureUserAvailable = 0x04 |
Definition at line 19 of file namespace.h.
Referenced by CheckNamespaceFeatures().
const int kNsFeatureUserEnabled = 0x08 |
Definition at line 20 of file namespace.h.
Referenced by CheckNamespaceFeatures().