21#include "RConfigure.h"
41 Int_t offset,
const char *
id,
42 const char *token,
TDatime expdate,
void *ctx)
68 gROOT->GetListOfSecContexts()->Add(
this);
77 const char *token,
const char *
id,
104 gROOT->GetListOfSecContexts()->Add(
this);
113 fContext(sc.fContext),
114 fCleanup(sc.fCleanup),
115 fExpDate(sc.fExpDate),
119 fMethodName(sc.fMethodName),
193 Bool_t clean = (strstr(Opt,
"C") || strstr(Opt,
"c"));
197 Bool_t remove = (strstr(Opt,
"R") || strstr(Opt,
"r"));
201 gROOT->GetListOfSecContexts()->Remove(
this);
253 Int_t ord = -1, i = 0;
254 for (; i < (
Int_t)strlen(opt); i++) {
255 if (opt[i] < 48 || opt[i] > 57) {
266 snprintf(aOrd,
sizeof(aOrd),
"%d)", ord);
268 Int_t len=strlen(aOrd);
270 strlcat(aSpc,
" ",
sizeof(aSpc));
273 if (!strncasecmp(opt,
"F",1)) {
275 "+------------------------------------------------------+");
277 "+ Host:%s Method:%d (%s) User:'%s'",
286 "+------------------------------------------------------+");
287 }
else if (!strncasecmp(opt,
"S",1)) {
289 Printf(
"Security context: Method: %d (%s) expiring on %s",
293 Printf(
"Security context: Method: %d (%s) not reusable",
298 Info(
"PrintEstblshed",
"+ %s h:%s met:%d (%s) us:'%s'",
315 out =
Form(
"Method: %d (%s) expiring on %s",
321 out =
Form(
"Method: %d (%s) authorized by /etc/hosts.equiv or $HOME/.rhosts",
324 out =
Form(
"No authentication required remotely");
R__EXTERN TVirtualMutex * gROOTMutex
char * Form(const char *fmt,...)
#define R__LOCKGUARD(mutex)
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
void Set()
Set Date/Time to current time as reported by the system.
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual void Add(TObject *obj)
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Mother of all ROOT objects.
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Bool_t IsActive() const
Check remote OffSet and expiring Date.
void Cleanup()
Cleanup what is still active.
const char * GetHost() const
void AddForCleanup(Int_t port, Int_t proto, Int_t type)
Create a new TSecContextCleanup Internally is added to the list.
const char * GetMethodName() const
virtual ~TSecContext()
Dtor: delete (deActivate, local/remote cleanup, list removal) all what is still active.
virtual void Print(Option_t *option="F") const
If opt is "F" (default) print object content.
Bool_t IsA(const char *methodname)
Checks if this security context is for method named 'methname' Case sensitive.
virtual void DeActivate(Option_t *opt="CR")
Set OffSet to -1 and expiring Date to default Remove from the list If Opt contains "C" or "c",...
TSecContext & operator=(const TSecContext &)
assignement operator
TSecContext(const TSecContext &)
copy constructor
virtual const char * AsString(TString &out)
Returns short string with relevant information about this security context.
virtual Bool_t CleanupSecContext(Bool_t all)
Ask remote client to cleanup security context 'ctx' If 'all', all sec context with the same host as c...
const char * Data() const
This class represents a WWW compatible URL.
const char * GetUser() const
const char * GetHost() const