Don't crash when there are no arguments specified
authorJelmer Vernooij <jelmer@samba.org>
Wed, 13 Nov 2002 14:45:11 +0000 (14:45 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 13 Nov 2002 14:45:11 +0000 (14:45 +0000)
(This used to be commit 0855e5810aefd71c37031be31abe91229e2de8b3)

source3/utils/pdbedit.c

index 6a019e73d71b4ea440826f3c0daac1024ea069b8..45a63c4b64cd81f100c6f100fa6c755bed5cea2e 100644 (file)
@@ -495,7 +495,7 @@ int main (int argc, char **argv)
        poptGetArg(pc); /* Drop argv[0], the program name */
 
        if (user_name == NULL) {
-               user_name = strdup(poptGetArg(pc));
+               user_name = poptGetArg(pc);
        }
 
        if (!lp_load(dyn_CONFIGFILE,True,False,False)) {
@@ -503,6 +503,9 @@ int main (int argc, char **argv)
                exit(1);
        }
 
+       if(lp_modules())
+               smb_load_modules(lp_modules());
+       
        if (!init_names())
                exit(1);