From: Pavel Kalugin Date: Mon, 7 Aug 2023 04:43:06 +0000 (+0300) Subject: s3:utils: Use lpcfg_set_cmdline() in smbcquotas X-Git-Tag: tevent-0.16.0~834 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=16a4c8c871f4c087f0cbefabaa14e4dfe5b6b798;p=thirdparty%2Fsamba.git s3:utils: Use lpcfg_set_cmdline() in smbcquotas Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider --- diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index ce8ca2fafd0..d8094348339 100644 --- a/source3/utils/smbcquotas.c +++ b/source3/utils/smbcquotas.c @@ -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",