#include <XrdProofdSandbox.h>
Public Member Functions | |
XrdProofdSandbox (XrdProofUI ui, bool full, bool changeown) | |
const char * | Dir () const |
int | GuessTag (XrdOucString &tag, int ridx=1) |
const char * | ErrMsg () const |
bool | IsValid () const |
int | AddSession (const char *tag) |
int | RemoveSession (const char *tag) |
int | GetSessionDirs (int opt, std::list< XrdOucString * > *sdirs, XrdOucString *tag=0) |
int | TrimSessionDirs () |
Static Public Member Functions | |
static void | SetMaxOldSessions (int mxses) |
static void | SetWorkdir (const char *wdir) |
Private Attributes | |
bool | fChangeOwn |
XrdOucString | fDir |
XrdOucString | fErrMsg |
bool | fValid |
XrdProofUI | fUI |
Static Private Attributes | |
static int | fgMaxOldSessions |
static XrdOucString | fgWorkdir |
static XrdProofUI | fgUI |
Definition at line 30 of file XrdProofdSandbox.h.
XrdProofdSandbox::XrdProofdSandbox | ( | XrdProofUI | ui, | |
bool | full, | |||
bool | changeown | |||
) |
Definition at line 35 of file XrdProofdSandbox.cxx.
References XrdProofdAux::AssertDir(), XrdOucString::c_str(), dir(), XrdOucString::endswith(), fDir, fErrMsg, fgUI, fgWorkdir, XrdProofUI::fHomeDir, XrdProofUI::fUid, XrdProofUI::fUser, fValid, XrdProofdAux::GetUserInfo(), i, XrdOucString::length(), n, TRACE, TrimSessionDirs(), and XPDLOC.
const char* XrdProofdSandbox::Dir | ( | ) | const [inline] |
Definition at line 48 of file XrdProofdSandbox.h.
References XrdOucString::c_str(), and fDir.
Referenced by XrdProofdAdmin::CpFile(), XrdProofdAdmin::Exec(), XrdProofdAdmin::GetFile(), XrdProofdAdmin::PutFile(), and XrdProofdAdmin::QueryLogPaths().
int XrdProofdSandbox::GuessTag | ( | XrdOucString & | tag, | |
int | ridx = 1 | |||
) |
Definition at line 356 of file XrdProofdSandbox.cxx.
References XrdOucString::c_str(), fclose(), fDir, fopen, GetSessionDirs(), XrdOucString::length(), lseek, XrdOucString::replace(), SEEK_SET, TRACE, and XPDLOC.
Referenced by XrdProofdAdmin::QueryLogPaths(), and XrdProofdClient::TerminateSessions().
const char* XrdProofdSandbox::ErrMsg | ( | ) | const [inline] |
bool XrdProofdSandbox::IsValid | ( | ) | const [inline] |
Definition at line 53 of file XrdProofdSandbox.h.
References fValid.
Referenced by XrdProofdClient::XrdProofdClient().
int XrdProofdSandbox::AddSession | ( | const char * | tag | ) |
Definition at line 281 of file XrdProofdSandbox.cxx.
References XrdOucString::c_str(), fChangeOwn, fclose(), fDir, fopen, fprintf(), fUI, XrdProofUI::fUid, lseek, SEEK_END, SEEK_SET, TRACE, XpdBadPGuard, XPDLOC, and XPDPRT.
int XrdProofdSandbox::RemoveSession | ( | const char * | tag | ) |
Definition at line 462 of file XrdProofdSandbox.cxx.
References XrdOucString::c_str(), fChangeOwn, fclose(), fDir, fopen, fprintf(), ftruncate, fUI, XrdProofUI::fUid, lseek, SEEK_SET, TRACE, unlink, XpdBadPGuard, and XPDLOC.
Referenced by XrdProofdClient::TerminateSessions(), and TrimSessionDirs().
int XrdProofdSandbox::GetSessionDirs | ( | int | opt, | |
std::list< XrdOucString * > * | sdirs, | |||
XrdOucString * | tag = 0 | |||
) |
Definition at line 201 of file XrdProofdSandbox.cxx.
References access, XrdOucString::c_str(), closedir, dir(), fDir, keep, XrdOucString::length(), opendir, readdir, Sort(), TRACE, XPDLOC, and XpdSessionTagComp().
Referenced by GuessTag(), and TrimSessionDirs().
int XrdProofdSandbox::TrimSessionDirs | ( | ) |
Definition at line 569 of file XrdProofdSandbox.cxx.
References XrdOucString::c_str(), fChangeOwn, fclose(), fDir, fgMaxOldSessions, fopen, fUI, XrdProofUI::fUid, GetSessionDirs(), XrdOucString::length(), p, RemoveSession(), s, strtol(), XrdOucString::tokenize(), TRACE, TRACING, XrdProofdAux::VerifyProcessByID(), XpdBadPGuard, and XPDLOC.
Referenced by XrdProofdClient::TrimSessionDirs(), and XrdProofdSandbox().
static void XrdProofdSandbox::SetMaxOldSessions | ( | int | mxses | ) | [inline, static] |
Definition at line 65 of file XrdProofdSandbox.h.
References fgMaxOldSessions.
Referenced by XrdProofdManager::DoDirectiveMaxOldLogs().
static void XrdProofdSandbox::SetWorkdir | ( | const char * | wdir | ) | [inline, static] |
Definition at line 66 of file XrdProofdSandbox.h.
References fgWorkdir.
Referenced by XrdProofdManager::Config().
bool XrdProofdSandbox::fChangeOwn [private] |
Definition at line 34 of file XrdProofdSandbox.h.
Referenced by AddSession(), RemoveSession(), and TrimSessionDirs().
XrdOucString XrdProofdSandbox::fDir [private] |
Definition at line 35 of file XrdProofdSandbox.h.
Referenced by AddSession(), Dir(), GetSessionDirs(), GuessTag(), RemoveSession(), TrimSessionDirs(), and XrdProofdSandbox().
XrdOucString XrdProofdSandbox::fErrMsg [private] |
bool XrdProofdSandbox::fValid [private] |
XrdProofUI XrdProofdSandbox::fUI [private] |
Definition at line 38 of file XrdProofdSandbox.h.
Referenced by AddSession(), RemoveSession(), and TrimSessionDirs().
int XrdProofdSandbox::fgMaxOldSessions [static, private] |
Definition at line 41 of file XrdProofdSandbox.h.
Referenced by SetMaxOldSessions(), and TrimSessionDirs().
XrdOucString XrdProofdSandbox::fgWorkdir [static, private] |
Definition at line 42 of file XrdProofdSandbox.h.
Referenced by SetWorkdir(), and XrdProofdSandbox().
XrdProofUI XrdProofdSandbox::fgUI [static, private] |