rpdutils.cxx File Reference

#include "RConfigure.h"
#include "RConfig.h"
#include <ctype.h>
#include <fcntl.h>
#include <pwd.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <netdb.h>
#include <math.h>
#include "snprintf.h"
#include <sys/statfs.h>
#include "rpdp.h"
#include "rsadef.h"
#include "rsalib.h"

Go to the source code of this file.

Namespaces

namespace  ROOT

Functions

static int setresgid (gid_t r, gid_t e, gid_t)
static int setresuid (uid_t r, uid_t e, uid_t)
static int ROOT::rpd_rand ()
static int ROOT::reads (int fd, char *buf, int len)
static int ROOT::rpdstrncasecmp (const char *str1, const char *str2, int n)
static int ROOT::rpdstrcasecmp (const char *str1, const char *str2)
static volatile void * ROOT::rpdmemset (volatile void *dst, int c, int len)
void ROOT::RpdSetSysLogFlag (int syslog)
void ROOT::RpdSetMethInitFlag (int methinit)
const char * ROOT::RpdGetKeyRoot ()
int ROOT::RpdGetClientProtocol ()
int ROOT::RpdGetAuthProtocol ()
int ROOT::RpdGetOffSet ()
int ROOT::RpdGetAuthMethod (int kind)
int ROOT::RpdDeleteKeyFile (int ofs)
int ROOT::RpdUpdateAuthTab (int opt, const char *line, char **token, int ilck=0)
int ROOT::RpdCleanupAuthTab (const char *crypttoken)
int ROOT::RpdCleanupAuthTab (const char *Host, int RemId, int OffSet)
int ROOT::RpdCheckAuthTab (int Sec, const char *User, const char *Host, int RemId, int *OffSet)
int ROOT::RpdCheckOffSet (int Sec, const char *User, const char *Host, int RemId, int *OffSet, char **tkn, int *shmid, char **glbsuser)
int ROOT::RpdRenameKeyFile (int oofs, int nofs)
bool ROOT::RpdCheckToken (char *tknin, char *tknref)
int ROOT::RpdReUseAuth (const char *sstr, int kind)
int ROOT::RpdCheckAuthAllow (int Sec, const char *Host)
int ROOT::RpdCheckHost (const char *Host, const char *host)
char * ROOT::RpdGetIP (const char *host)
void ROOT::RpdSendAuthList ()
int ROOT::RpdSshAuth (const char *sstr)
int ROOT::RpdKrb5Auth (const char *sstr)
int ROOT::RpdSRPUser (const char *user)
int ROOT::RpdCheckHostsEquiv (const char *host, const char *ruser, const char *user, int &errout)
int ROOT::RpdCheckSpecialPass (const char *passwd)
int ROOT::RpdPass (const char *pass, int errheq=0)
int ROOT::RpdGlobusInit ()
int ROOT::RpdGlobusAuth (const char *sstr)
int ROOT::RpdRfioAuth (const char *sstr)
void ROOT::RpdAuthCleanup (const char *sstr, int opt)
void ROOT::RpdInitAuth ()
void ROOT::RpdDefaultAuthAllow ()
int ROOT::RpdCheckDaemon (const char *daemon)
int ROOT::RpdCheckSshd (int opt)
int ROOT::RpdUser (const char *sstr)
int ROOT::RpdGuessClientProt (const char *buf, EMessageTypes kind)
char * ROOT::RpdGetRandString (int Opt, int Len)
int ROOT::RpdGetRSAKeys (const char *PubKey, int Opt)
int ROOT::RpdSavePubKey (const char *PubKey, int OffSet, char *User)
int ROOT::RpdSecureSend (char *Str)
int ROOT::RpdSecureRecv (char **Str)
int ROOT::RpdGenRSAKeys (int)
int ROOT::RpdRecvClientRSAKey ()
void ROOT::RpdInitRand ()
int ROOT::RpdAuthenticate ()
void ROOT::RpdFreeKeys ()
int ROOT::RpdProtocol (int)
int ROOT::RpdLogin (int, int)
int ROOT::RpdInitSession (int, std::string &, int &, int &, int &, std::string &)
int ROOT::RpdInitSession (int, std::string &, int &, int &, std::string &)
int ROOT::RpdInitSession (int, std::string &, int &)
int ROOT::RpdNoAuth (int)
int ROOT::RpdSetUid (int uid)
void ROOT::RpdInit (EService serv, int pid, int sproto, unsigned int opts, int rumsk, int sshp, const char *tmpd, const char *asrpp, int login=0)
int ROOT::SPrintf (char *buf, size_t size, const char *va_(fmt),...)
char * ROOT::ItoA (int i)
void ROOT::RpdSetErrorHandler (ErrorHandler_t Err, ErrorHandler_t Sys, ErrorHandler_t Fatal)
int ROOT::RpdRetrieveSpecialPass (const char *usr, const char *fpw, char *pwd, int lmx)

Variables

