Bug 8609 - libsmbclient: No method to do lp_set_cmdline("log level", "0") before loading smb.conf
Summary: libsmbclient: No method to do lp_set_cmdline("log level", "0") before loading...
Status: NEW
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.6.10
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-14 16:47 UTC by SATOH Fumiyasu
Modified: 2012-12-18 05:52 UTC (History)
0 users

See Also:


Attachments
Hack to make libsmbclient debug level as global option (1.26 KB, patch)
2011-11-17 17:31 UTC, SATOH Fumiyasu
no flags Details
Introduce LIBSMBCLIENT_DEBUG_LEVEL envvar support (1.14 KB, patch)
2011-11-17 17:54 UTC, SATOH Fumiyasu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description SATOH Fumiyasu 2011-11-14 16:47:19 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.
Comment 1 SATOH Fumiyasu 2011-11-17 17:31:06 UTC
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);.
Comment 2 SATOH Fumiyasu 2011-11-17 17:54:25 UTC
Created attachment 7112 [details]
Introduce LIBSMBCLIENT_DEBUG_LEVEL envvar support

Another hack.
Comment 3 SATOH Fumiyasu 2012-12-18 05:49:43 UTC
Any comment?