|
xrootd
|
#include <XrdOucUtils.hh>
Public Member Functions | |
| XrdOucUtils () | |
| ~XrdOucUtils () | |
Static Public Member Functions | |
| static char * | eText (int rc, char *eBuff, int eBlen, int AsIs=0) |
| static int | doIf (XrdSysError *eDest, XrdOucStream &Config, const char *what, const char *hname, const char *nname, const char *pname) |
| static int | fmtBytes (long long val, char *buff, int bsz) |
| static char * | genPath (const char *path, const char *inst, const char *psfx=0) |
| static int | genPath (char *buff, int blen, const char *path, const char *psfx=0) |
| static int | GroupName (gid_t gID, char *gName, int gNsz) |
| static const char * | InstName (int TranOpt=0) |
| static const char * | InstName (const char *name, int Fillit=1) |
| static int | is1of (char *val, const char **clist) |
| static void | makeHome (XrdSysError &eDest, const char *inst) |
| static int | makePath (char *path, mode_t mode) |
| static char * | subLogfn (XrdSysError &eDest, const char *inst, char *logfn) |
| static void | Undercover (XrdSysError &eDest, int noLog, int *pipeFD=0) |
| static int | UserName (uid_t uID, char *uName, int uNsz) |
| static bool | PidFile (XrdSysError &eDest, const char *path) |
Static Public Attributes | |
| static const mode_t | pathMode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH |
| XrdOucUtils::XrdOucUtils | ( | ) | [inline] |
| XrdOucUtils::~XrdOucUtils | ( | ) | [inline] |
| int XrdOucUtils::doIf | ( | XrdSysError * | eDest, |
| XrdOucStream & | Config, | ||
| const char * | what, | ||
| const char * | hname, | ||
| const char * | nname, | ||
| const char * | pname | ||
| ) | [static] |
References XrdOucStream::GetWord(), XrdSysError::Emsg(), is1of(), and XrdSysDNS::isMatch().
Referenced by main(), XrdCmsClientConfig::xmang(), XrdCmsConfig::xmang(), XrdCmsConfig::xrole(), XrdConfig::xport(), XrdOfs::xrole(), and XrdOucStream::doif().
| char * XrdOucUtils::eText | ( | int | rc, |
| char * | eBuff, | ||
| int | eBlen, | ||
| int | AsIs = 0 |
||
| ) | [static] |
References strlcpy().
Referenced by XrdCnsSsi::List(), XrdCnsSsi::Updt(), XrdCnsSsi::ApplyLog(), XrdCnsSsi::Write(), and XrdCnsSsiCfg::Configure().
| int XrdOucUtils::fmtBytes | ( | long long | val, |
| char * | buff, | ||
| int | bsz | ||
| ) | [static] |
References snprintf.
Referenced by XrdFrmPurge::Display(), XrdFrmPurge::Stats(), and XrdFrmPurge::Track().
| char * XrdOucUtils::genPath | ( | const char * | path, |
| const char * | inst, | ||
| const char * | psfx = 0 |
||
| ) | [static] |
References strlcpy().
Referenced by XrdCmsClientConfig::Configure(), XrdCmsConfig::Configure2(), XrdCmsConfig::PidFile(), XrdConfig::Setup(), XrdFrcUtils::makePath(), XrdFrmCns::setPath(), XrdNetCmsNotify::XrdNetCmsNotify(), XrdOfs::ConfigPosc(), XrdXrootdProtocol::Configure(), XrdXrootdProtocol::PidFile(), and XrdXrootdProtocol::xprep().
| int XrdOucUtils::genPath | ( | char * | buff, |
| int | blen, | ||
| const char * | path, | ||
| const char * | psfx = 0 |
||
| ) | [static] |
| int XrdOucUtils::GroupName | ( | gid_t | gID, |
| char * | gName, | ||
| int | gNsz | ||
| ) | [static] |
Referenced by XrdSecProtocolunix::getCredentials(), and XrdSecsssID::genID().
| const char * XrdOucUtils::InstName | ( | int | TranOpt = 0 | ) | [static] |
Referenced by main(), XrdCmsClientConfig::Configure(), XrdCmsConfig::Configure1(), XrdCmsConfig::Configure2(), XrdCmsConfig::PidFile(), XrdCnsConfig::Configure(), XrdConfig::Configure(), XrdFrcProxy::XrdFrcProxy(), XrdFrcReqAgent::Start(), XrdFrmConfig::XrdFrmConfig(), XrdFrmConfig::Configure(), XrdNetCmsNotify::XrdNetCmsNotify(), XrdOfs::ConfigPosc(), XrdOfs::xrole(), XrdOssSys::ConfigStage(), XrdOssSpace::Init(), XrdPssSys::Configure(), and XrdXrootdProtocol::PidFile().
| const char * XrdOucUtils::InstName | ( | const char * | name, |
| int | Fillit = 1 |
||
| ) | [static] |
| int XrdOucUtils::is1of | ( | char * | val, |
| const char ** | clist | ||
| ) | [static] |
Referenced by doIf().
| void XrdOucUtils::makeHome | ( | XrdSysError & | eDest, |
| const char * | inst | ||
| ) | [static] |
References MAKEDIR, pathMode, XrdSysError::Emsg(), and chdir().
Referenced by XrdConfig::Configure(), and XrdFrmConfig::Configure().
| int XrdOucUtils::makePath | ( | char * | path, |
| mode_t | mode | ||
| ) | [static] |
References stat(), index(), and MAKEDIR.
Referenced by XrdCmsConfig::PidFile(), XrdCnsConfig::Configure(), XrdCnsLogClient::Init(), XrdConfig::ASocket(), XrdFrcUtils::makePath(), XrdFrcUtils::makeQDir(), XrdNetSocket::socketPath(), XrdOfs::ConfigPosc(), XrdOssSys::Create(), XrdOssSys::Reloc(), XrdOssSys::Rename(), subLogfn(), XrdSecsssKT::Rewrite(), XrdXrootdProtocol::PidFile(), and XrdXrootdProtocol::xprep().
| bool XrdOucUtils::PidFile | ( | XrdSysError & | eDest, |
| const char * | path | ||
| ) | [static] |
References open(), XrdSysError::Emsg(), write(), snprintf, and close.
Referenced by XrdConfig::Configure(), and XrdFrmConfig::Configure().
| char * XrdOucUtils::subLogfn | ( | XrdSysError & | eDest, |
| const char * | inst, | ||
| char * | logfn | ||
| ) | [static] |
References S_IRWXU, S_IRWXG, S_IROTH, S_IXOTH, rindex, makePath(), and XrdSysError::Emsg().
Referenced by XrdConfig::Configure(), and XrdFrmConfig::Configure().
| void XrdOucUtils::Undercover | ( | XrdSysError & | eDest, |
| int | noLog, | ||
| int * | pipeFD = 0 |
||
| ) | [static] |
References XrdSysError::baseFD(), XrdSysError::Emsg(), fork(), close, read(), and open().
Referenced by XrdConfig::Configure(), and XrdFrmConfig::Configure().
| int XrdOucUtils::UserName | ( | uid_t | uID, |
| char * | uName, | ||
| int | uNsz | ||
| ) | [static] |
const mode_t XrdOucUtils::pathMode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH [static] |
Referenced by XrdCmsConfig::PidFile(), makeHome(), XrdXrootdProtocol::PidFile(), and XrdXrootdProtocol::xprep().
1.7.5