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);
167 if (nscl !=
this && !strcmp(nscl->GetHost(),
fHost.
Data())) {
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) {
268 Int_t len=strlen(aOrd);
270 strlcat(aSpc,
" ",10);
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");
TSecContext(const TSecContext &)
copy constructor
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void Set()
Set Date/Time to current time as reported by the system.
void AddForCleanup(Int_t port, Int_t proto, Int_t type)
Create a new TSecContextCleanup Internally is added to the list.
virtual void Print(Option_t *option="F") const
If opt is "F" (default) print object content.
This class represents a WWW compatible URL.
virtual ~TSecContext()
Dtor: delete (deActivate, local/remote cleanup, list removal) all what is still active.
const char * GetMethodName() const
R__EXTERN TVirtualMutex * gROOTMutex
const char * GetHost() const
Bool_t IsActive() const
Check remote OffSet and expiring Date.
const char * GetHost() const
TObject & operator=(const TObject &rhs)
TObject assignment operator.
void Cleanup()
Cleanup what is still active.
const char * GetUser() const
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...
Bool_t IsA(const char *methodname)
Checks if this security context is for method named 'methname' Case sensitive.
TSecContext & operator=(const TSecContext &)
assignement operator
char * Form(const char *fmt,...)
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"...
virtual const char * AsString(TString &out)
Returns short string with relevant information about this security context.
const char * AsString() const
Return the date & time as a string (ctime() format).
#define R__LOCKGUARD(mutex)
Mother of all ROOT objects.
virtual void Add(TObject *obj)
void AbstractMethod(const char *method) const
Use this method to implement an "abstract" method that you don't want to leave purely abstract...
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * Data() const