smbcacls: parse config file argument prior to load
authorDavid Disseldorp <ddiss@samba.org>
Mon, 7 Jul 2014 13:24:19 +0000 (15:24 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 7 Jul 2014 21:30:50 +0000 (23:30 +0200)
Fixes usage with the common "-s|--configfile" parameter.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jul  7 23:30:50 CEST 2014 on sn-devel-104

source3/utils/smbcacls.c

index 47d75fe34494484e90e30c0c8a4321577c0f887a..c77122569c0053bf7209c7db7b05885a4c4df2da 100644 (file)
@@ -1408,8 +1408,6 @@ int main(int argc, char *argv[])
 
        setlinebuf(stdout);
 
-       lp_load_global(get_dyn_CONFIGFILE());
-       load_interfaces();
 
        auth_info = user_auth_info_init(frame);
        if (auth_info == NULL) {
@@ -1480,6 +1478,9 @@ int main(int argc, char *argv[])
                return -1;
        }
 
+       lp_load_global(get_dyn_CONFIGFILE());
+       load_interfaces();
+
        filename = talloc_strdup(frame, poptGetArg(pc));
        if (!filename) {
                return -1;