]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-fs-uuid-20071016
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 16 Oct 2007 18:26:08 +0000 (18:26 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 16 Oct 2007 18:26:08 +0000 (18:26 +0000)
do not require afs client administrator access to display the current
Uuid value.

(cherry picked from commit 89c8d7e125a5b46f57081000fcbc698eba9e5daa)

src/WINNT/afsd/fs.c

index 5302eb1f8acd7ff440d082b4caa3fc11d66f50c3..06a717958e91e745dbec24fc05d65a8d4ee47bbc 100644 (file)
@@ -3539,19 +3539,18 @@ UuidCmd(struct cmd_syndesc *asp, char *arock)
     struct ViceIoctl blob;
     char * uuidstring = NULL;
 
+    if (asp->parms[0].items) {
 #ifdef WIN32
-    if ( !IsAdmin() ) {
-        fprintf (stderr,"Permission denied: requires AFS Client Administrator access.\n");
-        return EACCES;
-    }
+        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;
-    }
+        if (geteuid()) {
+            fprintf (stderr, "Permission denied: requires root access.\n");
+            return EACCES;
+        }
 #endif
-
-    if (asp->parms[0].items) {
         inValue = 1;            /* generate new UUID */
     } else {
         inValue = 0;            /* just show the current UUID */