The Samba-Bugzilla – Bug 8609
libsmbclient: No method to do lp_set_cmdline("log level", "0") before loading smb.conf
Last modified: 2012-12-18 05:52:53 UTC
I'm writing a Ruby module that uses libsmbclient to connect to
SMB/CIFS services. For this module, I want to ignore "log level = X"
in the smb.conf, but there is no method to do it, like doing
lp_set_cmdline("log level", "0") before the first smbc_new_context()
(SMBC_module_init()) is called.
Created attachment 7111 [details]
Hack to make libsmbclient debug level as global option
With this patch, I can call smbc_setDebug(NULL, 0) to do
lp_set_cmdline("log level", "0").
But originally "log level" is the global option, thus we should
create another API function such as smbc_setGlobalOptionDebug(int debug);.
Created attachment 7112 [details]
Introduce LIBSMBCLIENT_DEBUG_LEVEL envvar support