5 #include "cvmfs_config.h"
31 std::vector<std::string> tokens =
37 std::string session_dir = Env::GetEnterSessionDir();
55 throw EPublish(
"No write permission to repository");
60 throw EPublish(
"Autofs on /cvmfs has to be disabled");
65 if (publisher->whitelist()->IsExpired()) {
66 throw EPublish(
"Repository whitelist for $name is expired",
78 double whitelist_valid_s =
79 difftime(publisher->whitelist()->expires(), time(NULL));
80 if (whitelist_valid_s < (12 * 60 * 60)) {
82 "Warning: Repository whitelist stays valid for less than 12 hours!");
88 publisher->ExitShell();
SettingsPublisher * CreateSettingsPublisher(const std::string &ident, bool needs_managed=false)
virtual int Main(const Options &options)
const SettingsPublisher & settings() const
bool SafeWriteToFile(const std::string &content, const std::string &path, int mode)
void SetConfigPath(const std::string &config_path)
const std::vector< Argument > & plain_args() const
FileSystemInfo GetFileSystemInfo(const std::string &path)
vector< string > SplitStringBounded(unsigned max_chunks, const string &str, char delim)
EFailures failure() const
bool SwitchCredentials(const uid_t uid, const gid_t gid, const bool temporarily)
Publisher(const SettingsPublisher &settings, const bool exists=true)
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)