static ERootdErrors gUsrPwdErr [4][4]
int gDebug
ErrorHandler_t ROOT::gErrSys = 0
ErrorHandler_t ROOT::gErrFatal = 0
ErrorHandler_t ROOT::gErr = 0
bool ROOT::gSysLog = 0
std::string ROOT::gServName [3] = { "sockd", "rootd", "proofd" }
static const int ROOT::gAUTH_CLR_MSK = 0x1
static const int ROOT::gAUTH_SRP_MSK = 0x2
static const int ROOT::gAUTH_KRB_MSK = 0x4
static const int ROOT::gAUTH_GLB_MSK = 0x8
static const int ROOT::gAUTH_SSH_MSK = 0x10
static const int ROOT::gMAXTABSIZE = 50000000
static const std::string ROOT::gAuthMeth [kMAXSEC]
static const std::string ROOT::gAuthTab = "/rpdauthtab"
static const std::string ROOT::gDaemonRc = ".rootdaemonrc"
static const std::string ROOT::gRootdPass = ".rootdpass"
static const std::string ROOT::gSRootdPass = "/.srootdpass"
static const std::string ROOT::gKeyRoot = "/rpk."
static std::string ROOT::gTmpDir = "/tmp"
static int ROOT::gAuthProtocol = -1
static char ROOT::gBufOld [kMAXRECVBUF] = {0}
static bool ROOT::gCheckHostsEquiv = 1
static int ROOT::gClientOld = 0
static int ROOT::gClientProtocol = -1
static int ROOT::gCryptRequired = -1
static std::string ROOT::gCryptToken
static int ROOT::gAllowMeth [kMAXSEC]
static std::string ROOT::gAltSRPPass
static int ROOT::gAnon = 0
static int ROOT::gExistingAuth = 0
static int ROOT::gAuthListSent = 0
static int ROOT::gHaveMeth [kMAXSEC]
static EMessageTypes ROOT::gKindOld
static int ROOT::gMethInit = 0
static int ROOT::gNumAllow = -1
static int ROOT::gNumLeft = -1
static int ROOT::gOffSet = -1
static std::string ROOT::gOpenHost = "????"
static int ROOT::gParentId = -1
static char ROOT::gPasswd [kMAXUSERLEN] = { 0 }
static char ROOT::gPubKey [kMAXPATHLEN] = { 0 }
static int ROOT::gPubKeyLen = 0
static int ROOT::gRandInit = 0
static int ROOT::gRemPid = -1
static bool ROOT::gRequireAuth = 1
static int ROOT::gReUseAllow = 0x1F
static int ROOT::gReUseRequired = -1
static int ROOT::gDoLogin = 0
static std::string ROOT::gRpdAuthTab = std::string(gTmpDir).append(gAuthTab)
static std::string ROOT::gRpdKeyRoot = std::string(gTmpDir).append(gKeyRoot)
static rsa_NUMBER ROOT::gRSA_d
static rsa_NUMBER ROOT::gRSA_n
static int ROOT::gRSAInit = 0
static int ROOT::gRSAKey = 0
static rsa_KEY ROOT::gRSAPriKey
static rsa_KEY_export ROOT::gRSAPubExport [2] = {{0,0},{0,0}}
static rsa_KEY ROOT::gRSAPubKey
static int ROOT::gSaltRequired = -1
static int ROOT::gSec = -1
static int ROOT::gServerProtocol = -1
static EService ROOT::gService = kROOTD
static int ROOT::gSshdPort = 22
static int ROOT::gTriedMeth [kMAXSEC]
static char ROOT::gUser [64] = { 0 }
static char * ROOT::gUserAllow [kMAXSEC] = { 0 }
static unsigned int ROOT::gUserAlwLen [kMAXSEC] = { 0 }
static unsigned int ROOT::gUserIgnLen [kMAXSEC] = { 0 }
static char * ROOT::gUserIgnore [kMAXSEC] = { 0 }


Function Documentation

static int setresgid ( gid_t  r,
gid_t  e,
gid_t   
) [static]

Definition at line 213 of file rpdutils.cxx.

Referenced by XrdSysPriv::ChangePerm(), XrdSysPriv::ChangeTo(), main(), XrdSysPriv::Restore(), ROOT::RpdAuthCleanup(), ROOT::RpdLogin(), ROOT::RpdRetrieveSpecialPass(), and ROOT::RpdSetUid().

static int setresuid ( uid_t  r,
uid_t  e,
uid_t   
) [static]

Definition at line 220 of file rpdutils.cxx.

Referenced by XrdSysPriv::ChangePerm(), XrdSysPriv::ChangeTo(), main(), XrdSysPriv::Restore(), ROOT::RpdAuthCleanup(), ROOT::RpdCheckOffSet(), ROOT::RpdKrb5Auth(), ROOT::RpdLogin(), ROOT::RpdRetrieveSpecialPass(), and ROOT::RpdSetUid().


Variable Documentation

int gDebug

Definition at line 169 of file Rtypes.h.

ERootdErrors gUsrPwdErr[4][4] [static]

Initial value:

Definition at line 183 of file rpdutils.cxx.

Referenced by ROOT::RpdPass(), and ROOT::RpdUser().


Generated on Tue Jul 5 16:07:59 2011 for ROOT_528-00b_version by  doxygen 1.5.1