71int TestAuth(
int port = 1094,
char *user =
"")
88 printf(
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
90 printf(
"+ TestAuth.C +\n");
92 printf(
"+ Test of authentication methods +\n");
96 printf(
"+ .x TestAuth.C(<port>,\"<user>\") +\n");
98 printf(
"+ <port> = rootd port (default 1094) +\n");
99 printf(
"+ <user> = login user name for the test +\n");
100 printf(
"+ (default from getpwuid) +\n");
102 printf(
"+ >>> MAKE SURE that rootd is running <<< +\n");
104 printf(
"+ See $ROOTSYS/README/README.AUTH for additional details +\n");
106 printf(
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n");
116 printf(
"\n >>>> 'user' not defined: please enter a valid username:\n");
117 char utmp[256] = {0};
122 printf(
">>>> no 'user' defined: return!\n");
146 printf(
"\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
148 printf(
"+ Basic test parameters: +\n");
150 printf(
"+ Local User is : %s \n",User.
Data());
155 printf(
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
165 printf(
"+ Testing UsrPwd ... +\n");
196 printf(
" >>>>>>>>>>>>>>>> Test of UsrPwd authentication failed \n");
204 if (
ai->GetMethod() == 0) {
219 printf(
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
240 printf(
"\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
242 printf(
"+ Result of the tests: +\n");
244 char status[4][20] = {
"failed!",
"successful!",
"not testable",
"not tested"};
246 for( i=0; i<6; i++ ) {
249 printf(
"+ Method: %d %8s: %11s (reuse: %11s) +\n",i,
253 printf(
"+ Method: %d %8s: %11s +\n",i,
259 for( i=0; i<6; i++ ) {
263 printf(
"+ Could not be tested: +\n");
267 printf(
"+ Method: %d %8s: %11s +\n",i,
273 printf(
"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
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.
const char * Data() const
virtual const char * HostName()
Return the system's host name.
virtual const char * WorkingDirectory()
Return working directory.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.