CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
namespace.h
Go to the documentation of this file.
1 
8 #ifndef CVMFS_UTIL_NAMESPACE_H_
9 #define CVMFS_UTIL_NAMESPACE_H_
10 
11 #include <unistd.h>
12 
13 #include <string>
14 
15 const int kNsFeatureMount = 0x01;
16 const int kNsFeaturePid = 0x02;
17 const int kNsFeatureUserAvailable = 0x04;
18 const int kNsFeatureUserEnabled = 0x08;
19 
21  kFailNsOk = 0,
30 };
31 
33 
34 NamespaceFailures CreateUserNamespace(uid_t map_uid_to, gid_t map_gid_to);
36 bool CreatePidNamespace(int *fd_parent);
37 
38 bool BindMount(const std::string &from, const std::string &to);
39 bool ProcMount(const std::string &to);
40 
41 #endif // CVMFS_UTIL_NAMESPACE_H_
bool CreateMountNamespace()
Definition: namespace.cc:118
const int kNsFeatureUserAvailable
Definition: namespace.h:17
const int kNsFeatureMount
Definition: namespace.h:15
const int kNsFeatureUserEnabled
Definition: namespace.h:18
NamespaceFailures CreateUserNamespace(uid_t map_uid_to, gid_t map_gid_to)
Definition: namespace.cc:58
bool ProcMount(const std::string &to)
Definition: namespace.cc:108
const int kNsFeaturePid
Definition: namespace.h:16
int CheckNamespaceFeatures()
Definition: namespace.cc:40
bool CreatePidNamespace(int *fd_parent)
Definition: namespace.cc:151
bool BindMount(const std::string &from, const std::string &to)
Definition: namespace.cc:98
NamespaceFailures
Definition: namespace.h:20