From 89c8d7e125a5b46f57081000fcbc698eba9e5daa Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 16 Oct 2007 18:24:31 +0000 Subject: [PATCH] windows-fs-uuid-20071016 do not require afs client administrator access to display the current Uuid value. --- src/WINNT/afsd/fs.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/WINNT/afsd/fs.c b/src/WINNT/afsd/fs.c index 5302eb1f8a..06a717958e 100644 --- a/src/WINNT/afsd/fs.c +++ b/src/WINNT/afsd/fs.c @@ -3539,19 +3539,18 @@ UuidCmd(struct cmd_syndesc *asp, char *arock) struct ViceIoctl blob; char * uuidstring = NULL; -#ifdef WIN32 - if ( !IsAdmin() ) { - fprintf (stderr,"Permission denied: requires AFS Client Administrator access.\n"); - return EACCES; - } -#else - if (geteuid()) { - fprintf (stderr, "Permission denied: requires root access.\n"); - return EACCES; - } -#endif - if (asp->parms[0].items) { +#ifdef WIN32 + if ( !IsAdmin() ) { + fprintf (stderr,"Permission denied: requires AFS Client Administrator access.\n"); + return EACCES; + } +#else + if (geteuid()) { + fprintf (stderr, "Permission denied: requires root access.\n"); + return EACCES; + } +#endif inValue = 1; /* generate new UUID */ } else { inValue = 0; /* just show the current UUID */