CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cvmfs_suid_helper.cc File Reference
#include <sys/xattr.h>
#include <dirent.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include "cvmfs_suid_util.h"
#include "platform.h"
#include "sanitizer.h"
Include dependency graph for cvmfs_suid_helper.cc:

Go to the source code of this file.

Classes

class  ScopedWorkingDirectory
 
struct  ScopedWorkingDirectory::DirectoryEntry
 

Enumerations

enum  RemountType { kRemountRdonly, kRemountRw }
 

Functions

static void GetCredentials (uid_t *calling_uid, uid_t *effective_uid)
 
static void ExecAsRoot (const char *binary, const char *arg1, const char *arg2, const char *arg3)
 
static void Remount (const string &path, const RemountType how)
 
static void Mount (const string &path)
 
static void Umount (const string &path)
 
static void LazyUmount (const string &path)
 
static void KillCvmfs (const string &fqrn)
 
static bool ClearDirectory (const string &path)
 
static int CleanupDirectory (const string &path)
 
static int DoSynchronousScratchCleanup (const string &fqrn)
 
static int DoAsynchronousScratchCleanup (const string &fqrn)
 
static void Usage (const string &exe, FILE *output)
 
int main (int argc, char *argv[])
 

Variables

const char * kSpoolArea = "/var/spool/cvmfs"
 

Enumeration Type Documentation

Enumerator
kRemountRdonly 
kRemountRw 

Definition at line 31 of file cvmfs_suid_helper.cc.

Function Documentation

static int CleanupDirectory ( const string &  path)
static

Definition at line 210 of file cvmfs_suid_helper.cc.

Referenced by DoAsynchronousScratchCleanup(), and DoSynchronousScratchCleanup().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool ClearDirectory ( const string &  path)
static

Definition at line 193 of file cvmfs_suid_helper.cc.

Referenced by CleanupDirectory().

Here is the call graph for this function:

Here is the caller graph for this function:

static int DoAsynchronousScratchCleanup ( const string &  fqrn)
static

Definition at line 223 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static int DoSynchronousScratchCleanup ( const string &  fqrn)
static

Definition at line 218 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void ExecAsRoot ( const char *  binary,
const char *  arg1,
const char *  arg2,
const char *  arg3 
)
static

Definition at line 41 of file cvmfs_suid_helper.cc.

Referenced by KillCvmfs(), LazyUmount(), Mount(), Remount(), and Umount().

Here is the caller graph for this function:

static void GetCredentials ( uid_t *  calling_uid,
uid_t *  effective_uid 
)
static

Definition at line 36 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the caller graph for this function:

static void KillCvmfs ( const string &  fqrn)
static

Definition at line 111 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void LazyUmount ( const string &  path)
static

Definition at line 107 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 267 of file cvmfs_suid_helper.cc.

Here is the call graph for this function:

static void Mount ( const string &  path)
static

Definition at line 80 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void Remount ( const string &  path,
const RemountType  how 
)
static

Definition at line 63 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void Umount ( const string &  path)
static

Definition at line 103 of file cvmfs_suid_helper.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static void Usage ( const string &  exe,
FILE *  output 
)
static

Definition at line 257 of file cvmfs_suid_helper.cc.

Variable Documentation

const char* kSpoolArea = "/var/spool/cvmfs"