20#include "RConfigure.h"
38 const char *token,
TDatime expdate,
53 const char *
id,
const char *token,
82 Bool_t clean = (strstr(Opt,
"C") || strstr(Opt,
"c"));
93 Bool_t remove = (strstr(Opt,
"R") || strstr(Opt,
"r"));
97 gROOT->GetListOfSecContexts()->Remove(
this);
145 news->
Send(
"cleaning request");
153 if (all || level == 1) {
161 Info(
"CleanupSecContext",
"problems secure-sending token");
166 if (cleaned &&
gDebug > 2) {
167 char srvname[3][10] = {
"sockd",
"rootd",
"proofd"};
168 Info(
"CleanupSecContext",
169 "remote %s notified for cleanup (%s,%d)",
179 Info(
"CleanupSecContext",
180 "unable to open valid socket for cleanup for %s",
fHost.
Data());
195 Int_t ord = -1, i = 0;
196 for (; i < (
Int_t)strlen(opt); i++) {
197 if (opt[i] < 48 || opt[i] > 57) {
206 if (!strncasecmp(opt,
"F",1)) {
208 "+------------------------------------------------------+");
210 "+ Host:%s Method:%d (%s) User:'%s'",
219 "+------------------------------------------------------+");
220 }
else if (!strncasecmp(opt,
"S",1)) {
223 Printf(
"Security context: Method: AFS, not reusable");
225 Printf(
"Security context: Method: %d (%s) expiring on %s",
229 Printf(
"Security context: Method: %d (%s) not reusable",
234 Info(
"PrintEstblshed",
"+ %d \t h:%s met:%d (%s) us:'%s'",
251 out =
Form(
"Method: AFS, not reusable");
254 out =
Form(
"Method: %d (%s) expiring on %s",
261 out =
Form(
"Method: %d (%s) authorized by /etc/hosts.equiv or $HOME/.rhosts",
264 out =
Form(
"No authentication required remotely");
const Bool_t kIterBackward
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
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)
static Int_t SecureSend(TSocket *Socket, Int_t enc, Int_t KeyType, const char *In)
Encode null terminated str using the session private key indicated by enc and sends it over the netwo...
static void RemoveSecContext(TRootSecContext *ctx)
Tool for removing SecContext ctx from THostAuth listed in fgAuthInfo or fgProofAuthInfo.
static const char * GetAuthMethod(Int_t idx)
Static method returning the method corresponding to idx.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Bool_t CleanupSecContext(Bool_t all) override
Ask remote client to cleanup security context 'ctx' If 'all', all sec context with the same host as c...
void DeActivate(Option_t *opt="CR") override
Set OffSet to -1 and expiring Date to default Remove from the list If Opt contains "C" or "c",...
void Print(Option_t *option="F") const override
If opt is "F" (default) print object content.
const char * AsString(TString &out) override
Returns short string with relevant information about this security context.
virtual ~TRootSecContext()
Dtor: delete (deActivate, local/remote cleanup, list removal) all what is still active.
Int_t GetProtocol() const
Bool_t IsActive() const
Check remote OffSet and expiring Date.
void Cleanup()
Cleanup what is still active.
const char * GetHost() const
const char * GetMethodName() const
friend class TRootSecContext
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
virtual Bool_t IsValid() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const