21#include "RConfigure.h"
77 const char *token,
const char *
id,
113 fContext(
sc.fContext),
114 fCleanup(
sc.fCleanup),
115 fExpDate(
sc.fExpDate),
119 fMethodName(
sc.fMethodName),
133 fContext=
sc.fContext;
134 fCleanup=
sc.fCleanup;
135 fExpDate=
sc.fExpDate;
139 fMethodName=
sc.fMethodName;
161 CleanupSecContext(
kTRUE);
170 nscl->DeActivate(
"");
194 if (clean && fOffSet > -1)
195 CleanupSecContext(
kFALSE);
198 if (remove && fOffSet > -1){
234 if (fOffSet > -1 && fExpDate >
TDatime())
254 if (opt[i] < 48 || opt[i] > 57) {
274 "+------------------------------------------------------+");
276 "+ Host:%s Method:%d (%s) User:'%s'",
277 GetHost(), fMethod, GetMethodName(),
280 "+ OffSet:%d, id:%s", fOffSet, fID.Data());
283 "+ Expiration time: %s",fExpDate.AsString());
285 "+------------------------------------------------------+");
288 Printf(
"Security context: Method: %d (%s) expiring on %s",
289 fMethod, GetMethodName(),
290 fExpDate.AsString());
292 Printf(
"Security context: Method: %d (%s) not reusable",
293 fMethod, GetMethodName());
297 Info(
"PrintEstblshed",
"+ %s h:%s met:%d (%s) us:'%s'",
298 aOrd, GetHost(), fMethod, GetMethodName(),
300 Info(
"PrintEstblshed",
"+ %s offset:%d id:%s",
aSpc, fOffSet, fID.Data());
302 Info(
"PrintEstblshed",
"+ %s expiring: %s",
aSpc,fExpDate.AsString());
314 out =
Form(
"Method: %d (%s) expiring on %s",
315 fMethod, GetMethodName(), fExpDate.AsString(
expdate));
318 out =
Form(
"Method: %d (%s) not reusable", fMethod, GetMethodName());
319 else if (fOffSet == -3)
320 out =
Form(
"Method: %d (%s) authorized by /etc/hosts.equiv or $HOME/.rhosts",
321 fMethod, GetMethodName());
322 else if (fOffSet == -4)
323 out =
Form(
"No authentication required remotely");
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
const char Option_t
Option string (const char)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
void AbstractMethod(const char *method)
This function can be used in abstract base classes in case one does not want to make the class a "rea...
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN const TDatime kROOTTZERO
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
#define R__LOCKGUARD(mutex)
TClass * IsA() const override
TSecContext & operator=(const TSecContext &)
assignement operator
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...
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",...
Bool_t IsActive() const
Check remote OffSet and expiring Date.
TSecContext(const TSecContext &)
copy constructor
void Cleanup()
Cleanup what is still active.
void Print(Option_t *option="F") const override
If opt is "F" (default) print object content.
virtual ~TSecContext()
Dtor: delete (deActivate, local/remote cleanup, list removal) all what is still active.
virtual const char * AsString(TString &out)
Returns short string with relevant information about this security context.
void AddForCleanup(Int_t port, Int_t proto, Int_t type)
Create a new TSecContextCleanup Internally is added to the list.
virtual TObject * Remove(TObject *obj)=0
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.
Mother of all ROOT objects.
TObject & operator=(const TObject &rhs) noexcept
TObject assignment operator.
void Add(TObject *obj) override
const char * Data() const
This class represents a WWW compatible URL.
const char * GetUser() const
const char * GetHost() const
TSeqCollection * GetListOfSecContexts(const TROOT &)