pt_util: be admin
authorDerrick Brashear <shadow@your-file-system.com>
Wed, 1 May 2013 19:58:50 +0000 (15:58 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 11 May 2013 15:40:47 +0000 (08:40 -0700)
cheat and use the noauth flag so we pass the admin checks

Change-Id: Ie064db4fb930529fe474317d096238c915d1ef5b
Reviewed-on: http://gerrit.openafs.org/9839
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/ptserver/pt_util.c

index 138de38..1b953cd 100644 (file)
@@ -44,6 +44,8 @@
 extern char *optarg;
 extern int optind;
 
+extern int pr_noAuth;
+
 int restricted = 0;
 
 static int display_entry(int);
@@ -147,6 +149,9 @@ CommandProc(struct cmd_syndesc *a_as, void *arock)
 
     if (tparm[0].items) {
        wflag++;
+       /* so we are treated as admin and can create "mis"owned
+          groups */
+       pr_noAuth = 1;
     }
     if (tparm[1].items) {
        flags |= DO_USR;