12 #ifndef ROOT_XrdProofdSandbox
13 #define ROOT_XrdProofdSandbox
28 #include "XrdOuc/XrdOucString.hh"
48 const char *
Dir()
const {
return fDir.c_str(); }
50 int GuessTag(XrdOucString &tag,
int ridx = 1);
52 const char *
ErrMsg()
const {
return fErrMsg.c_str(); }
61 XrdOucString *tag = 0);
66 static void SetWorkdir(
const char *wdir) { fgWorkdir = wdir; }
int TrimSessionDirs()
If the static fgMaxOldLogs > 0, logs for a fgMaxOldLogs number of sessions are kept in the sandbox; w...
int GetSessionDirs(int opt, std::list< XrdOucString * > *sdirs, XrdOucString *tag=0)
Scan the sandbox for sessions working dirs and return their sorted (according to creation time...
static void SetWorkdir(const char *wdir)
const char * ErrMsg() const
static int fgMaxOldSessions
int changeown(const std::string &path, uid_t u, gid_t g)
Change the ownership of 'path' to the entity described by {u,g}.
int GuessTag(XrdOucString &tag, int ridx=1)
Guess session tag completing 'tag' (typically "-
") by scanning the active session file or the se...
int AddSession(const char *tag)
Record entry for new proofserv session tagged 'tag' in the active sessions file (/.sessions).
int RemoveSession(const char *tag)
Move record for tag from the active sessions file to the old sessions file (/.sessions).
XrdProofdSandbox(XrdProofUI ui, bool full, bool changeown)
Assert existence on the sandbox for the user defined by 'ui'.
static XrdOucString fgWorkdir
static void SetMaxOldSessions(int mxses)