CernVM-FS  2.11.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
loader.cc File Reference
#include "cvmfs_config.h"
#include "loader.h"
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <sched.h>
#include <signal.h>
#include <stddef.h>
#include <sys/resource.h>
#include <time.h>
#include <unistd.h>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include "duplex_fuse.h"
#include "fence.h"
#include "fuse_main.h"
#include "loader_talk.h"
#include "options.h"
#include "sanitizer.h"
#include "util/atomic.h"
#include "util/exception.h"
#include "util/logging.h"
#include "util/platform.h"
#include "util/posix.h"
#include "util/string.h"
Include dependency graph for loader.cc:

Go to the source code of this file.

Classes

struct  loader::CvmfsOptions
 

Namespaces

 loader
 

Macros

#define ENOATTR   ENODATA
 
#define _FILE_OFFSET_BITS   64
 
#define CVMFS_OPT(t, p, v)   { t, offsetof(struct CvmfsOptions, p), v }
 
#define CVMFS_SWITCH(t, p)   { t, offsetof(struct CvmfsOptions, p), 1 }
 

Enumerations

enum  {
  loader::KEY_HELP, loader::KEY_VERSION, loader::KEY_FOREGROUND, loader::KEY_SINGLETHREAD,
  loader::KEY_FUSE_DEBUG, loader::KEY_CVMFS_DEBUG, loader::KEY_OPTIONS_PARSE
}
 

Functions

static void loader::Usage (const string &exename)
 
bool loader::CheckPremounted (const std::string &mountpoint)
 
static void loader::stub_init (void *userdata, struct fuse_conn_info *conn)
 
static void loader::stub_destroy (void *userdata)
 
static void loader::stub_lookup (fuse_req_t req, fuse_ino_t parent, const char *name)
 
static void loader::stub_getattr (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void loader::stub_readlink (fuse_req_t req, fuse_ino_t ino)
 
static void loader::stub_opendir (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void loader::stub_releasedir (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void loader::stub_readdir (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
 
static void loader::stub_open (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void loader::stub_read (fuse_req_t req, fuse_ino_t ino, size_t size, off_t off, struct fuse_file_info *fi)
 
static void loader::stub_release (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
 
static void loader::stub_statfs (fuse_req_t req, fuse_ino_t ino)
 
static void loader::stub_getxattr (fuse_req_t req, fuse_ino_t ino, const char *name, size_t size)
 
static void loader::stub_listxattr (fuse_req_t req, fuse_ino_t ino, size_t size)
 
static void loader::stub_forget (fuse_req_t req, fuse_ino_t ino, uint64_t nlookup)
 
static int loader::ParseFuseOptions (void *data __attribute__((unused)), const char *arg, int key, struct fuse_args *outargs)
 
static fuse_args * loader::ParseCmdLine (int argc, char *argv[])
 
static void loader::SetFuseOperations (struct fuse_lowlevel_ops *loader_operations)
 
static void * loader::OpenLibrary (const string &path)
 
static void loader::CloseLibrary ()
 
static CvmfsExportsloader::LoadLibrary (const bool debug_mode, LoaderExports *loader_exports)
 
Failures loader::Reload (const int fd_progress, const bool stop_and_go)
 
int FuseMain (int argc, char *argv[])
 
 __attribute__ ((visibility("default"))) CvmfsStubExports *g_cvmfs_stub_exports
 
static void __attribute__ ((constructor)) LibraryMain()
 
static void __attribute__ ((destructor)) LibraryExit()
 

Variables

static struct fuse_opt loader::cvmfs_array_opts []
 
string * loader::repository_name_ = NULL
 
string * loader::mount_point_ = NULL
 
string * loader::config_files_ = NULL
 
string * loader::socket_path_ = NULL
 
string * loader::usyslog_path_ = NULL
 
uid_t loader::uid_ = 0
 
gid_t loader::gid_ = 0
 
bool loader::single_threaded_ = false
 
bool loader::foreground_ = false
 
bool loader::debug_mode_ = false
 
bool loader::system_mount_ = false
 
bool loader::grab_mountpoint_ = false
 
bool loader::parse_options_only_ = false
 
bool loader::suid_mode_ = false
 
bool loader::premounted_ = false
 
bool loader::disable_watchdog_ = false
 
bool loader::simple_options_parsing_ = false
 
void * loader::library_handle_
 
Fenceloader::fence_reload_
 
CvmfsExportsloader::cvmfs_exports_
 
LoaderExportsloader::loader_exports_
 

Macro Definition Documentation

#define _FILE_OFFSET_BITS   64

Definition at line 13 of file loader.cc.

#define CVMFS_OPT (   t,
  p,
 
)    { t, offsetof(struct CvmfsOptions, p), v }

Definition at line 88 of file loader.cc.

#define CVMFS_SWITCH (   t,
 
)    { t, offsetof(struct CvmfsOptions, p), 1 }

Definition at line 89 of file loader.cc.

#define ENOATTR   ENODATA

This file is part of the CernVM File System.

Implements stub callback functions for Fuse. Their purpose is to redirect calls to the cvmfs shared library and to block calls during the update of the library.

The main executable and the cvmfs shared library must not share any symbols.instead of including attr/xattr.h

Definition at line 12 of file loader.cc.

Function Documentation

__attribute__ ( (visibility("default"))  )

Users create derived instances to react on repository diffs

Depending on the desired course of action, the permitted capabilites of the binary (cap_dac_read_search, cap_sys_admin) needs to be dropped or gained. Dropped for creating user namespaces in enter, gained for walking through overlayfs.

If in an ephemeral writable shell, return the session directory. Otherwise return the empty string.

Depending on the desired course of action, the permitted capabilites of the binary (cap_dac_read_search, cap_sys_admin) needs to be dropped or gained. Dropped for creating user namespaces in enter, gained for walking through overlayfs.

If in an ephemeral writable shell, return the session directory. Otherwise return the empty string.

Definition at line 58 of file repository.h.

static void __attribute__ ( (constructor)  )
static

Definition at line 1094 of file loader.cc.

Here is the call graph for this function:

static void __attribute__ ( (destructor)  )
static

Definition at line 1099 of file loader.cc.

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

Definition at line 610 of file loader.cc.

Referenced by __attribute__().

Here is the call graph for this function:

Here is the caller graph for this function: