21 #include "RConfigure.h" 39 Int_t offset,
const char *
id,
40 const char *token,
TDatime expdate,
void *ctx)
66 gROOT->GetListOfSecContexts()->Add(
this);
75 const char *token,
const char *
id,
102 gROOT->GetListOfSecContexts()->Add(
this);
165 if (nscl !=
this && !strcmp(nscl->GetHost(),
fHost.
Data())) {
191 Bool_t clean = (strstr(Opt,
"C") || strstr(Opt,
"c"));
195 Bool_t remove = (strstr(Opt,
"R") || strstr(Opt,
"r"));
199 gROOT->GetListOfSecContexts()->Remove(
this);
251 Int_t ord = -1, i = 0;
252 for (; i < (
Int_t)strlen(opt); i++) {
253 if (opt[i] < 48 || opt[i] > 57) {
266 Int_t len=strlen(aOrd);
268 strlcat(aSpc,
" ",10);
271 if (!strncasecmp(opt,
"F",1)) {
273 "+------------------------------------------------------+");
275 "+ Host:%s Method:%d (%s) User:'%s'",
284 "+------------------------------------------------------+");
285 }
else if (!strncasecmp(opt,
"S",1)) {
287 Printf(
"Security context: Method: %d (%s) expiring on %s",
291 Printf(
"Security context: Method: %d (%s) not reusable",
296 Info(
"PrintEstblshed",
"+ %s h:%s met:%d (%s) us:'%s'",
313 out =
Form(
"Method: %d (%s) expiring on %s",
319 out =
Form(
"Method: %d (%s) authorized by /etc/hosts.equiv or $HOME/.rhosts",
322 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