XrdProofdAdmin Class Reference

#include <XrdProofdAdmin.h>

Inheritance diagram for XrdProofdAdmin:

XrdProofdConfig List of all members.

Public Member Functions

 XrdProofdAdmin (XrdProofdManager *mgr, XrdProtocol_Config *pi, XrdSysError *e)
virtual ~XrdProofdAdmin ()
int Config (bool rcf=0)
int DoDirective (XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
int Process (XrdProofdProtocol *p, int type)
int QuerySessions (XrdProofdProtocol *p)
int QueryLogPaths (XrdProofdProtocol *p)
int CleanupSessions (XrdProofdProtocol *p)
int SendMsgToUser (XrdProofdProtocol *p)
int SetGroupProperties (XrdProofdProtocol *p)
int GetWorkers (XrdProofdProtocol *p)
int QueryWorkers (XrdProofdProtocol *p)
int QueryROOTVersions (XrdProofdProtocol *p)
int SetROOTVersion (XrdProofdProtocol *p)
int SetSessionAlias (XrdProofdProtocol *p)
int SetSessionTag (XrdProofdProtocol *p)
int ReleaseWorker (XrdProofdProtocol *p)
int Exec (XrdProofdProtocol *p)
int GetFile (XrdProofdProtocol *p)
int PutFile (XrdProofdProtocol *p)
int CpFile (XrdProofdProtocol *p)

Private Member Functions

void RegisterDirectives ()
int DoDirectiveExportPath (char *, XrdOucStream *, bool)
int DoDirectiveCpCmd (char *, XrdOucStream *, bool)
int CheckForbiddenChars (const char *s)
int CheckPath (bool superuser, const char *sbdir, XrdOucString &fullpath, int check, bool &sandbox, struct stat *st, XrdOucString &emsg)
int ExecCmd (XrdProofdProtocol *p, XrdProofdResponse *r, int action, const char *cmd, XrdOucString &emsg)
int Send (XrdProofdResponse *r, const char *msg)

Private Attributes

XrdProofdManagerfMgr
std::list< XrdOucStringfExportPaths
XrdOucHash< XpdAdminCpCmdfAllowedCpCmds
XrdOucString fCpCmds

Detailed Description

Definition at line 49 of file XrdProofdAdmin.h.


Constructor & Destructor Documentation

XrdProofdAdmin::XrdProofdAdmin ( XrdProofdManager mgr,
XrdProtocol_Config pi,
XrdSysError e 
)

Definition at line 73 of file XrdProofdAdmin.cxx.

References XrdOucHash< T >::Add(), XrdOucHash< T >::Apply(), ExportCpCmd(), fAllowedCpCmds, fCpCmds, fExportPaths, fMgr, and RegisterDirectives().

virtual XrdProofdAdmin::~XrdProofdAdmin (  )  [inline, virtual]

Definition at line 69 of file XrdProofdAdmin.h.


Member Function Documentation

void XrdProofdAdmin::RegisterDirectives (  )  [private, virtual]

Reimplemented from XrdProofdConfig.

Definition at line 100 of file XrdProofdAdmin.cxx.

References DoDirectiveClass(), and XrdProofdConfig::Register().

Referenced by XrdProofdAdmin().

int XrdProofdAdmin::DoDirectiveExportPath ( char *  ,
XrdOucStream ,
bool   
) [private]

Definition at line 218 of file XrdProofdAdmin.cxx.

References fExportPaths, XrdOucStream::GetWord(), STR_NPOS, TRACE, and XPDLOC.

Referenced by DoDirective().

int XrdProofdAdmin::DoDirectiveCpCmd ( char *  ,
XrdOucStream ,
bool   
) [private]

Definition at line 245 of file XrdProofdAdmin.cxx.

References XrdOucHash< T >::Apply(), XrdOucString::assign(), XrdOucString::beginswith(), XrdOucString::c_str(), XrdOucHash< T >::Del(), XrdOucString::erase(), ExportCpCmd(), fAllowedCpCmds, fCpCmds, XrdOucStream::GetWord(), XrdOucString::insert(), XrdOucString::length(), XrdOucHash< T >::Rep(), TRACE, and XPDLOC.

Referenced by DoDirective().

int XrdProofdAdmin::CheckForbiddenChars ( const char *  s  )  [private]

Definition at line 1065 of file XrdProofdAdmin.cxx.

References c, j, and len.

Referenced by Exec().

int XrdProofdAdmin::CheckPath ( bool  superuser,
const char *  sbdir,
XrdOucString fullpath,
int  check,
bool &  sandbox,
struct stat *  st,
XrdOucString emsg 
) [private]

Definition at line 1609 of file XrdProofdAdmin.cxx.

References XrdOucString::beginswith(), XrdOucString::c_str(), emsg(), XrdOucString::erase(), fExportPaths, XrdOucString::insert(), XrdOucString::replace(), S_ISREG, and stat.

Referenced by CpFile(), Exec(), GetFile(), and PutFile().

int XrdProofdAdmin::ExecCmd ( XrdProofdProtocol p,
XrdProofdResponse r,
int  action,
const char *  cmd,
XrdOucString emsg 
) [private]

Definition at line 1383 of file XrdProofdAdmin.cxx.

References b, buf, XpdMsg::Buf(), XrdOucString::c_str(), emsg(), fMgr, XrdScheduler::Fork(), fp, int, XrdProofdPipe::IsValid(), kMd5sum, kStat, kXPD_srvmsg, kXR_attn, len, XrdOucString::length(), line, p, XrdProofdPipe::Poll(), XrdProofdPipe::Post(), XrdProofdPipe::Recv(), XrdProofdManager::Sched(), XrdProofdManager::SessionMgr(), XrdProofdProofServMgr::SetUserEnvironment(), sprintf(), stat, STR_NPOS, XrdOucString::tokenize(), TRACEP, XpdMsg::Type(), WEXITSTATUS, and XPDLOC.

Referenced by Exec().

int XrdProofdAdmin::Send ( XrdProofdResponse r,
const char *  msg 
) [private]

int XrdProofdAdmin::Config ( bool  rcf = 0  )  [virtual]

Reimplemented from XrdProofdConfig.

Definition at line 168 of file XrdProofdAdmin.cxx.

References XrdOucString::c_str(), XrdProofdConfig::Config(), fCpCmds, fExportPaths, TRACE, XPDERR, and XPDLOC.

Referenced by XrdProofdManager::Config().

int XrdProofdAdmin::DoDirective ( XrdProofdDirective d,
char *  val,
XrdOucStream cfg,
bool  rcf 
) [virtual]

Reimplemented from XrdProofdConfig.

Definition at line 198 of file XrdProofdAdmin.cxx.

References d, DoDirectiveCpCmd(), DoDirectiveExportPath(), TRACE, and XPDLOC.

int XrdProofdAdmin::Process ( XrdProofdProtocol p,
int  type 
)

Definition at line 109 of file XrdProofdAdmin.cxx.

References XrdProofdAux::AdminMsgType(), CleanupSessions(), CpFile(), emsg(), Exec(), GetFile(), GetWorkers(), kCleanupSessions, kCpFile, kExec, kGetFile, kGetWorkers, kGroupProperties, kPutFile, kQueryLogPaths, kQueryROOTVersions, kQuerySessions, kQueryWorkers, kReleaseWorker, kROOTVersion, kSendMsgToUser, kSessionAlias, kSessionTag, kXR_InvalidRequest, p, PutFile(), QueryLogPaths(), QueryROOTVersions(), QuerySessions(), QueryWorkers(), ReleaseWorker(), SendMsgToUser(), SetGroupProperties(), SetROOTVersion(), SetSessionAlias(), SetSessionTag(), TRACEP, XPD_SETRESP, and XPDLOC.

Referenced by XrdProofdManager::Process().

int XrdProofdAdmin::QuerySessions ( XrdProofdProtocol p  ) 

Definition at line 641 of file XrdProofdAdmin.cxx.

References XrdOucString::c_str(), xmlio::cnt, fMgr, XrdProofdProofServMgr::kProcessCnt, kXPD_srvmsg, kXR_attn, XrdOucString::length(), p, XrdProofdManager::SessionMgr(), TRACEP, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::QueryLogPaths ( XrdProofdProtocol p  ) 

Definition at line 670 of file XrdProofdAdmin.cxx.

References buf, XrdOucString::c_str(), XrdProofdManager::ClientMgr(), closedir, XrdProofdSandbox::Dir(), dir(), XrdProofdManager::EffectiveUser(), fclose(), fMgr, fopen, free(), XrdProofdClientMgr::GetClient(), XrdProofdSandbox::GuessTag(), XrdProofdManager::Host(), kXR_InvalidRequest, len, XrdOucString::length(), XrdProofdManager::NetMgr(), opendir, p, XrdProofdManager::PoolURL(), XrdProofdManager::Port(), readdir, XrdProofdNetMgr::ReadLogPaths(), XrdProofdClient::Sandbox(), STR_NPOS, TRACEP, u, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::CleanupSessions ( XrdProofdProtocol p  ) 

Definition at line 827 of file XrdProofdAdmin.cxx.

References XrdProofdNetMgr::Broadcast(), buf, c, XrdOucString::c_str(), XrdProofdProofServMgr::CheckCounter(), XrdProofdManager::ClientMgr(), fMgr, XrdProofdClientMgr::GetClient(), XrdProofdProofServMgr::kCleanSessionsCnt, kXPD_srvmsg, kXPD_Worker, kXR_attn, len, XrdOucString::length(), XrdProofdManager::NetMgr(), p, SafeDelArray, XrdProofdManager::SessionMgr(), sleep, XrdProofdManager::SrvType(), XrdProofdClientMgr::TerminateSessions(), TRACEP, type, XrdProofdClient::User(), what, XPD_SETRESP, XPDFORM, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::SendMsgToUser ( XrdProofdProtocol p  ) 

Definition at line 554 of file XrdProofdAdmin.cxx.

References XrdProofdClientMgr::Broadcast(), c, XrdProofdManager::ClientMgr(), fMgr, XrdProofdClientMgr::GetClient(), i, kXR_InvalidRequest, len, p, STR_NPOS, TRACEP, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::SetGroupProperties ( XrdProofdProtocol p  ) 

Definition at line 504 of file XrdProofdAdmin.cxx.

References buf, fMgr, XrdProofdPriorityMgr::kSetGroupPriority, kXR_InvalidRequest, kXR_ServerError, len, p, XrdProofdPriorityMgr::Pipe(), XrdProofdPipe::Post(), XrdProofdManager::PriorityMgr(), TRACEP, XPD_SETRESP, XPDFORM, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::GetWorkers ( XrdProofdProtocol p  ) 

Definition at line 449 of file XrdProofdAdmin.cxx.

References XrdOucString::assign(), buf, XrdOucString::c_str(), fMgr, XrdProofdManager::GetWorkers(), kXR_InvalidRequest, len, XrdOucString::length(), p, TRACEP, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::QueryWorkers ( XrdProofdProtocol p  ) 

Definition at line 424 of file XrdProofdAdmin.cxx.

References buf, XrdOucString::c_str(), XrdProofSched::ExportInfo(), fMgr, len, XrdOucString::length(), p, XrdProofdManager::ProofSched(), TRACEP, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::QueryROOTVersions ( XrdProofdProtocol p  ) 

Definition at line 306 of file XrdProofdAdmin.cxx.

References XrdOucString::c_str(), XrdROOTMgr::ExportVersions(), fMgr, XrdOucString::length(), p, XrdProofdManager::ROOTMgr(), TRACEP, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::SetROOTVersion ( XrdProofdProtocol p  ) 

Definition at line 326 of file XrdProofdAdmin.cxx.

References XrdOucString::beginswith(), XrdProofdNetMgr::Broadcast(), buf, c, XrdOucString::c_str(), XrdProofdManager::ClientMgr(), XrdROOTMgr::DefaultVersion(), emsg(), XrdOucString::erase(), XrdOucString::find(), fMgr, g, XrdProofdClientMgr::GetClient(), XrdProofGroupMgr::GetUserGroup(), XrdROOTMgr::GetVersion(), XrdProofdManager::GroupsMgr(), XrdOucString::insert(), kXPD_Worker, kXR_InvalidRequest, len, XrdOucString::length(), XrdProofdManager::NetMgr(), ok, p, XrdOucString::replace(), XrdOucString::rfind(), XrdProofdManager::ROOTMgr(), XrdProofdManager::SrvType(), STR_NPOS, t, TRACEP, type, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::SetSessionAlias ( XrdProofdProtocol p  ) 

Definition at line 946 of file XrdProofdAdmin.cxx.

References kXPROOFSRVALIASMAX, kXR_InvalidRequest, len, p, TRACEP, TRACING, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::SetSessionTag ( XrdProofdProtocol p  ) 

Definition at line 987 of file XrdProofdAdmin.cxx.

References kXPROOFSRVTAGMAX, kXR_InvalidRequest, len, p, TRACEP, TRACING, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::ReleaseWorker ( XrdProofdProtocol p  ) 

Definition at line 1027 of file XrdProofdAdmin.cxx.

References XrdProofdNetMgr::Dump(), fMgr, kXPROOFSRVTAGMAX, kXR_InvalidRequest, len, XrdProofdManager::NetMgr(), p, TRACEP, TRACING, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::Exec ( XrdProofdProtocol p  ) 

Definition at line 1085 of file XrdProofdAdmin.cxx.

References XrdOucString::assign(), XrdProofdNetMgr::Broadcast(), XrdOucString::c_str(), CheckForbiddenChars(), CheckPath(), XrdClientMessage::DataLen(), XrdProofdSandbox::Dir(), XrdProofdManager::EffectiveUser(), emsg(), XrdOucString::endswith(), XrdOucString::erasefromend(), ExecCmd(), XrdProofUI::fGid, XrdOucString::find(), fMgr, XrdProofUI::fUid, XrdClientMessage::GetData(), XrdProofdManager::Host(), int, XrdProofdNetMgr::IsLocal(), kFind, kGrep, kLs, kMd5sum, kMore, kRm, kStat, kTail, kXPD_srvmsg, kXPD_Worker, kXR_attn, kXR_InvalidRequest, kXR_ServerError, XrdOucString::length(), XrdProofdManager::NetMgr(), p, XrdProofdManager::Port(), result(), SafeDelete, XrdProofdClient::Sandbox(), XrdProofdNetMgr::Send(), XrdProofdManager::SrvType(), stat, STR_NPOS, XrdOucString::tokenize(), TRACEP, type, u, XrdProofdClient::UI(), XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::GetFile ( XrdProofdProtocol p  ) 

Definition at line 1673 of file XrdProofdAdmin.cxx.

References XrdOucString::assign(), buf, XpdMsg::Buf(), XrdOucString::c_str(), CheckPath(), close, XrdProofdSandbox::Dir(), emsg(), fMgr, XrdScheduler::Fork(), int, XrdProofdPipe::IsValid(), kMAXBUF, kXPD_msg, kXPD_srvmsg, kXR_attn, kXR_InvalidRequest, kXR_ServerError, XrdOucString::length(), lseek, open, p, XrdProofdPipe::Poll(), XrdProofdPipe::Post(), read, XrdProofdPipe::Recv(), XrdProofdClient::Sandbox(), XrdProofdManager::Sched(), SEEK_SET, XrdProofdManager::SessionMgr(), XrdProofdProofServMgr::SetUserEnvironment(), sprintf(), stat, TRACEP, XpdMsg::Type(), XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::PutFile ( XrdProofdProtocol p  ) 

Definition at line 1883 of file XrdProofdAdmin.cxx.

References XrdOucString::assign(), b, XpdMsg::Buf(), XrdBuffer::buff, XrdOucString::c_str(), CheckPath(), close, XrdProofdSandbox::Dir(), emsg(), fMgr, XrdScheduler::Fork(), XrdProofdProtocol::GetBuff(), int, XrdProofdPipe::IsValid(), kMAXBUF, kXPD_srvmsg, kXR_attn, kXR_InvalidRequest, kXR_ServerError, XrdOucString::length(), XrdProofdProtocol::MaxBuffsz(), open, p, XrdProofdPipe::Poll(), XrdProofdPipe::Post(), XrdProofdPipe::Recv(), XrdProofdProtocol::ReleaseBuff(), XrdProofdClient::Sandbox(), XrdProofdManager::Sched(), XrdProofdManager::SessionMgr(), XrdProofdProofServMgr::SetUserEnvironment(), size, stat, XrdOucString::tokenize(), TRACEP, XpdMsg::Type(), w, write, XPD_SETRESP, and XPDLOC.

Referenced by Process().

int XrdProofdAdmin::CpFile ( XrdProofdProtocol p  ) 

Definition at line 2131 of file XrdProofdAdmin.cxx.

References XrdOucString::assign(), b, XrdOucString::beginswith(), buf, XpdMsg::Buf(), XrdOucString::c_str(), CheckPath(), XrdProofdSandbox::Dir(), emsg(), fAllowedCpCmds, XpdAdminCpCmd::fCanPut, XpdAdminCpCmd::fCmd, XpdAdminCpCmd::fFmt, XrdOucHash< T >::Find(), XrdOucString::find(), fMgr, XrdScheduler::Fork(), XrdProofdAux::Form(), fp, XrdOucString::insert(), int, XrdProofdPipe::IsValid(), kXPD_srvmsg, kXR_attn, kXR_InvalidRequest, kXR_ServerError, XrdOucString::length(), line, p, XrdProofdPipe::Poll(), XrdProofdPipe::Post(), XrdProofdPipe::Recv(), XrdProofdClient::Sandbox(), XrdProofdManager::Sched(), XrdProofdManager::SessionMgr(), XrdProofdProofServMgr::SetUserEnvironment(), stat, STR_NPOS, TRACEP, XpdMsg::Type(), WEXITSTATUS, XPD_SETRESP, and XPDLOC.

Referenced by Process().


Member Data Documentation

XrdProofdManager* XrdProofdAdmin::fMgr [private]

Definition at line 51 of file XrdProofdAdmin.h.

Referenced by CleanupSessions(), CpFile(), Exec(), ExecCmd(), GetFile(), GetWorkers(), PutFile(), QueryLogPaths(), QueryROOTVersions(), QuerySessions(), QueryWorkers(), ReleaseWorker(), SendMsgToUser(), SetGroupProperties(), SetROOTVersion(), and XrdProofdAdmin().

std::list<XrdOucString> XrdProofdAdmin::fExportPaths [private]

Definition at line 52 of file XrdProofdAdmin.h.

Referenced by CheckPath(), Config(), DoDirectiveExportPath(), and XrdProofdAdmin().

XrdOucHash<XpdAdminCpCmd> XrdProofdAdmin::fAllowedCpCmds [private]

Definition at line 53 of file XrdProofdAdmin.h.

Referenced by CpFile(), DoDirectiveCpCmd(), and XrdProofdAdmin().

XrdOucString XrdProofdAdmin::fCpCmds [private]

Definition at line 54 of file XrdProofdAdmin.h.

Referenced by Config(), DoDirectiveCpCmd(), and XrdProofdAdmin().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:41 2011 for ROOT_528-00b_version by  doxygen 1.5.1