r8937: allow to use non-default smb.conf in rpcclient
authorGünther Deschner <gd@samba.org>
Tue, 2 Aug 2005 19:46:11 +0000 (19:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:00:21 +0000 (11:00 -0500)
Guenther
(This used to be commit c0f3f12a6237842987845f4b4c787e25a632f2f5)

source3/rpcclient/rpcclient.c

index feaeae4da6819ab6b197ae654d00fae54ef16006..3112db19ad990d7c1a064a4eb5ab3e265d5ba443 100644 (file)
@@ -667,11 +667,6 @@ out_free:
        if (!interactive) 
                reopen_logs();
        
-       /* Load smb.conf file */
-
-       if (!lp_load(dyn_CONFIGFILE,True,False,False))
-               fprintf(stderr, "Can't load %s\n", dyn_CONFIGFILE);
-
        /* Parse options */
 
        pc = poptGetContext("rpcclient", argc, (const char **) argv,
@@ -711,6 +706,11 @@ out_free:
        if (!init_names())
                return 1;
 
+       /* Load smb.conf file */
+
+       if (!lp_load(dyn_CONFIGFILE,True,False,False))
+               fprintf(stderr, "Can't load %s\n", dyn_CONFIGFILE);
+
        /*
         * Get password
         * from stdin if necessary