I was somewhat annoyed by 'pdbedit -a vl' spitting an error message
authorVolker Lendecke <vlendec@samba.org>
Mon, 21 Oct 2002 19:25:04 +0000 (19:25 +0000)
committerVolker Lendecke <vlendec@samba.org>
Mon, 21 Oct 2002 19:25:04 +0000 (19:25 +0000)
at me :-)

Volker
(This used to be commit c4452ef22cf63c73bfb3574a55a4810af511ff20)

source3/utils/pdbedit.c

index 0151b6b1536d32345b66aeefb7bd45c6793e6e14..1199dec7fb34cc997d844f02de0a4c37d139dd11 100644 (file)
@@ -492,7 +492,13 @@ int main (int argc, char **argv)
                        break;
                }
        }
-       
+
+       poptGetArg(pc); /* Drop argv[0], the program name */
+
+       if (user_name == NULL) {
+               user_name = poptGetArg(pc);
+       }
+
        if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
                fprintf(stderr, "Can't load %s - run testparm to debug it\n", dyn_CONFIGFILE);
                exit(1);