21#include "RConfigure.h"
43 Int_t offset,
const char *
id,
44 const char *token,
TDatime expdate,
void *ctx)
70 gROOT->GetListOfSecContexts()->Add(
this);
79 const char *token,
const char *
id,
106 gROOT->GetListOfSecContexts()->Add(
this);
115 fContext(sc.fContext),
116 fCleanup(sc.fCleanup),
117 fExpDate(sc.fExpDate),
121 fMethodName(sc.fMethodName),
195 Bool_t clean = (strstr(Opt,
"C") || strstr(Opt,
"c"));
199 Bool_t remove = (strstr(Opt,
"R") || strstr(Opt,
"r"));
203 gROOT->GetListOfSecContexts()->Remove(
this);
255 Int_t ord = -1, i = 0;
256 for (; i < (
Int_t)strlen(opt); i++) {
257 if (opt[i] < 48 || opt[i] > 57) {
268 snprintf(aOrd,
sizeof(aOrd),
"%d)", ord);
270 Int_t len=strlen(aOrd);
272 strlcat(aSpc,
" ",
sizeof(aSpc));
275 if (!strncasecmp(opt,
"F",1)) {
277 "+------------------------------------------------------+");
279 "+ Host:%s Method:%d (%s) User:'%s'",
288 "+------------------------------------------------------+");
289 }
else if (!strncasecmp(opt,
"S",1)) {
291 Printf(
"Security context: Method: %d (%s) expiring on %s",
295 Printf(
"Security context: Method: %d (%s) not reusable",
300 Info(
"PrintEstblshed",
"+ %s h:%s met:%d (%s) us:'%s'",
317 out =
Form(
"Method: %d (%s) expiring on %s",
323 out =
Form(
"Method: %d (%s) authorized by /etc/hosts.equiv or $HOME/.rhosts",
326 out =
Form(
"No authentication required remotely");
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN const TDatime kROOTTZERO
char * Form(const char *fmt,...)
void Printf(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