Logo ROOT   6.12/07
Reference Guide
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdProofdClientMgr Class Reference

Definition at line 48 of file XrdProofdClientMgr.h.

Public Types

enum  CMProtocol { kClientDisconnect = 0 }
 

Public Member Functions

 XrdProofdClientMgr (XrdProofdManager *mgr, XrdProtocol_Config *pi, XrdSysError *e)
 Constructor. More...
 
virtual ~XrdProofdClientMgr ()
 
int Auth (XrdProofdProtocol *xp)
 Analyse client authentication info. More...
 
void Broadcast (XrdProofdClient *c, const char *msg)
 Broadcast message 'msg' to the connected instances of client 'clnt' or to all connected instances if clnt == 0. More...
 
int CheckClients ()
 Regular checks of the client admin path; run by the cron job. More...
 
int CheckFrequency () const
 
int Config (bool rcf=0)
 Run configuration and parse the entered config directives. More...
 
int DoDirective (XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
 Update the priorities of the active sessions. More...
 
XrdProofdClientGetClient (const char *usr, const char *grp=0, bool create=1)
 Handle request for localizing a client instance for {usr, grp} from the list. More...
 
int GetNClients () const
 
int Login (XrdProofdProtocol *xp)
 Process a login request. More...
 
XrdProofdPipePipe ()
 
int Process (XrdProofdProtocol *p)
 
void TerminateSessions (XrdProofdClient *c, const char *msg, int srvtype)
 Terminate sessions of client 'clnt' or to of all clients if clnt == 0. More...
 
- Public Member Functions inherited from XrdProofdConfig
 XrdProofdConfig (const char *cfg=0, XrdSysError *edest=0)
 Main constructor. More...
 
virtual ~XrdProofdConfig ()
 
const char * CfgFile () const
 
void SetCfgEDest (const char *cfg, XrdSysError *edest)
 Set config file and error handler. More...
 

Private Member Functions

int CheckAdminPath (XrdProofdProtocol *p, XrdOucString &cidpath, XrdOucString &emsg)
 Check the old-clients admin for an existing entry for this client and read the client ID;. More...
 
int CheckClient (XrdProofdProtocol *p, const char *user, XrdOucString &emsg)
 Perform checks on the client username. More...
 
int CreateAdminPath (XrdProofdProtocol *p, XrdOucString &path, XrdOucString &e)
 Create the client directory in the admin path. More...
 
int DoDirectiveClientMgr (char *, XrdOucStream *, bool)
 Process 'clientmgr' directive eg: xpd.clientmgr checkfq:120 activityto:600. More...
 
char * FilterSecConfig (int &nd)
 Grep directives of the form "xpd.sec...", "sec.protparm" and "sec.protocol" from file 'cfn' and save them in a temporary file, stripping off the prefix "xpd." when needed. More...
 
XrdSecService * LoadSecurity ()
 Load security framework and plugins, if not already done. More...
 
int MapClient (XrdProofdProtocol *xp, bool all=1)
 Process a login request. More...
 
int ParsePreviousClients (XrdOucString &emsg)
 Client entries for the clients still connected when the daemon terminated. More...
 
void RegisterDirectives ()
 Register directives for configuration. More...
 
int RestoreAdminPath (XrdOucString &cpath, XrdOucString &emsg)
 

Private Attributes

int fActivityTimeOut
 
int fCheckFrequency
 
XrdSecService * fCIA
 
XrdOucString fClntAdminPath
 
XrdProofdManagerfMgr
 
XrdSysRecMutexfMutex
 
int fNDisconnected
 
XrdProofdPipe fPipe
 
std::list< XrdProofdClient * > fProofdClients
 
int fReconnectTimeOut
 
XrdOucString fSecLib
 
XrdSysPluginfSecPlugin
 

Additional Inherited Members

- Protected Member Functions inherited from XrdProofdConfig
int ParseFile (bool rcf=false)
 Parse config file for the registered directives. More...
 
bool ReadFile (bool update=true)
 Return true if the file has never been read or did change since last reading, false otherwise. More...
 
void Register (const char *dname, XrdProofdDirective *d)
 
- Protected Attributes inherited from XrdProofdConfig
XrdSysErrorfEDest
 

#include <XrdProofdClientMgr.h>

Inheritance diagram for XrdProofdClientMgr:
[legend]

Member Enumeration Documentation

◆ CMProtocol

Enumerator
kClientDisconnect 

Definition at line 87 of file XrdProofdClientMgr.h.

Constructor & Destructor Documentation

◆ XrdProofdClientMgr()

XrdProofdClientMgr::XrdProofdClientMgr ( XrdProofdManager mgr,
XrdProtocol_Config *  pi,
XrdSysError e 
)

Constructor.

Definition at line 124 of file XrdProofdClientMgr.cxx.

◆ ~XrdProofdClientMgr()

virtual XrdProofdClientMgr::~XrdProofdClientMgr ( )
inlinevirtual

Definition at line 85 of file XrdProofdClientMgr.h.

Member Function Documentation

◆ Auth()

int XrdProofdClientMgr::Auth ( XrdProofdProtocol xp)

Analyse client authentication info.

Definition at line 1081 of file XrdProofdClientMgr.cxx.

◆ Broadcast()

void XrdProofdClientMgr::Broadcast ( XrdProofdClient clnt,
const char *  msg 
)

Broadcast message 'msg' to the connected instances of client 'clnt' or to all connected instances if clnt == 0.

Definition at line 1453 of file XrdProofdClientMgr.cxx.

◆ CheckAdminPath()

int XrdProofdClientMgr::CheckAdminPath ( XrdProofdProtocol p,
XrdOucString &  cidpath,
XrdOucString &  emsg 
)
private

Check the old-clients admin for an existing entry for this client and read the client ID;.

Definition at line 792 of file XrdProofdClientMgr.cxx.

◆ CheckClient()

int XrdProofdClientMgr::CheckClient ( XrdProofdProtocol p,
const char *  user,
XrdOucString &  emsg 
)
private

Perform checks on the client username.

In case authentication is required this is called afetr authentication. Return 0 on success; on error, return -1 .

Definition at line 524 of file XrdProofdClientMgr.cxx.

◆ CheckClients()

int XrdProofdClientMgr::CheckClients ( )

Regular checks of the client admin path; run by the cron job.

Definition at line 953 of file XrdProofdClientMgr.cxx.

◆ CheckFrequency()

int XrdProofdClientMgr::CheckFrequency ( ) const
inline

Definition at line 106 of file XrdProofdClientMgr.h.

◆ Config()

int XrdProofdClientMgr::Config ( bool  rcf = 0)
virtual

Run configuration and parse the entered config directives.

Return 0 on success, -1 on error

Reimplemented from XrdProofdConfig.

Definition at line 228 of file XrdProofdClientMgr.cxx.

◆ CreateAdminPath()

int XrdProofdClientMgr::CreateAdminPath ( XrdProofdProtocol p,
XrdOucString &  path,
XrdOucString &  e 
)
private

Create the client directory in the admin path.

Definition at line 754 of file XrdProofdClientMgr.cxx.

◆ DoDirective()

int XrdProofdClientMgr::DoDirective ( XrdProofdDirective d,
char *  val,
XrdOucStream *  cfg,
bool  rcf 
)
virtual

Update the priorities of the active sessions.

Reimplemented from XrdProofdConfig.

Definition at line 164 of file XrdProofdClientMgr.cxx.

◆ DoDirectiveClientMgr()

int XrdProofdClientMgr::DoDirectiveClientMgr ( char *  val,
XrdOucStream *  cfg,
bool   
)
private

Process 'clientmgr' directive eg: xpd.clientmgr checkfq:120 activityto:600.

Definition at line 184 of file XrdProofdClientMgr.cxx.

◆ FilterSecConfig()

char * XrdProofdClientMgr::FilterSecConfig ( int &  nd)
private

Grep directives of the form "xpd.sec...", "sec.protparm" and "sec.protocol" from file 'cfn' and save them in a temporary file, stripping off the prefix "xpd." when needed.

If any such directory is found, the full path of the temporary file is returned, with the number of directives found in 'nd'. Otherwise 0 is returned and '-errno' specified in nd. The caller has the responsability to unlink the temporary file and to release the memory allocated for the path.

Definition at line 1285 of file XrdProofdClientMgr.cxx.

◆ GetClient()

XrdProofdClient * XrdProofdClientMgr::GetClient ( const char *  usr,
const char *  grp = 0,
bool  create = 1 
)

Handle request for localizing a client instance for {usr, grp} from the list.

Create a new instance, if required; for new instances, use the path at 'sock' for the unix socket, or generate a new one, if sock = 0.

Definition at line 1353 of file XrdProofdClientMgr.cxx.

◆ GetNClients()

int XrdProofdClientMgr::GetNClients ( ) const
inline

Definition at line 95 of file XrdProofdClientMgr.h.

◆ LoadSecurity()

XrdSecService * XrdProofdClientMgr::LoadSecurity ( )
private

Load security framework and plugins, if not already done.

Definition at line 1211 of file XrdProofdClientMgr.cxx.

◆ Login()

int XrdProofdClientMgr::Login ( XrdProofdProtocol xp)

Process a login request.

Definition at line 304 of file XrdProofdClientMgr.cxx.

◆ MapClient()

int XrdProofdClientMgr::MapClient ( XrdProofdProtocol xp,
bool  all = 1 
)
private

Process a login request.

Definition at line 611 of file XrdProofdClientMgr.cxx.

◆ ParsePreviousClients()

int XrdProofdClientMgr::ParsePreviousClients ( XrdOucString &  emsg)
private

Client entries for the clients still connected when the daemon terminated.

Definition at line 842 of file XrdProofdClientMgr.cxx.

◆ Pipe()

XrdProofdPipe* XrdProofdClientMgr::Pipe ( )
inline

Definition at line 107 of file XrdProofdClientMgr.h.

◆ Process()

int XrdProofdClientMgr::Process ( XrdProofdProtocol p)

◆ RegisterDirectives()

void XrdProofdClientMgr::RegisterDirectives ( )
privatevirtual

Register directives for configuration.

Reimplemented from XrdProofdConfig.

Definition at line 152 of file XrdProofdClientMgr.cxx.

◆ RestoreAdminPath()

int XrdProofdClientMgr::RestoreAdminPath ( XrdOucString &  cpath,
XrdOucString &  emsg 
)
private

◆ TerminateSessions()

void XrdProofdClientMgr::TerminateSessions ( XrdProofdClient clnt,
const char *  msg,
int  srvtype 
)

Terminate sessions of client 'clnt' or to of all clients if clnt == 0.

The list of process IDs having been signalled is returned.

Definition at line 1482 of file XrdProofdClientMgr.cxx.

Member Data Documentation

◆ fActivityTimeOut

int XrdProofdClientMgr::fActivityTimeOut
private

Definition at line 62 of file XrdProofdClientMgr.h.

◆ fCheckFrequency

int XrdProofdClientMgr::fCheckFrequency
private

Definition at line 56 of file XrdProofdClientMgr.h.

◆ fCIA

XrdSecService* XrdProofdClientMgr::fCIA
private

Definition at line 53 of file XrdProofdClientMgr.h.

◆ fClntAdminPath

XrdOucString XrdProofdClientMgr::fClntAdminPath
private

Definition at line 59 of file XrdProofdClientMgr.h.

◆ fMgr

XrdProofdManager* XrdProofdClientMgr::fMgr
private

Definition at line 51 of file XrdProofdClientMgr.h.

◆ fMutex

XrdSysRecMutex* XrdProofdClientMgr::fMutex
private

Definition at line 50 of file XrdProofdClientMgr.h.

◆ fNDisconnected

int XrdProofdClientMgr::fNDisconnected
private

Definition at line 60 of file XrdProofdClientMgr.h.

◆ fPipe

XrdProofdPipe XrdProofdClientMgr::fPipe
private

Definition at line 57 of file XrdProofdClientMgr.h.

◆ fProofdClients

std::list<XrdProofdClient *> XrdProofdClientMgr::fProofdClients
private

Definition at line 64 of file XrdProofdClientMgr.h.

◆ fReconnectTimeOut

int XrdProofdClientMgr::fReconnectTimeOut
private

Definition at line 61 of file XrdProofdClientMgr.h.

◆ fSecLib

XrdOucString XrdProofdClientMgr::fSecLib
private

Definition at line 52 of file XrdProofdClientMgr.h.

◆ fSecPlugin

XrdSysPlugin* XrdProofdClientMgr::fSecPlugin
private

Definition at line 54 of file XrdProofdClientMgr.h.

Libraries for XrdProofdClientMgr:
[legend]

The documentation for this class was generated from the following files: