s3:client: Make it possible use smbspool in selftest
authorAndreas Schneider <asn@samba.org>
Mon, 24 Jul 2017 10:27:50 +0000 (12:27 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 25 Jul 2017 07:14:19 +0000 (09:14 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/client/smbspool.c

index f8489d0d9cf02d7501c35dbea20de944a1ac2869..71c026119adb8b8955c841518b43886816d9ea62 100644 (file)
@@ -26,6 +26,7 @@
 #include "system/filesys.h"
 #include "system/passwd.h"
 #include "libsmb/libsmb.h"
+#include "lib/param/param.h"
 
 /*
  * Starting with CUPS 1.3, Kerberos support is provided by cupsd including
@@ -96,6 +97,7 @@ main(int argc,                        /* I - Number of command-line arguments */
        int             tries = 0;
        bool            need_auth = true;
        const char     *dev_uri;
+       const char     *config_file = NULL;
        TALLOC_CTX     *frame = talloc_stackframe();
 
        null_str[0] = '\0';
@@ -244,8 +246,11 @@ main(int argc,                     /* I - Number of command-line arguments */
 
        smb_init_locale();
 
-       if (!lp_load_client(get_dyn_CONFIGFILE())) {
-               fprintf(stderr, "ERROR: Can't load %s - run testparm to debug it\n", get_dyn_CONFIGFILE());
+       config_file = lp_default_path();
+       if (!lp_load_client(config_file)) {
+               fprintf(stderr,
+                       "ERROR: Can't load %s - run testparm to debug it\n",
+                       config_file);
                goto done;
        }