Logo ROOT   6.16/01
Reference Guide
TestAuth.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_net
3/// Macro test authentication methods stand alone
4///
5/// See `$ROOTSYS/README/README.AUTH` for additional details
6///
7/// Syntax:
8///
9/// ~~~ {.cpp}
10/// .x TestAuth.C(<port>,"<user>","<krb5_princ>","<globus_det>")
11///
12/// <port> = rootd port (default 1094)
13/// <user> = login user name for the test
14/// (default from getpwuid)
15/// <krb5_princ> = Principal to be used for Krb5 authentication
16/// in the form user@THE.REA.LM
17/// ( default: <running_user@Default_Realm with
18/// Default_realm taken from /etc/krb5.conf
19/// or the $KRB5_CONFIG file )
20/// <globus_det> = details for the globus authentication
21/// ( default: ad:certificates cd:$HOME/.globus
22/// cf:usercert.pem kf:userkey.pem )
23/// ~~~
24///
25/// MAKE SURE that rootd is running
26///
27/// Example of successful output:
28///
29/// ~~~ {.cpp}
30/// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31/// + +
32/// + TestAuth.C +
33/// + +
34/// + Test of authentication methods +
35/// + +
36/// + Syntax: +
37/// + +
38/// + .x TestAuth.C(<port>,"<user>","<krb5_princ>","<globus_det>") +
39/// + +
40/// + <port> = rootd port (default 1094) +
41/// + <user> = login user name for the test +
42/// + (default from getpwuid) +
43/// + <krb5_princ> = Principal to be used for Krb5 authentication +
44/// + in the form user@THE.REA.LM +
45/// + ( default: <running_user@Default_Realm with +
46/// + Default_realm taken from /etc/krb5.conf +
47/// + or the $KRB5_CONFIG file ) +
48/// + <globus_det> = details for the globus authentication +
49/// + ( default ad:certificates cd:$HOME/.globus +
50/// + cf:usercert.pem kf:userkey.pem ) +
51/// + +
52/// + >>> MAKE SURE that rootd is running <<< +
53/// + +
54/// + See $ROOTSYS/README/README.AUTH for additional details +
55/// + +
56/// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
57///
58/// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
59/// + +
60/// + Basic test parameters: +
61/// + +
62/// + Local User is : ganis
63/// + Authentication Details : pt:0 ru:1 us:ganis
64/// + Current directory is : /home/ganis/local/root/root/tutorials
65/// + TFTP string : root://localhost:1094
66/// + Krb5 Details : pt:0 ru:1 us:ganis@PCEPSFT43.CERN.CH
67/// + +
68/// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
69/// + +
70/// + Testing UsrPwd ... +
71/// ganis@localhost password:
72/// + +
73/// + Testing SRP ... +
74/// ganis@localhost SRP password:
75/// + +
76/// + Testing Krb5 ... +
77/// Password for ganis@PCEPSFT43.CERN.CH:
78/// + +
79/// + Testing Globus ... +
80/// Local Globus Certificates ( )
81/// Enter <key>:<new value> to change:
82/// Your identity: /O=Grid/OU=GlobusTest/OU=simpleCA-arthux.cern.ch/OU=cern.ch/CN=ganis
83/// Enter GRID pass phrase for this identity:
84/// Creating proxy ............................ Done
85/// Your proxy is valid until: Fri Oct 31 09:33:04 2003
86/// + +
87/// + Testing SSH ... +
88/// ganis@localhost's password:
89/// + +
90/// + Testing UidGid ... +
91/// + +
92/// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
93///
94/// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
95/// + +
96/// + Result of the tests: +
97/// + +
98/// + Method: 0 (UsrPwd): successful! (reuse: successful!) +
99/// + Method: 1 (SRP): successful! (reuse: successful!) +
100/// + Method: 2 (Krb5): successful! (reuse: successful!) +
101/// + Method: 3 (Globus): successful! (reuse: successful!) +
102/// + Method: 4 (SSH): successful! (reuse: successful!) +
103/// + Method: 5 (UidGid): successful! +
104/// + +
105/// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
106/// ~~~
107///
108/// \macro_code
109///
110/// \author
111
112int TestAuth(int port = 1094, char *user = "", char *krb5 = "", char *globus = "")
113{
114 //
115 // This macro tests the authentication methods
116 //
117 gROOT->Reset();
118
119// Getting debug flag
120 Int_t lDebug = gEnv->GetValue("Root.Debug",0);
121
122// Useful flags
123 Bool_t HaveMeth[6] = {1,0,0,0,0,1};
124 Int_t TestMeth[6] = {0,0,0,0,0,0};
125 Int_t TestReUse[6] = {3,3,3,3,3,3};
126
127
128// Some Printout
129 printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
130 printf("+ +\n");
131 printf("+ TestAuth.C +\n");
132 printf("+ +\n");
133 printf("+ Test of authentication methods +\n");
134 printf("+ +\n");
135 printf("+ Syntax: +\n");
136 printf("+ +\n");
137 printf("+ .x TestAuth.C(<port>,\"<user>\",\"<krb5_princ>\",\"<globus_det>\") +\n");
138 printf("+ +\n");
139 printf("+ <port> = rootd port (default 1094) +\n");
140 printf("+ <user> = login user name for the test +\n");
141 printf("+ (default from getpwuid) +\n");
142 printf("+ <krb5_princ> = Principal to be used for Krb5 authentication +\n");
143 printf("+ in the form user@THE.REA.LM +\n");
144 printf("+ ( default: <running_user@Default_Realm with +\n");
145 printf("+ Default_realm taken from /etc/krb5.conf +\n");
146 printf("+ or the $KRB5_CONFIG file ) +\n");
147 printf("+ <globus_det> = details for the globus authentication +\n");
148 printf("+ ( default ad:certificates cd:$HOME/.globus +\n");
149 printf("+ cf:usercert.pem kf:userkey.pem ) +\n");
150 printf("+ +\n");
151 printf("+ >>> MAKE SURE that rootd is running <<< +\n");
152 printf("+ +\n");
153 printf("+ See $ROOTSYS/README/README.AUTH for additional details +\n");
154 printf("+ +\n");
155 printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n");
156
157// Useful variables
158
159// User
160 TString User = user;
161 if (User == "") {
162
164 if (!u) {
165 printf("\n >>>> 'user' not defined: please enter a valid username:\n");
166 char utmp[256] = {0};
167 scanf("%s",utmp);
168 if (strlen(utmp)) {
169 User = utmp;
170 } else {
171 printf(">>>> no 'user' defined: return!\n");
172 return 1;
173 }
174 } else {
175 User = u->fUser;
176 }
177
178 }
179
180// Host
181 TString Host = "localhost";
182 TString HostName = gSystem->HostName();
183
184// File path string for TFTP
185 //TString TFTPPath = TString("root://localhost:")+ port ;
186 TString TFTPPath = TString("root://")+User+TString("@localhost:")+ port ;
187 //TString TFTPPathKrb5 = TString("root://") + HostName + TString(":")+ port ;
188 TString TFTPPathKrb5 = TString("root://") + User+ TString("@") +
189 HostName + TString(":")+ port ;
190
191// Details
192 TString Details = TString("pt:0 ru:1 us:") + User;
193
194// Testing availabilities
195 char *p;
196
197// TString HaveSRP = "@srpdir@";
198 if ((p = gSystem->DynamicPathName("libSRPAuth", kTRUE))) {
199 HaveMeth[1] = 1;
200 }
201 delete[] p;
202
203// Check if Kerberos is available
204 TString Krb5Details;
205 TString Krb5Open;
206 if ((p = gSystem->DynamicPathName("libKrb5Auth", kTRUE))) {
207 HaveMeth[2] = 1;
208 // Special details string for Kerberos
209 if (strlen(krb5) > 0) {
210 Krb5Details = TString("pt:0 ru:1 us:") + TString(krb5);
211 } else {
212 // Must determine a default ... look in config file
213 TString Krb5Conf, Realm;
214 if (gSystem->Getenv("KRB5_CONFIG")) {
215 if (!gSystem->AccessPathName(gSystem->Getenv("KRB5_CONFIG"), kReadPermission)) {
216 Krb5Conf = gSystem->Getenv("KRB5_CONFIG");
217 }
218 } else if (!gSystem->AccessPathName("/etc/krb5.conf", kReadPermission)) {
219 Krb5Conf = "/etc/krb5.conf";
220 } else {
221 printf("\n >>>> Kerberos Principal undefined\n");
222 printf("\n >>>> unable to localize Kerberos config file to build a default\n");
223 printf("\n >>>> Switching off Kerberos\n");
224 printf("\n >>>> Run again with giving the principal as 3rd argument\n");
225 printf("\n >>>> or define the variable KRB5_CONFIG with the full path \n");
226 printf("\n >>>> to the config file (usually /etc/krb5.conf)\n");
227 HaveMeth[2] = 0;
228 }
229 if (HaveMeth[2] == 1) {
230 FILE *fc = fopen(Krb5Conf.Data(),"r");
231 if (fc) {
232 char line[1024], fs1[1024], fs2[1024], fs3[1024];
233 while (fgets(line, sizeof(line), fc) != 0) {
234 int nf = sscanf(line,"%s %s %s",fs1,fs2,fs3);
235 if (nf == 3 && !strcmp(fs1,"default_realm")) {
236 Realm = fs3;
237 break;
238 }
239 }
240 Krb5Details = TString("pt:0 ru:1 us:") + User + TString("@") + Realm;
241// Krb5Details = TString("pt:0 ru:1 us:") + User;
242 fclose(fc);
243 } else {
244 HaveMeth[2] = 0;
245 }
246 }
247 }
248 }
249 delete[] p;
250
251// Check if Globus is available
252 TString GlobusDetails;
253 if ((p = gSystem->DynamicPathName("libGlobusAuth", kTRUE))) {
254 HaveMeth[3] = 1;
255 // Special details string for Globus
256 GlobusDetails = TString("pt:0 ru:1 ") + TString(globus);
257 }
258 delete[] p;
259
260// Check if SSH available
261 if (gSystem->Which(gSystem->Getenv("PATH"), "ssh", kExecutePermission)) {
262 HaveMeth[4] = 1;
263 }
264
265// Test parameter Printout
266 printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
267 printf("+ +\n");
268 printf("+ Basic test parameters: +\n");
269 printf("+ +\n");
270 printf("+ Local User is : %s \n",User.Data());
271 printf("+ Authentication Details : %s \n",Details.Data());
272 printf("+ Current directory is : %s \n",gSystem->WorkingDirectory());
273 printf("+ TFTP string : %s \n",TFTPPath.Data());
274 if (HaveMeth[2]) {
275 printf("+ Krb5 Details : %s \n",Krb5Details.Data());
276 }
277 printf("+ +\n");
278 printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
279
280// Read local <RootAuthrc> now to avoid to be later superseded
282 if (lDebug > 0)
284
285 TFTP *t1 = 0;
286// UsrPwd method
287 printf("+ +\n");
288 printf("+ Testing UsrPwd ... +\n");
289
290 // Check if by any chance locally there is already an THostAuth matching
291 // the one we want to use for testing
292 THostAuth *hasv1 = 0;
293 THostAuth *ha = TAuthenticate::HasHostAuth(Host.Data(),User.Data());
294 if (ha) {
295 // We need to save it to restore at the end
296 hasv1 = new THostAuth(*ha);
297 // We reset the existing one
298 ha->Reset();
299 // And update it with the info we want
300 ha->AddMethod(0,Details.Data());
301 } else {
302 // We create directly a new THostAuth
303 ha = new THostAuth(Host.Data(),User.Data(),0,Details.Data());
304 // And add object to list so that TAuthenticate has
305 // a chance to find it
307 }
308
309 // Print available host auth info
310 if (lDebug > 0)
311 ha->Print();
312
313 {
314 // First authentication attempt
315 t1 = new TFTP(TFTPPath.Data(),2);
316 if (t1->IsOpen()) {
317 TestMeth[0] = 1;
318 } else {
319 printf(" >>>>>>>>>>>>>>>> Test of UsrPwd authentication failed \n");
320 }}
321
322 // Try ReUse
323 if (TestMeth[0] == 1) {
324 TIter next(ha->Established());
325 TSecContext *ai;
326 while ((ai = (TSecContext *) next())) {
327 if (ai->GetMethod() == 0) {
328 Int_t OffSet = ai->GetOffSet();
329 TestReUse[0] = 0;
330 if (OffSet > -1) {
331 TestReUse[0] = 1;
332 }
333 }
334 }
335 }
336 // Delete t1
337 if (t1) delete t1;
338 // remove method from available list
339 ha->RemoveMethod(0);
340
341// SRP method
342 if ( HaveMeth[1] ) {
343 printf("+ +\n");
344 printf("+ Testing SRP ... +\n");
345
346 // Add relevant info to HostAuth
347 ha->AddFirst(1,Details.Data());
348 if (lDebug > 0)
349 ha->Print();
350
351 // Authentication attempt
352 t1 = new TFTP(TFTPPath.Data(),2);
353 if (t1->IsOpen()) {
354 TestMeth[1] = 1;
355 } else {
356 printf(" >>>>>>>>>>>>>>>> Test of SRP authentication failed \n");
357 }
358
359 // Try ReUse
360 if (TestMeth[1] == 1) {
361 TIter next(ha->Established());
362 TSecContext *ai;
363 while ((ai = (TSecContext *) next())) {
364 if (ai->GetMethod() == 1) {
365 Int_t OffSet = ai->GetOffSet();
366 TestReUse[1] = 0;
367 if (OffSet > -1) {
368 TestReUse[1] = 1;
369 }
370 }
371 }
372 }
373 // Delete t1
374 if (t1) delete t1;
375 // remove method from available list
376 ha->RemoveMethod(1);
377
378 }
379
380// Kerberos method
381 THostAuth *hak = 0;
382 THostAuth *hasv2 = 0;
383 if ( HaveMeth[2] ) {
384 printf("+ +\n");
385 printf("+ Testing Krb5 ... +\n");
386
387
388 // Check if by any chance locally there is already an THostAuth matching
389 // the one we want to use for testing
390 hak = TAuthenticate::HasHostAuth(HostName.Data(),User.Data());
391 if (hak) {
392 if (lDebug > 0)
393 printf(" >>>>>>>>>>>>>>>> Krb5: existing THostAuth found \n");
394 // We need to save it to restore at the end
395 hasv2 = new THostAuth(*hak);
396 // We reset the existing one
397 hak->Reset();
398 // And update it with the info we want
399 hak->AddMethod(2,Krb5Details.Data());
400 } else {
401 // We create directly a new THostAuth
402 hak = new THostAuth(HostName.Data(),User.Data(),2,Krb5Details.Data());
403 // And add object to list so that TAuthenticate has
404 // a chance to find it
406 }
407 if (lDebug > 0)
408 hak->Print();
409
410 // Authentication attempt
411 t1 = new TFTP(TFTPPathKrb5.Data(),2);
412 if (t1->IsOpen()) {
413 TestMeth[2] = 1;
414 } else {
415 printf(" >>>>>>>>>>>>>>>> Test of Kerberos authentication failed \n");
416 if (strlen(krb5) > 0) {
417 printf(" >>>>>>>>>>>>>>>> details used: '%s' \n",krb5);
418 }
419 }
420
421 // Try ReUse
422 if (TestMeth[2] == 1) {
423 TIter next(hak->Established());
424 TSecContext *ai;
425 while ((ai = (TSecContext *) next())) {
426 if (ai->GetMethod() == 2) {
427 Int_t OffSet = ai->GetOffSet();
428 TestReUse[2] = 0;
429 if (OffSet > -1) {
430 TestReUse[2] = 1;
431 }
432 }
433 }
434 }
435 // Delete t1
436 if (t1) delete t1;
437 // remove method from available list
438 hak->RemoveMethod(2);
439 }
440
441// Globus method
442 if ( HaveMeth[3] ) {
443 printf("+ +\n");
444 printf("+ Testing Globus ... +\n");
445
446 // Add relevant info to HostAuth
447 ha->AddFirst(3,GlobusDetails.Data());
448 if (lDebug > 0)
449 ha->Print();
450
451 // Authentication attempt
452 t1 = new TFTP(TFTPPath.Data(),2);
453 if (t1->IsOpen()) {
454 TestMeth[3] = 1;
455 } else {
456 printf(" >>>>>>>>>>>>>>>> Test of Globus authentication failed \n");
457 if (strlen(globus) > 0) {
458 printf(" >>>>>>>>>>>>>>>> details used: '%s' \n",globus);
459 } else {
460 printf(" >>>>>>>>>>>>>>>> using default details: \n");
461 printf(" >>>>>>>>>>>>>>>> ad:/etc/grid-security/certificates");
462 printf(" cd:$HOME/.globus cf:usercert.pem kf:userkey.pem\n");
463 }
465 if (u) {
466 if (u->fUid > 0) {
467 printf(" >>>>>>>>>>>>>>>> You are not root,");
468 printf(" you may not have the right privileges\n");
469 printf(" >>>>>>>>>>>>>>>> Make sure that the used details are correct! \n");
470 }
471 }
472 }
473
474 // Try ReUse
475 if (TestMeth[3] == 1) {
476 TIter next(ha->Established());
477 TSecContext *ai;
478 while ((ai = (TSecContext *) next())) {
479 if (ai->GetMethod() == 3) {
480 Int_t OffSet = ai->GetOffSet();
481 TestReUse[3] = 0;
482 if (OffSet > -1) {
483 TestReUse[3] = 1;
484 }
485 }
486 }
487 }
488 // Delete t1
489 if (t1) delete t1;
490 // remove method from available list
491 ha->RemoveMethod(3);
492 }
493
494// SSH method
495
496 if ( HaveMeth[4] ) {
497 printf("+ +\n");
498 printf("+ Testing SSH ... +\n");
499
500 // Add relevant info to HostAuth
501 ha->AddFirst(4,Details.Data());
502 if (lDebug > 0)
503 ha->Print();
504
505 // Authentication attempt
506 t1 = new TFTP(TFTPPath.Data(),2);
507 if (t1->IsOpen()) {
508 TestMeth[4] = 1;
509 } else {
510 printf(" >>>>>>>>>>>>>>>> Test of SSH authentication failed \n");
511 }
512
513 // Try ReUse
514 if (TestMeth[4] == 1) {
515 TIter next(ha->Established());
516 TSecContext *ai;
517 while ((ai = (TSecContext *) next())) {
518 if (ai->GetMethod() == 4) {
519 Int_t OffSet = ai->GetOffSet();
520 TestReUse[4] = 0;
521 if (OffSet > -1) {
522 TestReUse[4] = 1;
523 }
524 }
525 }
526 }
527 // Delete t1
528 if (t1) delete t1;
529 // remove method from available list
530 ha->RemoveMethod(4);
531 }
532
533
534// Rfio method
535 printf("+ +\n");
536 printf("+ Testing UidGid ... +\n");
537
538 // Add relevant info to HostAuth
539 ha->AddFirst(5,Details.Data());
540 if (lDebug > 0)
541 ha->Print();
542
543 // Authentication attempt
544 {
545 t1 = new TFTP(TFTPPath.Data(),2);
546 if (t1->IsOpen()) {
547 TestMeth[5] = 1;
548 } else {
549 printf(" >>>>>>>>>>>>>>>> Test of UidGid authentication failed \n");
550 }}
551
552 // Delete t1
553 if (t1) delete t1;
554
555 // remove method from available list
556 ha->RemoveMethod(5);
557
558 printf("+ +\n");
559 printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
560
561 // Print available host auth info
562 if (lDebug > 0)
564
565// Now restore initial configuration
566 if (hasv1) {
567 ha->Reset();
568 ha->Update(hasv1);
569 } else {
571 }
572 if (hasv2) {
573 hak->Reset();
574 hak->Update(hasv2);
575 } else {
577 }
578
579// Final Printout
580 printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
581 printf("+ +\n");
582 printf("+ Result of the tests: +\n");
583 printf("+ +\n");
584 char status[4][20] = {"failed!","successful!","not testable","not tested"};
585 int i = 0;
586 for( i=0; i<6; i++ ) {
587 if (HaveMeth[i] && TestMeth[i] < 2) {
588 if (i < 5) {
589 printf("+ Method: %d %8s: %11s (reuse: %11s) +\n",i,
591 status[TestMeth[i]],status[TestReUse[i]]);
592 } else
593 printf("+ Method: %d %8s: %11s +\n",i,
595 status[TestMeth[i]]);
596 }
597 }
598 Bool_t NotPrinted = kTRUE;
599 for( i=0; i<6; i++ ) {
600 if (HaveMeth[i] && TestMeth[i] > 1) {
601 if (NotPrinted) {
602 printf("+ +\n");
603 printf("+ Could not be tested: +\n");
604 printf("+ +\n");
605 NotPrinted = kFALSE;
606 }
607 printf("+ Method: %d %8s: %11s +\n",i,
609 status[TestMeth[i]]);
610 }
611 }
612 printf("+ +\n");
613 printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
614
615}
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
R__EXTERN TEnv * gEnv
Definition: TEnv.h:171
#define gROOT
Definition: TROOT.h:410
char * Form(const char *fmt,...)
@ kExecutePermission
Definition: TSystem.h:46
@ kReadPermission
Definition: TSystem.h:48
R__EXTERN TSystem * gSystem
Definition: TSystem.h:540
static struct mg_connection * fc(struct mg_context *ctx)
Definition: civetweb.c:3728
static void Show(Option_t *opt="S")
Print info about the authentication sector.
static Int_t ReadRootAuthrc()
Read authentication directives from $ROOTAUTHRC, $HOME/.rootauthrc or <Root_etc_dir>/system....
static TList * GetAuthInfo()
Static method returning the list with authentication details.
static const char * GetAuthMethod(Int_t idx)
Static method returning the method corresponding to idx.
static THostAuth * HasHostAuth(const char *host, const char *user, Option_t *opt="R")
Checks if a THostAuth with exact match for {host,user} exists in the fgAuthInfo list If opt = "P" use...
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
Definition: TFTP.h:34
void Reset()
Remove all methods, leaving Active status and list of associted TSceContexts unchanged.
Definition: THostAuth.cxx:344
virtual void Print(Option_t *option="") const
Print object content.
Definition: THostAuth.cxx:424
void RemoveMethod(Int_t level)
Remove method 'meth' from the list, if there ...
Definition: THostAuth.cxx:310
void AddMethod(Int_t level, const char *details=0)
Add method to the list.
Definition: THostAuth.cxx:277
TList * Established() const
Definition: THostAuth.h:100
void AddFirst(Int_t level, const char *details=0)
Add new method in first position If already in the list, set as first method 'level' with authenticat...
Definition: THostAuth.cxx:651
void Update(THostAuth *ha)
Update info with the one in ha Remaining methods, if any, get lower priority.
Definition: THostAuth.cxx:533
virtual void Add(TObject *obj)
Definition: TList.h:87
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:818
Int_t GetMethod() const
Definition: TSecContext.h:77
Int_t GetOffSet() const
Definition: TSecContext.h:79
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
virtual const char * Getenv(const char *env)
Get environment variable.
Definition: TSystem.cxx:1652
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition: TSystem.cxx:1286
virtual const char * HostName()
Return the system's host name.
Definition: TSystem.cxx:312
virtual const char * WorkingDirectory()
Return working directory.
Definition: TSystem.cxx:878
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
Definition: TSystem.cxx:1536
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
Definition: TSystem.cxx:1588
char * DynamicPathName(const char *lib, Bool_t quiet=kFALSE)
Find a dynamic library called lib using the system search paths.
Definition: TSystem.cxx:2020
TLine * line
TString fUser
Definition: TSystem.h:142
Int_t fUid
Definition: TSystem.h:140
auto * t1
Definition: textangle.C:20