#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include "Rtypes.h"
#include "Varargs.h"
#include "DaemonUtils.h"
#include "TAuthenticate.h"
#include "TSecContext.h"
#include "TEnv.h"
#include "TROOT.h"
Go to the source code of this file.
Namespaces | |
namespace | ROOT |
Functions | |
Int_t | SrvAuthenticate (TSocket *socket, const char *confdir, const char *tmpdir, string &user, Int_t &meth, Int_t &type, string &ctkn, TSeqCollection *secctxlist) |
Int_t | SrvAuthCleanup (TSeqCollection *sls) |
static Int_t | SrvSetVars (string confdir) |
void | Err (int level, const char *msg, int size) |
void | ErrFatal (int level, const char *msg, int size) |
void | ErrSys (int level, const char *msg, int size) |
Int_t | SrvClupImpl (TSeqCollection *secls) |
Int_t | SrvAuthImpl (TSocket *socket, const char *confdir, const char *tmpdir, string &user, Int_t &meth, Int_t &type, string &ctoken, TSeqCollection *secctxlist) |
void | ROOT::SrvSetSocket (TSocket *socket) |
static int | ROOT::Recvn (int sock, void *buffer, int length) |
void | ROOT::NetClose () |
int | ROOT::NetGetSockFd () |
int | ROOT::NetParOpen (int port, int size) |
int | ROOT::NetRecv (char *msg, int max) |
int | ROOT::NetRecv (char *msg, int len, EMessageTypes &kind) |
int | ROOT::NetRecv (void *&buf, int &len, EMessageTypes &kind) |
int | ROOT::NetRecvRaw (void *buf, int len) |
int | ROOT::NetRecvRaw (int sock, void *buf, int len) |
int | ROOT::NetSend (int code, EMessageTypes kind) |
int | ROOT::NetSend (const char *msg, EMessageTypes kind) |
int | ROOT::NetSend (const void *buf, int len, EMessageTypes kind) |
int | ROOT::NetSendAck () |
int | ROOT::NetSendError (ERootdErrors err) |
int | ROOT::NetSendRaw (const void *buf, int len) |
void | ROOT::NetGetRemoteHost (std::string &openhost) |
int | ROOT::GetErrno () |
void | ROOT::ResetErrno () |
void | ROOT::Perror (char *buf, int size) |
void | ROOT::ErrorInfo (const char *va_(fmt),...) |
void | ROOT::Error (ErrorHandler_t ErrHand, int code, const char *va_(fmt),...) |
Variables | |
static TSocket * | gSocket |
static Int_t | gSrvProtocol = 1 |
static EService | gService = kSOCKD |
static Int_t | gReuseAllow = 0x1F |
static int | ROOT::gSockFd = -1 |
void Err | ( | int | level, | |
const char * | msg, | |||
int | size | |||
) |
Definition at line 175 of file DaemonUtils.cxx.
References kROOTD_ERR, ROOT::NetSend(), and ROOT::Perror().
void ErrFatal | ( | int | level, | |
const char * | msg, | |||
int | size | |||
) |
Definition at line 182 of file DaemonUtils.cxx.
References kMESS_STRING, ROOT::NetSend(), and ROOT::Perror().
Referenced by ErrSys(), main(), RootdExpandPathName(), RootdGet(), RootdGetFile(), RootdGets(), RootdLoop(), RootdOpen(), RootdParallel(), RootdPut(), RootdPutFile(), and SrvAuthImpl().
void ErrSys | ( | int | level, | |
const char * | msg, | |||
int | size | |||
) |
Definition at line 189 of file DaemonUtils.cxx.
References ErrFatal(), and ROOT::Perror().
Referenced by main(), RootdCheckTab(), RootdExpandPathName(), RootdFlush(), RootdGet(), RootdGets(), RootdOpen(), RootdPut(), RootdPutFile(), and SrvAuthImpl().
Int_t SrvAuthCleanup | ( | TSeqCollection * | sls | ) |
Int_t SrvAuthImpl | ( | TSocket * | socket, | |
const char * | confdir, | |||
const char * | tmpdir, | |||
string & | user, | |||
Int_t & | meth, | |||
Int_t & | type, | |||
string & | ctoken, | |||
TSeqCollection * | secctxlist | |||
) |
Definition at line 213 of file DaemonUtils.cxx.
References TSeqCollection::Add(), Err, ErrFatal(), ROOT::ErrorInfo(), ErrSys(), gDebug, gEnv, TSecContext::GetHost(), TInetAddress::GetHostName(), TSecContext::GetID(), TSocket::GetInetAddress(), TROOT::GetListOfSecContexts(), TSecContext::GetMethod(), TSecContext::GetUser(), TEnv::GetValue(), gReuseAllow, gROOT, gService, gSrvProtocol, kDMN_HOSTEQ, kDMN_RQAUTH, ROOT::RpdGenRSAKeys(), ROOT::RpdInit(), ROOT::RpdInitSession(), ROOT::RpdSetErrorHandler(), ROOT::RpdSetMethInitFlag(), TSocket::SetSecContext(), ROOT::SrvSetSocket(), and SrvSetVars().
Int_t SrvClupImpl | ( | TSeqCollection * | secls | ) |
Definition at line 196 of file DaemonUtils.cxx.
References ROOT::ErrorInfo(), gDebug, TSecContext::GetID(), TSecContext::GetToken(), and ROOT::RpdCleanupAuthTab().
Definition at line 92 of file DaemonUtils.cxx.
References gEnv, TEnv::GetValue(), len, putenv, and snprintf.
Referenced by SrvAuthImpl().
Int_t gReuseAllow = 0x1F [static] |
Definition at line 64 of file DaemonUtils.cxx.
Referenced by ROOT::NetGetRemoteHost(), ROOT::NetRecv(), ROOT::NetRecvRaw(), ROOT::NetSend(), ROOT::NetSendRaw(), and ROOT::SrvSetSocket().
Int_t gSrvProtocol = 1 [static] |