![]() |
CernVM-FS
2.12.0
|
#include "namespace.h"
#include <fcntl.h>
#include <signal.h>
#include <sched.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include <cstring>
#include "util/posix.h"
#include "util/string.h"
Go to the source code of this file.
Namespaces | |
anonymous_namespace{namespace.cc} | |
Macros | |
#define | CLONE_NEWUSER 0x10000000 |
#define | CLONE_NEWPID 0x20000000 |
#define | MS_REC 0x4000 |
#define | CVMFS_HAS_UNSHARE 1 |
Functions | |
int | CheckNamespaceFeatures () |
NamespaceFailures | CreateUserNamespace (uid_t map_uid_to, gid_t map_gid_to) |
bool | BindMount (const std::string &from, const std::string &to) |
bool | ProcMount (const std::string &to) |
bool | CreateMountNamespace () |
static void | anonymous_namespace{namespace.cc}::Reaper (int, siginfo_t *, void *) |
bool | CreatePidNamespace (int *fd_parent) |
#define CLONE_NEWPID 0x20000000 |
Definition at line 26 of file namespace.cc.
Referenced by CreatePidNamespace().
#define CLONE_NEWUSER 0x10000000 |
This file is part of the CernVM File System.
Definition at line 23 of file namespace.cc.
Referenced by CreateUserNamespace().
#define CVMFS_HAS_UNSHARE 1 |
Definition at line 33 of file namespace.cc.
#define MS_REC 0x4000 |
Definition at line 29 of file namespace.cc.
Referenced by BindMount().
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().
int CheckNamespaceFeatures | ( | ) |
bool CreateMountNamespace | ( | ) |
Definition at line 120 of file namespace.cc.
Referenced by anonymous_namespace{cmd_enter.cc}::EnterRootContainer().
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().
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().
bool ProcMount | ( | const std::string & | to | ) |
Definition at line 110 of file namespace.cc.
Referenced by publish::CmdEnter::Main().