1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:utils: Fix setting the debug level

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15525

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Dec  7 05:33:21 UTC 2023 on atb-devel-224
This commit is contained in:
Andreas Schneider 2023-12-06 08:48:34 +01:00 committed by Andrew Bartlett
parent e5fe856e76
commit 763b2efe69

View File

@ -849,6 +849,7 @@ int main(int argc, char **argv)
uint32_t gensec_features;
bool use_wbccache = false;
SMBCCTX *smb_ctx = NULL;
int dbg_lvl = -1;
int rc;
smb_init_locale();
@ -922,13 +923,16 @@ int main(int argc, char **argv)
samba_cmdline_burn(argc, argv);
/* smbc_new_context() will set the log level to 0 */
dbg_lvl = debuglevel_get();
smb_ctx = smbc_new_context();
if (smb_ctx == NULL) {
fprintf(stderr, "Unable to initialize libsmbclient\n");
ok = false;
goto done;
}
smbc_setDebug(smb_ctx, debuglevel_get());
smbc_setDebug(smb_ctx, dbg_lvl);
rc = smbc_setConfiguration(smb_ctx, lp_default_path());
if (rc < 0) {