]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils: Use lpcfg_set_cmdline() in smbcquotas
authorPavel Kalugin <pkalugin@inno.tech>
Mon, 7 Aug 2023 04:43:06 +0000 (07:43 +0300)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 23 Aug 2023 08:27:30 +0000 (08:27 +0000)
Signed-off-by: Pavel Kalugin <pkalugin@inno.tech>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/smbcquotas.c

index ce8ca2fafd0baec0e823b14db07cd787f8daa0e5..d809434833925509dccc6a57eda40674d373dd11 100644 (file)
@@ -29,6 +29,7 @@
 #include "fake_file.h"
 #include "../libcli/security/security.h"
 #include "libsmb/libsmb.h"
+#include "lib/param/param.h"
 
 static char *server;
 
@@ -558,6 +559,7 @@ int main(int argc, char *argv[])
        poptContext pc;
        struct cli_credentials *creds = NULL;
        bool ok;
+       struct loadparm_context *lp_ctx = NULL;
 
        struct poptOption long_options[] = {
                POPT_AUTOHELP
@@ -651,8 +653,9 @@ int main(int argc, char *argv[])
                TALLOC_FREE(frame);
                exit(1);
        }
+       lp_ctx = samba_cmdline_get_lp_ctx();
        /* set default debug level to 1 regardless of what smb.conf sets */
-       lp_set_cmdline("log level", "1");
+       lpcfg_set_cmdline(lp_ctx, "log level", "1");
 
        setlinebuf(stdout);
 
@@ -720,8 +723,9 @@ int main(int argc, char *argv[])
                        todo = SET_QUOTA;
                        break;
                case 'm':
-                       lp_set_cmdline("client max protocol",
-                                      poptGetOptArg(pc));
+                       lpcfg_set_cmdline(lp_ctx,
+                                         "client max protocol",
+                                         poptGetOptArg(pc));
                        break;
                case POPT_ERROR_BADOPT:
                        fprintf(stderr, "\nInvalid option %s: %s\n\n",