s3-rpcclient: Ensure interfaces are loaded after smb.conf
authorAndrew Bartlett <abartlet@samba.org>
Fri, 2 Mar 2012 02:07:09 +0000 (13:07 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 2 Mar 2012 04:27:16 +0000 (05:27 +0100)
This ensures that the interfaces line in the smb.conf is honoured.

Andrew Bartlett

source3/rpcclient/rpcclient.c

index ff4354f8189ec19b3397ed3018b54e0e9b80c1cf..43df6723fcb59773ab74848fde650d1b05513307 100644 (file)
@@ -956,8 +956,6 @@ out_free:
 
        poptFreeContext(pc);
 
-       load_interfaces();
-
        if (!init_names()) {
                result = 1;
                goto done;
@@ -968,6 +966,9 @@ out_free:
        if (!lp_load_global(get_dyn_CONFIGFILE()))
                fprintf(stderr, "Can't load %s\n", get_dyn_CONFIGFILE());
 
+       /* We must load interfaces after we load the smb.conf */
+       load_interfaces();
+
        /*
         * Get password
         * from stdin if necessary