Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
THostAuth.cxx
Go to the documentation of this file.
1// @(#)root/auth:$Id$
2// Author: G. Ganis 19/03/2003
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12//////////////////////////////////////////////////////////////////////////
13// //
14// THostAuth //
15// //
16// Contains details about host-specific authentication methods and the //
17// result of their application. //
18// Used by TAuthenticate. //
19// //
20//////////////////////////////////////////////////////////////////////////
21
22#include "RConfigure.h"
23#include "TSystem.h"
24#include "THostAuth.h"
25#include "TRootSecContext.h"
26#include "TAuthenticate.h"
27#include "TSocket.h"
28#include "TUrl.h"
29#include <cstdlib>
30
31
32
33////////////////////////////////////////////////////////////////////////////////
34/// Default constructor.
35
37{
38 Create(0, 0);
39}
40
41////////////////////////////////////////////////////////////////////////////////
42/// Create hostauth object.
43/// 'host' may contain also the server for whicb these directives
44/// are valid in the form 'host:server' or 'server://host'
45/// with server either "sock[d]", "root[d]" or
46/// 0, 1, respectively.
47
48THostAuth::THostAuth(const char *host, const char *user, Int_t nmeth,
49 Int_t *authmeth, char **details) : TObject()
50{
51 Create(host, user, nmeth, authmeth, details);
52}
53
54////////////////////////////////////////////////////////////////////////////////
55/// Create hostauth object.
56/// 'host' may contain also the server for whicb these directives
57/// are valid in the form 'host:server' or 'server://host'
58/// with server either "sock[d]", "root[d]" or
59/// 0, 1, respectively.
60
61THostAuth::THostAuth(const char *host, Int_t server, const char *user,
63{
64 Create(host, user, nmeth, authmeth, details);
65
67}
68
69////////////////////////////////////////////////////////////////////////////////
70/// Create hostauth object with one method only.
71/// 'host' may contain also the server for whicb these directives
72/// are valid in the form 'host:server' or 'server://host'
73
74THostAuth::THostAuth(const char *host, const char *user, Int_t authmeth,
75 const char *details) : TObject()
76{
77 Create(host, user, 1, &authmeth, (char **)&details);
78}
79
80////////////////////////////////////////////////////////////////////////////////
81/// Create hostauth object with one method only.
82/// 'host' may contain also the server for whicb these directives
83/// are valid in the form 'host:server' or 'server://host'
84
85THostAuth::THostAuth(const char *host, Int_t server, const char *user,
86 Int_t authmeth, const char *details) : TObject()
87{
88 Create(host, user, 1, &authmeth, (char **)&details);
90}
91
92////////////////////////////////////////////////////////////////////////////////
93/// Create hostauth object.
94/// 'host' may contain also the server for whicb these directives
95/// are valid in the form 'host:server' or 'server://host'
96/// with server either "sock[d]", "root[d]" or
97/// 0, 1, respectively.
98
99void THostAuth::Create(const char *host, const char *user, Int_t nmeth,
100 Int_t *authmeth, char **details)
101{
102 int i;
103
104 // Host
105 fHost = host;
106
107 fServer = -1;
108 // Extract server, if given
109 TString srv("");
110 if (fHost.Contains(":")) {
111 // .rootauthrc form: host:server
112 srv = fHost;
113 fHost.Remove(fHost.Index(":"));
114 srv.Remove(0,srv.Index(":")+1);
115 } else if (fHost.Contains("://")) {
116 // Url form: server://host
118 fHost.Remove(0,fHost.Index("://")+3);
119 }
120 if (srv.Length()) {
121 if (srv == "0" || srv.BeginsWith("sock"))
123 else if (srv == "1" || srv.BeginsWith("root"))
125 }
126
127 // Check and save the host FQDN ...
128 if (fHost != "default" && !fHost.Contains("*")) {
130 if (addr.IsValid())
131 fHost = addr.GetHostName();
132 }
133
134 // User
135 fUser = user;
136 if (fUser == "")
137 fUser = gSystem->Getenv("USER");
138 if (fUser == "") {
140 if (u)
141 fUser = u->fUser;
142 delete u;
143 }
144
145 // Methods indexes
147 if (fNumMethods > 0) {
148 if (!authmeth)
149 fNumMethods = 0;
150 for (i = 0; i < kMAXSEC; i++) {
151 if (i < fNumMethods) {
152 fMethods[i] = authmeth[i];
153 fSuccess[i] = 0;
154 fFailure[i] = 0;
155 } else {
156 fMethods[i] = -1;
157 fSuccess[i] = -1;
158 fFailure[i] = -1;
159 }
160 }
161 }
162
163 // Method details
164 if (fNumMethods > 0) {
165 for (i = 0; i < fNumMethods; i++) {
166 if (details && details[i] && strlen(details[i]) > 0) {
167 fDetails[i] = details[i];
168 } else {
169 // Use default instead
171 fDetails[i] = (const char *)tmp;
172 delete[] tmp;
173 }
174 }
175 }
176
177 // List of TSecContext
178 fSecContexts = new TList;
179
180 // Active when created
181 fActive = kTRUE;
182}
183
184////////////////////////////////////////////////////////////////////////////////
185/// Copy ctor ...
186
188{
189 fHost = ha.fHost;
190 fServer = ha.fServer;
191 fUser = ha.fUser;
192 fNumMethods = ha.fNumMethods;
193 Int_t i = 0;
194 for (; i < kMAXSEC; i++) {
195 fMethods[i] = ha.fMethods[i];
196 fSuccess[i] = ha.fSuccess[i];
197 fFailure[i] = ha.fFailure[i];
198 fDetails[i] = ha.fDetails[i];
199 }
200 fSecContexts = ha.Established();
201 fActive = ha.fActive;
202}
203
204////////////////////////////////////////////////////////////////////////////////
205/// Add method to the list. If already there, change its
206/// details to 'details'
207
209{
210 // Check 'meth'
211 if (meth < 0 || meth >= kMAXSEC) return;
212
213 // If already there, set details and return
214 if (HasMethod(meth)) {
216 return;
217 }
218
219 // This is a new method
223 if (details && strlen(details) > 0) {
225 } else {
226 // Use default instead
228 fDetails[fNumMethods] = (const char *)tmp;
229 delete[] tmp;
230 }
231
232 // Increment total number
233 fNumMethods++;
234
235 if (gDebug > 3) Print();
236}
237
238////////////////////////////////////////////////////////////////////////////////
239/// Remove method 'meth' from the list, if there ...
240
242{
243 // If we don't have it, nothing to do
244 Int_t pos = -1;
245 if (!HasMethod(meth,&pos)) return;
246
247 // Now rescale info
248 Int_t i = 0, k = 0;
249 for (; i < fNumMethods; i++) {
250 if (i != pos) {
251 fMethods[k] = fMethods[i];
252 fSuccess[k] = fSuccess[i];
253 fFailure[k] = fFailure[i];
254 fDetails[k] = fDetails[i];
255 k++;
256 }
257 }
258
259 // Decrement total number
260 fNumMethods--;
261
262 // Free last position
263 fMethods[fNumMethods] = -1;
264 fSuccess[fNumMethods] = -1;
265 fFailure[fNumMethods] = -1;
267
268 if (gDebug > 3) Print();
269}
270
271////////////////////////////////////////////////////////////////////////////////
272/// Remove all methods, leaving Active status and
273/// list of associted TSceContexts unchanged
274
276{
277 // Free all filled positions
278 Int_t i = 0;
279 for (; i < fNumMethods; i++) {
280 fMethods[i] = -1;
281 fSuccess[i] = -1;
282 fFailure[i] = -1;
283 fDetails[i].Resize(0);
284 }
285
286 // Set total number to 0
287 fNumMethods = 0;
288}
289
290////////////////////////////////////////////////////////////////////////////////
291/// The dtor.
292
294{
295 delete fSecContexts;
296}
297
298////////////////////////////////////////////////////////////////////////////////
299/// Return authentication details for specified level
300/// or "" if the specified level does not exist for this host.
301
302const char *THostAuth::GetDetails(Int_t level)
303{
304 Int_t i = -1;
305 if (HasMethod(level,&i)) {
306 if (gDebug > 3)
307 Info("GetDetails"," %d: returning fDetails[%d]: %s",
308 level,i,fDetails[i].Data());
309 return fDetails[i];
310 }
311 static const char *empty = " ";
312 return empty;
313}
314
315////////////////////////////////////////////////////////////////////////////////
316/// Return kTRUE if method 'level' is in the list
317
319{
320 int i;
321 for (i = 0; i < fNumMethods; i++) {
322 if (fMethods[i] == level) {
323 if (pos) *pos = i;
324 return kTRUE;
325 }
326 }
327 if (pos) *pos = -1;
328 return kFALSE;
329}
330
331////////////////////////////////////////////////////////////////////////////////
332/// Set authentication details for specified level.
333
334void THostAuth::SetDetails(Int_t level, const char *details)
335{
336 Int_t i = -1;
337 if (HasMethod(level,&i)) {
338 if (details && strlen(details) > 0) {
339 fDetails[i] = details;
340 } else {
341 // Use default instead
342 char *tmp = TAuthenticate::GetDefaultDetails(level,0,fUser);
343 fDetails[i] = (const char *)tmp;
344 delete[] tmp;
345 }
346 } else {
347 // Add new method ...
348 AddMethod(level, details);
349 }
350}
351
352////////////////////////////////////////////////////////////////////////////////
353/// Print object content.
354
356{
357 char srvnam[4][8] = { "any", "sockd", "rootd", "???" };
358
359 Int_t isrv = (fServer >= -1 && fServer <= TSocket::kROOTD) ?
361
362 Info("Print",
363 "%s +------------------------------------------------------------------+",proc);
364 Info("Print","%s + Host:%s - srv:%s - User:%s - # of available methods:%d",
366 int i = 0;
367 for (i = 0; i < fNumMethods; i++){
368 Info("Print","%s + Method: %d (%s) Ok:%d Ko:%d Dets:%s", proc,
370 fSuccess[i], fFailure[i], fDetails[i].Data());
371 }
372 Info("Print",
373 "%s +------------------------------------------------------------------+",proc);
374}
375
376////////////////////////////////////////////////////////////////////////////////
377/// Print info about established authentication vis-a-vis of this Host.
378
380{
381 Info("PrintEstablished",
382 "+------------------------------------------------------------------------------+");
383 Info("PrintEstablished","+ Host:%s - Number of active sec contexts: %d",
385
386 // Check list
387 if (fSecContexts->GetSize()>0) {
388 TIter next(fSecContexts);
389 TSecContext *ctx = 0;
390 Int_t k = 1;
391 while ((ctx = (TSecContext *) next())) {
392 TString opt;
393 opt += k++;
394 ctx->Print(opt);
395 }
396 }
397 Info("PrintEstablished",
398 "+------------------------------------------------------------------------------+");
399}
400
401////////////////////////////////////////////////////////////////////////////////
402/// Reorder nmet methods according fmet[nmet]
403
405{
406 // Temporary arrays
407 Int_t tMethods[kMAXSEC] = {0};
408 Int_t tSuccess[kMAXSEC] = {0};
409 Int_t tFailure[kMAXSEC] = {0};
411 Int_t flag[kMAXSEC] = {0};
412
413 // Copy info in the new order
414 Int_t j = 0;
415 for ( ; j < nmet; j++) {
416 Int_t i = -1;
417 if (HasMethod(fmet[j],&i)) {
418 tMethods[j] = fMethods[i];
419 tSuccess[j] = fSuccess[i];
420 tFailure[j] = fFailure[i];
421 tDetails[j] = fDetails[i];
422 flag[i]++;
423 } else if (fmet[j] >= 0 && fmet[j] < kMAXSEC) {
424 tMethods[j] = fmet[j];
425 tSuccess[j] = 0;
426 tFailure[j] = 0;
428 tDetails[j] = (const char *)tmp;
429 delete[] tmp;
430 } else {
431 Warning("ReOrder","Method id out of range (%d) - skipping",fmet[j]);
432 }
433 }
434
435 // Add existing methods not listed ... if any
436 Int_t k = nmet, i = 0;
437 for(; i < fNumMethods; i++){
438 if (flag[i] == 0) {
439 tMethods[k] = fMethods[i];
440 tSuccess[k] = fSuccess[i];
441 tFailure[k] = fFailure[i];
442 tDetails[k] = fDetails[i];
443 k++;
444 flag[i] = 1;
445 }
446 }
447
448 // Restore from temporary
449 fNumMethods = k;
450 for (i = 0; i < fNumMethods; i++) {
451 fMethods[i] = tMethods[i];
452 fSuccess[i] = tSuccess[i];
453 fFailure[i] = tFailure[i];
454 fDetails[i] = tDetails[i];
455 }
456
457 if (gDebug > 3) Print();
458}
459
460////////////////////////////////////////////////////////////////////////////////
461/// Update info with the one in ha
462/// Remaining methods, if any, get lower priority
463
465{
466 // Temporary arrays
472
473 // Save existing info in temporary arrays
474 Int_t i = 0;
475 for ( ; i < fNumMethods; i++) {
476 tMethods[i] = fMethods[i];
477 tSuccess[i] = fSuccess[i];
478 tFailure[i] = fFailure[i];
479 tDetails[i] = fDetails[i];
480 }
481
482 // Reset
483 Reset();
484
485 // Get ha content in
486 for(i = 0; i < ha->NumMethods(); i++){
487 fMethods[i] = ha->GetMethod(i);
488 fSuccess[i] = ha->GetSuccess(i);
489 fFailure[i] = ha->GetFailure(i);
490 fDetails[i] = ha->GetDetailsByIdx(i);
491 }
492
493 // Set new tmp size
494 fNumMethods = ha->NumMethods();
495
496 // Add remaining methods with low priority
497 if (fNumMethods < kMAXSEC) {
498 for (i = 0; i < tNumMethods; i++) {
499 if (!HasMethod(tMethods[i]) && fNumMethods < kMAXSEC) {
504 fNumMethods++;
505 }
506 }
507 }
508 if (gDebug > 3) Print();
509}
510
511////////////////////////////////////////////////////////////////////////////////
512/// Set 'method' to be the first used (if in the list ...).
513
515{
516 Int_t i = -1;
517 if (HasMethod(method,&i)) {
518
519 Int_t tMe = fMethods[i];
520 Int_t tSu = fSuccess[i];
521 Int_t tFa = fFailure[i];
522 TString tDe = fDetails[i];
523
524 // Rescale methods
525 Int_t j = i;
526 for (; j > 0; j--) {
527 fMethods[j] = fMethods[j-1];
528 fSuccess[j] = fSuccess[j-1];
529 fFailure[j] = fFailure[j-1];
530 fDetails[j] = fDetails[j-1];
531 }
532
533 // The saved method first
534 fMethods[0] = tMe;
535 fSuccess[0] = tSu;
536 fFailure[0] = tFa;
537 fDetails[0] = tDe;
538 }
539
540 if (gDebug > 3) Print();
541}
542
543////////////////////////////////////////////////////////////////////////////////
544/// Set 'method' to be the last used (if in the list ...).
545
547{
548 Int_t i = -1;
549 if (HasMethod(method,&i)) {
550
551 Int_t tMe = fMethods[i];
552 Int_t tSu = fSuccess[i];
553 Int_t tFa = fFailure[i];
554 TString tDe = fDetails[i];
555
556 // Rescale methods
557 Int_t j = i;
558 for (; j < (fNumMethods - 1); j++) {
559 fMethods[j] = fMethods[j+1];
560 fSuccess[j] = fSuccess[j+1];
561 fFailure[j] = fFailure[j+1];
562 fDetails[j] = fDetails[j+1];
563 }
564
565 // The saved method first
566 Int_t lp = fNumMethods - 1;
567 fMethods[lp] = tMe;
568 fSuccess[lp] = tSu;
569 fFailure[lp] = tFa;
570 fDetails[lp] = tDe;
571 }
572
573 if (gDebug > 3) Print();
574}
575
576////////////////////////////////////////////////////////////////////////////////
577/// Add new method in first position
578/// If already in the list, set as first method 'level' with
579/// authentication 'details'.
580/// Faster then AddMethod(method,details)+SetFirst(method).
581
582void THostAuth::AddFirst(Int_t level, const char *details)
583{
584 Int_t i = -1;
585 if (HasMethod(level,&i)) {
586 if (i > 0) {
587 SetDetails(level, details);
588 SetFirst(level);
589 }
590 if (gDebug > 3) Print();
591 return;
592 }
593
594 // Rescale methods
595 for (i = fNumMethods; i > 0; i--) {
596 fMethods[i] = fMethods[i-1];
597 fSuccess[i] = fSuccess[i-1];
598 fFailure[i] = fFailure[i-1];
599 fDetails[i] = fDetails[i-1];
600 }
601
602 // This method first
603 fMethods[0] = level;
604 fSuccess[0] = 0;
605 fFailure[0] = 0;
606 if (details && strlen(details) > 0) {
607 fDetails[0] = details;
608 } else {
609 // Use default instead
610 char *tmp = TAuthenticate::GetDefaultDetails(level,0,fUser);
611 fDetails[0] = (const char *)tmp;
612 delete[] tmp;
613 }
614
615 // Increment total number
616 fNumMethods++;
617
618 if (gDebug > 3) Print();
619}
620
621
622////////////////////////////////////////////////////////////////////////////////
623/// Count successes for 'method'
624
626{
627 int i;
628 for (i = 0; i < fNumMethods; i++) {
629 if (fMethods[i] == method) {
630 fSuccess[i]++;
631 break;
632 }
633 }
634}
635
636////////////////////////////////////////////////////////////////////////////////
637/// Count failures for 'method'
638
640{
641 int i;
642 for (i = 0; i < fNumMethods; i++) {
643 if (fMethods[i] == method) {
644 fFailure[i]++;
645 break;
646 }
647 }
648}
649
650////////////////////////////////////////////////////////////////////////////////
651/// Create a Security context and add it to local list
652/// Return pointer to it to be stored in TAuthenticate
653
654TRootSecContext *THostAuth::CreateSecContext(const char *user, const char *host,
656 const char *details, const char *token,
657 TDatime expdate, void *sctx, Int_t key)
658{
659 TRootSecContext *ctx = new TRootSecContext(user, host, meth, offset, details,
660 token, expdate, sctx, key);
661 // Add it also to the local list if active
662 if (ctx->IsActive())
663 fSecContexts->Add(ctx);
664
665 return ctx;
666
667}
668
669////////////////////////////////////////////////////////////////////////////////
670/// Return a static string with all info in a serialized form
671
673{
674 Out = Form("h:%s u:%s n:%d",GetHost(),GetUser(),fNumMethods);
675
676 Int_t i = 0;
677 for (; i < fNumMethods; i++) {
678 Out += TString(Form(" '%d %s'",fMethods[i],fDetails[i].Data()));
679 }
680
681}
const Int_t kMAXSEC
Definition AuthConst.h:26
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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...
Definition TROOT.cxx:627
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2495
R__EXTERN TSystem * gSystem
Definition TSystem.h:572
static char * GetDefaultDetails(Int_t method, Int_t opt, const char *user)
Determine default authentication details for method 'sec' and user 'usr'.
static const char * GetAuthMethod(Int_t idx)
Static method returning the method corresponding to idx.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Definition TDatime.h:37
Bool_t fActive
Definition THostAuth.h:45
Int_t fSuccess[kMAXSEC]
Definition THostAuth.h:43
const char * GetUser() const
Definition THostAuth.h:93
void Create(const char *host, const char *user, Int_t nmeth=0, Int_t *authmeth=nullptr, char **details=nullptr)
Create hostauth object.
Definition THostAuth.cxx:99
TList * fSecContexts
Definition THostAuth.h:47
void Reset()
Remove all methods, leaving Active status and list of associted TSceContexts unchanged.
Char_t fServer
Definition THostAuth.h:38
TRootSecContext * CreateSecContext(const char *user, const char *host, Int_t meth, Int_t offset, const char *details, const char *token, TDatime expdate=kROOTTZERO, void *ctx=nullptr, Int_t key=-1)
Create a Security context and add it to local list Return pointer to it to be stored in TAuthenticate...
const char * GetHost() const
Definition THostAuth.h:91
void AddMethod(Int_t level, const char *details=nullptr)
Add method to the list.
void SetDetails(Int_t level, const char *details)
Set authentication details for specified level.
virtual ~THostAuth()
The dtor.
Int_t fMethods[kMAXSEC]
Definition THostAuth.h:41
void SetFirst(Int_t level)
Set 'method' to be the first used (if in the list ...).
Int_t fFailure[kMAXSEC]
Definition THostAuth.h:44
TString fDetails[kMAXSEC]
Definition THostAuth.h:42
void Print(Option_t *option="") const override
Print object content.
void ReOrder(Int_t nmet, Int_t *fmet)
Reorder nmet methods according fmet[nmet].
THostAuth()
Default constructor.
Definition THostAuth.cxx:36
void RemoveMethod(Int_t level)
Remove method 'meth' from the list, if there ...
Int_t fNumMethods
Definition THostAuth.h:40
TString fHost
Definition THostAuth.h:37
TString fUser
Definition THostAuth.h:39
void CountFailure(Int_t level)
Count failures for 'method'.
void AddFirst(Int_t level, const char *details=nullptr)
Add new method in first position If already in the list, set as first method 'level' with authenticat...
Bool_t HasMethod(Int_t level, Int_t *pos=nullptr)
Return kTRUE if method 'level' is in the list.
void AsString(TString &out) const
Return a static string with all info in a serialized form.
void Update(THostAuth *ha)
Update info with the one in ha Remaining methods, if any, get lower priority.
const char * GetDetails(Int_t level)
Return authentication details for specified level or "" if the specified level does not exist for thi...
void SetLast(Int_t level)
Set 'method' to be the last used (if in the list ...).
void PrintEstablished() const
Print info about established authentication vis-a-vis of this Host.
void CountSuccess(Int_t level)
Count successes for 'method'.
This class represents an Internet Protocol (IP) address.
A doubly linked list.
Definition TList.h:38
void Add(TObject *obj) override
Definition TList.h:81
Mother of all ROOT objects.
Definition TObject.h:41
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:1057
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:1045
Bool_t IsActive() const
Check remote OffSet and expiring Date.
void Print(Option_t *option="F") const override
If opt is "F" (default) print object content.
@ kSOCKD
Definition TSocket.h:50
@ kROOTD
Definition TSocket.h:50
Basic string class.
Definition TString.h:138
const char * Data() const
Definition TString.h:384
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
Definition TString.cxx:1159
TString & Remove(Ssiz_t pos)
Definition TString.h:693
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:640
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition TString.h:659
virtual const char * Getenv(const char *env)
Get environment variable.
Definition TSystem.cxx:1676
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
Definition TSystem.cxx:2302
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
Definition TSystem.cxx:1612
This class represents a WWW compatible URL.
Definition TUrl.h:33
const char * GetProtocol() const
Definition TUrl.h:64