#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <netinet/in.h>
#include <time.h>
#include <pwd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <XrdSys/XrdSysLogger.hh>
#include <XrdSys/XrdSysError.hh>
#include <XrdOuc/XrdOucString.hh>
#include <XrdSut/XrdSutAux.hh>
#include <XrdSut/XrdSutTrace.hh>
Go to the source code of this file.
Functions | |
void | XrdSutSetTrace (kXR_int32 trace) |
const char * | XrdSutBuckStr (int kbck) |
volatile void * | XrdSutMemSet (volatile void *dst, int c, int len) |
int | XrdSutGetPass (const char *prompt, XrdOucString &passwd) |
int | XrdSutGetLine (XrdOucString &line, const char *prompt) |
bool | XrdSutAskConfirm (const char *msg1, bool defact, const char *msg2) |
int | XrdSutToHex (const char *in, int lin, char *out) |
int | XrdSutFromHex (const char *in, char *out, int &lout) |
int | XrdSutTimeString (int t, char *st, int opt) |
int | XrdSutExpand (XrdOucString &path) |
int | XrdSutResolve (XrdOucString &path, const char *ho, const char *vo, const char *gr, const char *us) |
const char * | XrdSutHome () |
int | XrdSutMkdir (const char *dir, unsigned int mode, const char *opt) |
int | XrdSutParseTime (const char *tstr, int opt) |
Variables | |
const char * | XrdSutAuxCVSID = "$Id: XrdSutAux.cc 31508 2009-12-02 19:11:01Z brun $" |
static const char * | gXRSBucketTypes [] |
static XrdSysLogger | Logger |
static XrdSysError | eDest (0,"sut_") |
XrdOucTrace * | sutTrace = 0 |
bool XrdSutAskConfirm | ( | const char * | msg1, | |
bool | defact, | |||
const char * | msg2 | |||
) |
Definition at line 193 of file XrdSutAux.cc.
References XrdOucString::c_str(), XrdOucString::insert(), XrdOucString::length(), XrdOucString::lower(), and XrdSutGetLine().
const char* XrdSutBuckStr | ( | int | kbck | ) |
Definition at line 105 of file XrdSutAux.cc.
References gXRSBucketTypes, kXRS_cryptomod, and kXRS_reserved.
Referenced by XrdSecProtocolgsi::AddSerialized(), XrdSecProtocolpwd::AddSerialized(), XrdSecProtocolgsi::Authenticate(), XrdSutBucket::Dump(), XrdSecProtocolgsi::getCredentials(), XrdSecProtocolpwd::getCredentials(), XrdSutBuffer::MarshalBucket(), XrdSutBuffer::UnmarshalBucket(), and XrdSutBuffer::XrdSutBuffer().
int XrdSutExpand | ( | XrdOucString & | path | ) |
Definition at line 346 of file XrdSutAux.cc.
References XrdOucString::assign(), XrdOucString::c_str(), DEBUG, EPNAME, XrdOucString::erase(), XrdOucString::find(), getenv(), XrdOucString::insert(), XrdOucString::length(), pwd(), STR_NPOS, and XrdSutHome().
Referenced by XrdSecProtocolpwd::Init(), XrdSecProtocolgsi::Init(), ParseArguments(), and XrdSutMkdir().
int XrdSutFromHex | ( | const char * | in, | |
char * | out, | |||
int & | lout | |||
) |
Definition at line 254 of file XrdSutAux.cc.
Referenced by XrdCryptolocalCipher::Finalize(), XrdCryptoBasic::FromHex(), XrdSecProtocolpwd::QueryCreds(), XrdProofdProofServMgr::SaveAFSkey(), and XrdCryptolocalCipher::XrdCryptolocalCipher().
int XrdSutGetLine | ( | XrdOucString & | line, | |
const char * | prompt | |||
) |
Definition at line 169 of file XrdSutAux.cc.
References line, and XrdSutMAXBUF.
Referenced by AskConfirm(), XrdSecProtocolpwd::GetUserHost(), main(), and XrdSutAskConfirm().
int XrdSutGetPass | ( | const char * | prompt, | |
XrdOucString & | passwd | |||
) |
Definition at line 140 of file XrdSutAux.cc.
References DEBUG, EPNAME, i, k, len, x20, and XrdSutMemSet().
Referenced by AddPassword(), and XrdSecProtocolpwd::QueryCreds().
const char* XrdSutHome | ( | ) |
Definition at line 437 of file XrdSutAux.cc.
References XrdOucString::c_str(), DEBUG, EPNAME, getenv(), and XrdOucString::length().
Referenced by XrdSecProtocolpwd::Init(), XrdSecProtocolgsi::Init(), ParseArguments(), and XrdSutExpand().
volatile void* XrdSutMemSet | ( | volatile void * | dst, | |
int | c, | |||
int | len | |||
) |
int XrdSutMkdir | ( | const char * | dir, | |
unsigned int | mode, | |||
const char * | opt | |||
) |
Definition at line 464 of file XrdSutAux.cc.
References XrdOucString::append(), XrdOucString::find(), XrdOucString::length(), mkdir, pd, stat, and XrdSutExpand().
Referenced by XrdSecProtocolpwd::Init(), SavePasswd(), and SavePuk().
int XrdSutParseTime | ( | const char * | tstr, | |
int | opt | |||
) |
Definition at line 511 of file XrdSutAux.cc.
References XrdOucString::assign(), XrdOucString::c_str(), DEBUG, EPNAME, XrdOucString::erase(), i, XrdOucString::length(), ls(), ts, and u.
Referenced by XrdSecProtocolgsi::InitProxy(), main(), and XrdSecProtocolpwdInit().
int XrdSutResolve | ( | XrdOucString & | path, | |
const char * | ho, | |||
const char * | vo, | |||
const char * | gr, | |||
const char * | us | |||
) |
Definition at line 404 of file XrdSutAux.cc.
References XrdOucString::find(), XrdOucString::length(), XrdOucString::replace(), and STR_NPOS.
Referenced by XrdSecProtocolgsi::ClientDoInit(), XrdSecProtocolpwd::ExportCreds(), XrdSecProtocolpwd::QueryNetRc(), and XrdSecProtocolgsi::ServerDoSigpxy().
void XrdSutSetTrace | ( | kXR_int32 | trace | ) |
Definition at line 77 of file XrdSutAux.cc.
References eDest, Logger, XrdSysError::logger(), sutTrace, sutTRACE_ALL, sutTRACE_Debug, sutTRACE_Dump, sutTRACE_Notify, and XrdOucTrace::What.
Referenced by XrdSecProtocolpwd::Init(), XrdSecProtocolgsi::Init(), and main().
int XrdSutTimeString | ( | int | t, | |
char * | st, | |||
int | opt | |||
) |
Definition at line 291 of file XrdSutAux.cc.
References i, localtime_r, sprintf(), and x20.
Referenced by XrdSutPFEntry::AsString(), XrdSutPFile::Browse(), XrdSutCache::Dump(), and SavePuk().
int XrdSutToHex | ( | const char * | in, | |
int | lin, | |||
char * | out | |||
) |
Definition at line 225 of file XrdSutAux.cc.
Referenced by XrdCryptoBasic::AsHexString(), XrdSecProtocolpwd::Authenticate(), main(), and XrdCryptolocalCipher::Public().
XrdSysError eDest(0,"sut_") [static] |
const char* gXRSBucketTypes[] [static] |
XrdSysLogger Logger [static] |
Definition at line 69 of file XrdSutAux.cc.
XrdOucTrace* sutTrace = 0 |
const char* XrdSutAuxCVSID = "$Id: XrdSutAux.cc 31508 2009-12-02 19:11:01Z brun $" |
Definition at line 3 of file XrdSutAux.cc.