#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 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 160 of file XrdOucUtils.hh.
|
inline |
Definition at line 161 of file XrdOucUtils.hh.
|
static |
Definition at line 127 of file XrdOucUtils.cc.
Referenced by XrdOucProg::Setup().
|
static |
Definition at line 166 of file XrdOucUtils.cc.
Referenced by XrdOssMio::Map().
|
static |
Definition at line 279 of file XrdOucUtils.cc.
References eDest, XrdOucEnv::Get(), is1of(), and XrdNetUtils::Match().
Referenced by main().
|
static |
Definition at line 231 of file XrdOucUtils.cc.
Referenced by XrdBwmFile::open().
|
static |
Definition at line 245 of file XrdOucUtils.cc.
References strlcpy(), and XrdSysE2T().
|
static |
Definition at line 402 of file XrdOucUtils.cc.
References XrdOucString::c_str(), Stat, stat, and XrdOucString::tokenize().
Referenced by XrdNetPMarkCfg::Parse().
|
static |
Definition at line 438 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 461 of file XrdOucUtils.cc.
Referenced by getSizeStr().
|
static |
Definition at line 523 of file XrdOucUtils.cc.
|
static |
Definition at line 505 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 544 of file XrdOucUtils.cc.
References close, ENODATA, fstat, open, read, Stat, and stat.
|
static |
Definition at line 601 of file XrdOucUtils.cc.
Referenced by XrdSecProtocolsss::Authenticate().
|
static |
Definition at line 1520 of file XrdOucUtils.cc.
References stat.
Referenced by XrdTlsContext::XrdTlsContext(), and XrdTlsContext::newHostCertificateDetected().
|
static |
Definition at line 617 of file XrdOucUtils.cc.
Referenced by XrdSecProtocolsss::Authenticate().
|
static |
Definition at line 635 of file XrdOucUtils.cc.
|
static |
Definition at line 684 of file XrdOucUtils.cc.
Referenced by XrdSecProtocolunix::getCredentials().
|
static |
Definition at line 186 of file XrdOucUtils.cc.
|
static |
Definition at line 721 of file XrdOucUtils.cc.
|
static |
Definition at line 752 of file XrdOucUtils.cc.
|
static |
Definition at line 821 of file XrdOucUtils.cc.
References UserName().
Referenced by XrdFrmMonitor::Init(), and XrdXrootdMonitor::Init().
|
static |
Definition at line 868 of file XrdOucUtils.cc.
|
static |
Definition at line 851 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 877 of file XrdOucUtils.cc.
Referenced by doIf().
|
static |
Definition at line 889 of file XrdOucUtils.cc.
References XrdNetUtils::Parse().
|
static |
Definition at line 952 of file XrdOucUtils.cc.
References SHFT.
|
static |
Definition at line 937 of file XrdOucUtils.cc.
References SHFT.
Referenced by XrdBuffXL::Init(), XrdBuffManager::Obtain(), XrdBuffXL::Obtain(), XrdBuffManager::Recalc(), and XrdBuffXL::Recalc().
|
static |
Definition at line 969 of file XrdOucUtils.cc.
References chdir, eDest, MAKEDIR, and pathMode.
Referenced by XrdConfig::Configure(), XrdFrmConfig::Configure(), and makeHome().
|
static |
Definition at line 987 of file XrdOucUtils.cc.
References chdir, eDest, makeHome(), and makePath().
|
static |
Definition at line 1036 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 1067 of file XrdOucUtils.cc.
|
static |
Definition at line 1158 of file XrdOucUtils.cc.
References eDest.
|
static |
Definition at line 1108 of file XrdOucUtils.cc.
References eDest.
|
static |
Definition at line 1495 of file XrdOucUtils.cc.
References close, eDest, open, and write.
Referenced by XrdFrmConfig::Configure().
|
static |
Definition at line 1194 of file XrdOucUtils.cc.
References makePath(), and unlink.
|
static |
Definition at line 1218 of file XrdOucUtils.cc.
|
static |
Definition at line 1240 of file XrdOucUtils.cc.
References eDest, and makePath().
Referenced by XrdOucLogging::configLog(), and XrdFrmConfig::Configure().
|
static |
Definition at line 1281 of file XrdOucUtils.cc.
|
static |
Definition at line 1268 of file XrdOucUtils.cc.
Referenced by XrdCksManager::Config(), XrdOfsConfigPI::DefaultCS(), getMyFQN(), XrdNetUtils::NetConfig(), and XrdCksConfig::ParseLib().
|
static |
Definition at line 1550 of file XrdOucUtils.cc.
References ec.
Referenced by XrdHttpHeaderUtils::parseWantReprDigest().
|
static |
Definition at line 1529 of file XrdOucUtils.cc.
Referenced by XrdHttpCorsHandler::addAllowedOrigin(), XrdHttpReadRangeHandler::Configure(), XrdHttpHeaderUtils::parseReprDigest(), XrdHttpHeaderUtils::parseWantReprDigest(), and trim().
|
static |
Definition at line 1539 of file XrdOucUtils.cc.
|
static |
Definition at line 1399 of file XrdOucUtils.cc.
|
static |
Definition at line 1325 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 1669 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 1635 of file XrdOucUtils.cc.
References is_rfc3986_unreserved().
|
static |
Definition at line 1438 of file XrdOucUtils.cc.
Referenced by XrdPfc::Cache::Config(), XrdSecProtocolunix::getCredentials(), and Ident().
|
static |
Definition at line 1462 of file XrdOucUtils.cc.
References stat, and XrdSysE2T().
Referenced by XrdCl::InitTLS().
|
static |
Definition at line 48 of file XrdOucUtils.hh.
Referenced by makeHome().