CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
namespace.cc File Reference
#include "cvmfs_config.h"
#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"
Include dependency graph for namespace.cc:

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)
 

Macro Definition Documentation

#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().

Function Documentation

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().

Here is the caller graph for this function:

int CheckNamespaceFeatures ( )

Definition at line 42 of file namespace.cc.

Here is the call graph for this function:

bool CreateMountNamespace ( )

Definition at line 120 of file namespace.cc.

Referenced by anonymous_namespace{cmd_enter.cc}::EnterRootContainer().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

bool ProcMount ( const std::string &  to)

Definition at line 110 of file namespace.cc.

Referenced by publish::CmdEnter::Main().

Here is the caller graph for this function: