CernVM-FS  2.12.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 #include "util/export.h"
16 
17 const int kNsFeatureMount = 0x01;
18 const int kNsFeaturePid = 0x02;
19 const int kNsFeatureUserAvailable = 0x04;
20 const int kNsFeatureUserEnabled = 0x08;
21 
23  kFailNsOk = 0,
32 };
33 
35 
37 NamespaceFailures CreateUserNamespace(uid_t map_uid_to, gid_t map_gid_to);
39 CVMFS_EXPORT bool CreatePidNamespace(int *fd_parent);
40 
41 CVMFS_EXPORT bool BindMount(const std::string &from, const std::string &to);
42 CVMFS_EXPORT bool ProcMount(const std::string &to);
43 
44 #endif // CVMFS_UTIL_NAMESPACE_H_
bool CreateMountNamespace()
Definition: namespace.cc:120
const int kNsFeatureUserAvailable
Definition: namespace.h:19
const int kNsFeatureMount
Definition: namespace.h:17
const int kNsFeatureUserEnabled
Definition: namespace.h:20
#define CVMFS_EXPORT
Definition: export.h:11
NamespaceFailures CreateUserNamespace(uid_t map_uid_to, gid_t map_gid_to)
Definition: namespace.cc:60
bool ProcMount(const std::string &to)
Definition: namespace.cc:110
const int kNsFeaturePid
Definition: namespace.h:18
int CheckNamespaceFeatures()
Definition: namespace.cc:42
bool CreatePidNamespace(int *fd_parent)
Definition: namespace.cc:155
bool BindMount(const std::string &from, const std::string &to)
Definition: namespace.cc:100
NamespaceFailures
Definition: namespace.h:22