20#include "RConfigure.h"
52 const char *
id,
const char *token,
82 if (clean && fOffSet > -1)
93 if (remove && fOffSet > -1){
146 if (
all || level == 1) {
153 (
char *)(fToken.Data())) == -1) {
154 Info(
"CleanupSecContext",
"problems secure-sending token");
160 char srvname[3][10] = {
"sockd",
"rootd"};
161 Info(
"CleanupSecContext",
162 "remote %s notified for cleanup (%s,%d)",
172 Info(
"CleanupSecContext",
173 "unable to open valid socket for cleanup for %s", fHost.Data());
190 if (opt[i] < 48 || opt[i] > 57) {
201 "+------------------------------------------------------+");
203 "+ Host:%s Method:%d (%s) User:'%s'",
204 GetHost(), fMethod, GetMethodName(),
207 "+ OffSet:%d Id: '%s'", fOffSet, fID.Data());
210 "+ Expiration time: %s",fExpDate.AsString());
212 "+------------------------------------------------------+");
215 if (fID.BeginsWith(
"AFS"))
216 Printf(
"Security context: Method: AFS, not reusable");
218 Printf(
"Security context: Method: %d (%s) expiring on %s",
219 fMethod, GetMethodName(),
220 fExpDate.AsString());
222 Printf(
"Security context: Method: %d (%s) not reusable",
223 fMethod, GetMethodName());
227 Info(
"PrintEstblshed",
"+ %d \t h:%s met:%d (%s) us:'%s'",
228 ord, GetHost(), fMethod, GetMethodName(),
230 Info(
"PrintEstblshed",
"+ \t offset:%d id: '%s'", fOffSet, fID.Data());
232 Info(
"PrintEstblshed",
"+ \t expiring: %s",fExpDate.AsString());
243 if (fID.BeginsWith(
"AFS"))
244 out =
Form(
"Method: AFS, not reusable");
247 out =
Form(
"Method: %d (%s) expiring on %s",
248 fMethod, GetMethodName(), fExpDate.AsString(
expdate));
252 out =
Form(
"Method: %d (%s) not reusable", fMethod, GetMethodName());
253 else if (fOffSet == -3)
254 out =
Form(
"Method: %d (%s) authorized by /etc/hosts.equiv or $HOME/.rhosts",
255 fMethod, GetMethodName());
256 else if (fOffSet == -4)
257 out =
Form(
"No authentication required remotely");
int Int_t
Signed integer 4 bytes (int)
const char Option_t
Option string (const char)
const Bool_t kIterBackward
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.
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
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
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 void RemoveSecContext(TRootSecContext *ctx)
Tool for removing SecContext ctx from THostAuth listed in fgAuthInfo.
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 const char * GetAuthMethod(Int_t idx)
Static method returning the method corresponding to idx.
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",...
virtual ~TRootSecContext()
Dtor: delete (deActivate, local/remote cleanup, list removal) all what is still active.
const char * AsString(TString &out) override
Returns short string with relevant information about this security context.
void Print(Option_t *option="F") const override
If opt is "F" (default) print object content.
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 Cleanup()
Cleanup what is still active.
friend class ROOT::Deprecated::TRootSecContext
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...
This class implements client sockets.
const char * Data() const
TSeqCollection * GetListOfSecContexts(const TROOT &)