#include <XrdOucUtils.hh>
Public Member Functions | |
| XrdOucUtils () | |
| ~XrdOucUtils () | |
Static Public Member Functions | |
| static int | argList (char *args, char **argV, int argC) |
| static char * | bin2hex (char *inbuff, int dlen, char *buff, int blen, bool sep=true) |
| static int | doIf (XrdSysError *eDest, XrdOucStream &Config, const char *what, const char *hname, const char *nname, const char *pname) |
| static bool | endsWith (const char *text, const char *ending, int endlen) |
| static char * | eText (int rc, char *eBuff, int eBlen) |
| static bool | findPgm (const char *pgm, XrdOucString &path) |
| static int | fmtBytes (long long val, char *buff, int bsz) |
| static std::string | genHumanSize (size_t size, uint64_t base) |
| static int | genPath (char *buff, int blen, const char *path, const char *psfx=0) |
| static char * | genPath (const char *path, const char *inst, const char *psfx=0) |
| static char * | getFile (const char *path, int &rc, int maxsz=10240, bool notempty=true) |
| static bool | getGID (const char *gName, gid_t &gID) |
| static int | getModificationTime (const char *path, time_t &modificationTime) |
| static bool | getUID (const char *uName, uid_t &uID, gid_t *gID=0) |
| static int | GidName (gid_t gID, char *gName, int gNsz, time_t keepT=0) |
| static int | GroupName (gid_t gID, char *gName, int gNsz) |
| static int | hex2bin (const char *hex, char *bin, int size) |
| static const char * | HSize (size_t bytes, char *buff, int bsz) |
| static const char * | i2bstr (char *buff, int blen, int val, bool pad=false) |
| static char * | Ident (long long &mySID, char *iBuff, int iBlen, const char *iHost, const char *iProg, const char *iName, int Port) |
| static const char * | InstName (const char *name, int Fillit=1) |
| static const char * | InstName (int TranOpt=0) |
| static int | is1of (char *val, const char **clist) |
| static int | isFWD (const char *path, int *port=0, char *hBuff=0, int hBLen=0, bool pTrim=false) |
| static int | Log10 (unsigned long long n) |
| static int | Log2 (unsigned long long n) |
| static void | makeHome (XrdSysError &eDest, const char *inst) |
| static bool | makeHome (XrdSysError &eDest, const char *inst, const char *path, mode_t mode) |
| static int | makePath (char *path, mode_t mode, bool reset=false) |
| static bool | mode2mask (const char *mode, mode_t &mask) |
| static char * | parseHome (XrdSysError &eDest, XrdOucStream &Config, int &mode) |
| static bool | parseLib (XrdSysError &eDest, XrdOucStream &Config, const char *libName, char *&path, char **libparm) |
| static bool | PidFile (XrdSysError &eDest, const char *path) |
| static void | Random (unsigned char *buff, unsigned int inblen) |
| static int | ReLink (const char *path, const char *target, mode_t mode=0) |
| static void | Sanitize (char *instr, char subc='_') |
| static char * | subLogfn (XrdSysError &eDest, const char *inst, char *logfn) |
| static int | Token (const char **str, char delim, char *buff, int bsz) |
| static void | toLower (char *str) |
| static uint8_t | touint8_t (const std::string_view sv) |
| static void | trim (std::string &str) |
| static void | trim (std::string_view &sv) |
| static int | UidName (uid_t uID, char *uName, int uNsz, time_t keepT=0) |
| static void | Undercover (XrdSysError &eDest, int noLog, int *pipeFD=0) |
| static std::string | UrlDecode (const std::string &input) |
| static std::string | UrlEncode (const std::string &input) |
| static int | UserName (uid_t uID, char *uName, int uNsz) |
| static const char * | ValPath (const char *path, mode_t allow, bool isdir) |
Static Public Attributes | |
| static const mode_t | pathMode = S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH |
Definition at line 44 of file XrdOucUtils.hh.
|
inline |
Definition at line 162 of file XrdOucUtils.hh.
|
inline |
Definition at line 163 of file XrdOucUtils.hh.
|
static |
Definition at line 128 of file XrdOucUtils.cc.
Referenced by XrdOucProg::Setup().
|
static |
Definition at line 167 of file XrdOucUtils.cc.
Referenced by XrdOssMio::Map().
|
static |
Definition at line 280 of file XrdOucUtils.cc.
References eDest, XrdOucEnv::Get(), is1of(), and XrdNetUtils::Match().
Referenced by main().
|
static |
Definition at line 232 of file XrdOucUtils.cc.
Referenced by XrdBwmFile::open().
|
static |
Definition at line 246 of file XrdOucUtils.cc.
References strlcpy(), and XrdSysE2T().
|
static |
Definition at line 403 of file XrdOucUtils.cc.
References XrdOucString::c_str(), Stat, stat, and XrdOucString::tokenize().
Referenced by XrdNetPMarkCfg::Parse().
|
static |
Definition at line 439 of file XrdOucUtils.cc.
Referenced by XrdFrmPurge::Display().
|
static |
Generates Human-readable size string (1.1K, 1.0M, ...)
| size | the size of the file |
| base | either 1024 or 1000 |
Definition at line 462 of file XrdOucUtils.cc.
Referenced by getSizeStr().
|
static |
Definition at line 524 of file XrdOucUtils.cc.
|
static |
Definition at line 506 of file XrdOucUtils.cc.
References strlcpy().
Referenced by XrdNetCmsNotify::XrdNetCmsNotify(), XrdCmsClientConfig::Configure(), XrdXrootdProtocol::Configure(), XrdCmsConfig::Configure0(), XrdCmsConfig::Configure2(), XrdOfsConfigCP::Init(), and XrdFrcUtils::makePath().
|
static |
Definition at line 545 of file XrdOucUtils.cc.
References close, ENODATA, fstat, open, read, Stat, and stat.
|
static |
Definition at line 602 of file XrdOucUtils.cc.
Referenced by XrdSecProtocolsss::Authenticate().
|
static |
Definition at line 1539 of file XrdOucUtils.cc.
References stat.
Referenced by XrdTlsContext::XrdTlsContext(), and XrdTlsContext::newHostCertificateDetected().
|
static |
Definition at line 618 of file XrdOucUtils.cc.
Referenced by XrdSecProtocolsss::Authenticate().
|
static |
Definition at line 636 of file XrdOucUtils.cc.
|
static |
Definition at line 685 of file XrdOucUtils.cc.
Referenced by XrdSecProtocolunix::getCredentials().
|
static |
Definition at line 187 of file XrdOucUtils.cc.
|
static |
Definition at line 722 of file XrdOucUtils.cc.
|
static |
Definition at line 753 of file XrdOucUtils.cc.
|
static |
Definition at line 822 of file XrdOucUtils.cc.
References UserName().
Referenced by XrdFrmMonitor::Init(), and XrdXrootdMonitor::Init().
|
static |
Definition at line 869 of file XrdOucUtils.cc.
|
static |
Definition at line 852 of file XrdOucUtils.cc.
Referenced by XrdFrcProxy::XrdFrcProxy(), XrdFrmConfig::XrdFrmConfig(), XrdNetCmsNotify::XrdNetCmsNotify(), XrdSsiSfsConfig::XrdSsiSfsConfig(), XrdOssSys::ConfigStage(), XrdCmsClientConfig::Configure(), XrdConfig::Configure(), XrdFrmConfig::Configure(), XrdCmsConfig::Configure0(), XrdCmsConfig::Configure1(), XrdOfsConfigCP::Init(), XrdOssSpace::Init(), main(), and XrdFrcReqAgent::Start().
|
static |
Definition at line 878 of file XrdOucUtils.cc.
Referenced by doIf().
|
static |
Definition at line 890 of file XrdOucUtils.cc.
References XrdNetUtils::Parse().
|
static |
Definition at line 953 of file XrdOucUtils.cc.
References SHFT.
|
static |
Definition at line 938 of file XrdOucUtils.cc.
References SHFT.
Referenced by XrdBuffXL::Init(), XrdBuffManager::Obtain(), XrdBuffXL::Obtain(), XrdBuffManager::Recalc(), and XrdBuffXL::Recalc().
|
static |
Definition at line 970 of file XrdOucUtils.cc.
References chdir, eDest, MAKEDIR, and pathMode.
Referenced by XrdConfig::Configure(), XrdFrmConfig::Configure(), and makeHome().
|
static |
Definition at line 988 of file XrdOucUtils.cc.
References chdir, eDest, makeHome(), and makePath().
|
static |
Definition at line 1037 of file XrdOucUtils.cc.
References CHMOD, MAKEDIR, and stat.
Referenced by XrdOssArcBackup::XrdOssArcBackup(), XrdOssArcBackupTask::BkpXeq(), XrdOssArcConfig::BuildPath(), XrdOssArcConfig::Configure(), XrdOssSys::Create(), XrdOfsConfigCP::Init(), makeHome(), XrdFrcUtils::makePath(), XrdFrcUtils::makeQDir(), ReLink(), XrdOssSys::Reloc(), XrdOssSys::Rename(), XrdSecsssKT::Rewrite(), XrdNetSocket::socketPath(), and subLogfn().
|
static |
Definition at line 1068 of file XrdOucUtils.cc.
|
static |
Definition at line 1159 of file XrdOucUtils.cc.
References eDest.
|
static |
Definition at line 1109 of file XrdOucUtils.cc.
References eDest.
|
static |
Definition at line 1514 of file XrdOucUtils.cc.
References close, eDest, open, and write.
Referenced by XrdFrmConfig::Configure().
|
static |
Definition at line 1194 of file XrdOucUtils.cc.
Referenced by XrdCryptoLite_BFecb::XrdCryptoLite_BFecb().
|
static |
Definition at line 1213 of file XrdOucUtils.cc.
References makePath(), and unlink.
|
static |
Definition at line 1237 of file XrdOucUtils.cc.
|
static |
Definition at line 1259 of file XrdOucUtils.cc.
References eDest, and makePath().
Referenced by XrdOucLogging::configLog(), and XrdFrmConfig::Configure().
|
static |
Definition at line 1300 of file XrdOucUtils.cc.
|
static |
Definition at line 1287 of file XrdOucUtils.cc.
Referenced by XrdCksManager::Config(), XrdOfsConfigPI::DefaultCS(), getMyFQN(), XrdNetUtils::NetConfig(), and XrdCksConfig::ParseLib().
|
static |
Definition at line 1569 of file XrdOucUtils.cc.
References ec.
Referenced by XrdHttpHeaderUtils::parseWantReprDigest().
|
static |
Definition at line 1548 of file XrdOucUtils.cc.
Referenced by XrdHttpCorsHandler::addAllowedOrigin(), XrdHttpReadRangeHandler::Configure(), XrdHttpHeaderUtils::parseReprDigest(), XrdHttpHeaderUtils::parseTransferEncoding(), XrdHttpHeaderUtils::parseWantReprDigest(), and trim().
|
static |
Definition at line 1558 of file XrdOucUtils.cc.
|
static |
Definition at line 1418 of file XrdOucUtils.cc.
|
static |
Definition at line 1344 of file XrdOucUtils.cc.
References close, eDest, open, and read.
Referenced by XrdConfig::Configure(), and XrdFrmConfig::Configure().
|
static |
This function takes a string and returns the URL decoded string (rfc3986), also decoding + as ' ' (common in HTML form encoding).
| input | the URL encoded string |
Definition at line 1688 of file XrdOucUtils.cc.
References from_hex().
Referenced by XrdOssSys::Create().
|
static |
This function takes a string and returns the URL encoded string (rfc3986).
| input | the string to be encoded |
Definition at line 1654 of file XrdOucUtils.cc.
References is_rfc3986_unreserved().
|
static |
Definition at line 1457 of file XrdOucUtils.cc.
Referenced by XrdPfc::Cache::Config(), XrdSecProtocolunix::getCredentials(), and Ident().
|
static |
Definition at line 1481 of file XrdOucUtils.cc.
References stat, and XrdSysE2T().
Referenced by XrdCl::InitTLS().
|
static |
Definition at line 48 of file XrdOucUtils.hh.
Referenced by makeHome().