ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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...
 
int CheckClients ()
 Regular checks of the client admin path; run by the cron job. 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
 
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...
 
void TerminateSessions (XrdProofdClient *c, const char *msg, int srvtype)
 Terminate sessions of client 'clnt' or to of all clients if clnt == 0. More...
 
int Process (XrdProofdProtocol *p)
 
int Auth (XrdProofdProtocol *xp)
 Analyse client authentication info. More...
 
int Login (XrdProofdProtocol *xp)
 Process a login request. More...
 
int CheckFrequency () const
 
XrdProofdPipePipe ()
 
- Public Member Functions inherited from XrdProofdConfig
 XrdProofdConfig (const char *cfg=0, XrdSysError *edest=0)
 Main constructor. More...
 
virtual ~XrdProofdConfig ()
 
void SetCfgEDest (const char *cfg, XrdSysError *edest)
 Set config file and error handler. More...
 
const char * CfgFile () const
 

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 RestoreAdminPath (XrdOucString &cpath, XrdOucString &emsg)
 
int ParsePreviousClients (XrdOucString &emsg)
 Client entries for the clients still connected when the daemon terminated. More...
 
int MapClient (XrdProofdProtocol *xp, bool all=1)
 Process a login request. 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...
 
void RegisterDirectives ()
 Register directives for configuration. More...
 
int DoDirectiveClientMgr (char *, XrdOucStream *, bool)
 Process 'clientmgr' directive eg: xpd.clientmgr checkfq:120 activityto:600. More...
 
XrdSecService * LoadSecurity ()
 Load security framework and plugins, if not already done. More...
 

Private Attributes

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

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

Enumerator
kClientDisconnect 

Definition at line 87 of file XrdProofdClientMgr.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 124 of file XrdProofdClientMgr.cxx.

virtual XrdProofdClientMgr::~XrdProofdClientMgr ( )
inlinevirtual

Definition at line 85 of file XrdProofdClientMgr.h.

Member Function Documentation

int XrdProofdClientMgr::Auth ( XrdProofdProtocol xp)

Analyse client authentication info.

Definition at line 1076 of file XrdProofdClientMgr.cxx.

Referenced by XrdProofdManager::Process().

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 1448 of file XrdProofdClientMgr.cxx.

Referenced by XrdProofdAdmin::SendMsgToUser().

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 787 of file XrdProofdClientMgr.cxx.

Referenced by MapClient().

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.

Referenced by Login().

int XrdProofdClientMgr::CheckClients ( )

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

Definition at line 948 of file XrdProofdClientMgr.cxx.

Referenced by XrdProofdClientCron().

int XrdProofdClientMgr::CheckFrequency ( ) const
inline

Definition at line 106 of file XrdProofdClientMgr.h.

Referenced by XrdProofdClientCron().

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.

Referenced by XrdProofdManager::Config().

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

Create the client directory in the admin path.

Definition at line 749 of file XrdProofdClientMgr.cxx.

Referenced by MapClient().

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.

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.

Referenced by DoDirective().

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 1280 of file XrdProofdClientMgr.cxx.

Referenced by LoadSecurity().

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 1348 of file XrdProofdClientMgr.cxx.

Referenced by CheckClient(), CheckClients(), XrdProofdProofServMgr::CleanClientSessions(), XrdProofdAdmin::CleanupSessions(), ParsePreviousClients(), XrdProofdAdmin::QueryLogPaths(), XrdProofdProofServMgr::ResolveSession(), XrdProofdAdmin::SendMsgToUser(), and XrdProofdAdmin::SetROOTVersion().

int XrdProofdClientMgr::GetNClients ( ) const
inline
XrdSecService * XrdProofdClientMgr::LoadSecurity ( )
private

Load security framework and plugins, if not already done.

Definition at line 1206 of file XrdProofdClientMgr.cxx.

Referenced by Config().

int XrdProofdClientMgr::Login ( XrdProofdProtocol xp)

Process a login request.

Definition at line 304 of file XrdProofdClientMgr.cxx.

Referenced by XrdProofdManager::Process().

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

Process a login request.

Definition at line 611 of file XrdProofdClientMgr.cxx.

Referenced by Login().

int XrdProofdClientMgr::ParsePreviousClients ( XrdOucString &  emsg)
private

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

Definition at line 837 of file XrdProofdClientMgr.cxx.

Referenced by Config().

XrdProofdPipe* XrdProofdClientMgr::Pipe ( )
inline

Definition at line 107 of file XrdProofdClientMgr.h.

Referenced by XrdProofdClientCron().

int XrdProofdClientMgr::Process ( XrdProofdProtocol p)
void XrdProofdClientMgr::RegisterDirectives ( )
privatevirtual

Register directives for configuration.

Reimplemented from XrdProofdConfig.

Definition at line 152 of file XrdProofdClientMgr.cxx.

Referenced by XrdProofdClientMgr().

int XrdProofdClientMgr::RestoreAdminPath ( XrdOucString &  cpath,
XrdOucString &  emsg 
)
private
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 1477 of file XrdProofdClientMgr.cxx.

Referenced by XrdProofdAdmin::CleanupSessions().

Member Data Documentation

int XrdProofdClientMgr::fActivityTimeOut
private

Definition at line 62 of file XrdProofdClientMgr.h.

Referenced by CheckClients(), DoDirectiveClientMgr(), and XrdProofdClientMgr().

int XrdProofdClientMgr::fCheckFrequency
private

Definition at line 56 of file XrdProofdClientMgr.h.

Referenced by CheckFrequency(), DoDirectiveClientMgr(), and XrdProofdClientMgr().

XrdSecService* XrdProofdClientMgr::fCIA
private

Definition at line 53 of file XrdProofdClientMgr.h.

Referenced by Auth(), Config(), Login(), and XrdProofdClientMgr().

XrdOucString XrdProofdClientMgr::fClntAdminPath
private

Definition at line 59 of file XrdProofdClientMgr.h.

Referenced by CheckClients(), Config(), GetClient(), and ParsePreviousClients().

XrdProofdManager* XrdProofdClientMgr::fMgr
private
XrdSysRecMutex* XrdProofdClientMgr::fMutex
private
int XrdProofdClientMgr::fNDisconnected
private

Definition at line 60 of file XrdProofdClientMgr.h.

Referenced by MapClient(), ParsePreviousClients(), and XrdProofdClientMgr().

XrdProofdPipe XrdProofdClientMgr::fPipe
private

Definition at line 57 of file XrdProofdClientMgr.h.

Referenced by Pipe(), and XrdProofdClientMgr().

std::list<XrdProofdClient *> XrdProofdClientMgr::fProofdClients
private
int XrdProofdClientMgr::fReconnectTimeOut
private
XrdOucString XrdProofdClientMgr::fSecLib
private

Definition at line 52 of file XrdProofdClientMgr.h.

Referenced by Config(), LoadSecurity(), and RegisterDirectives().

XrdSysPlugin* XrdProofdClientMgr::fSecPlugin
private

Definition at line 54 of file XrdProofdClientMgr.h.

Referenced by LoadSecurity().

Collaboration diagram for XrdProofdClientMgr:
[legend]

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