Bug 9507 - libsmbclient puts "Could not resolve \path" to stdout regardless of smbc_setOptionDebugToStderr()
libsmbclient puts "Could not resolve \path" to stdout regardless of smbc_setO...
Status: NEW
Product: Samba 4.0
Classification: Unclassified
Component: libsmbclient
4.0.0
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-17 10:48 UTC by SATOH Fumiyasu
Modified: 2012-12-31 08:48 UTC (History)
0 users

See Also:


Attachments
Proposed patch for master (6.11 KB, patch)
2012-12-17 10:48 UTC, SATOH Fumiyasu
no flags Details
Proposed patch for master (revised) (6.62 KB, patch)
2012-12-17 11:00 UTC, SATOH Fumiyasu
no flags Details
Proposed patch for v3-6-test (6.46 KB, patch)
2012-12-17 11:00 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 2012-12-17 10:48:11 UTC
Created attachment 8352 [details]
Proposed patch for master

I'm using libsmbclient.so for my private program that communicates
with another process via stdin/stdout. When cli_resolve_path() in
libsmbclient.so fails by some reason, libsmbclient.so puts
"Could not resolve \path" message to stdout regardless of
smbc_setOptionDebugToStderr() setting.
Comment 1 SATOH Fumiyasu 2012-12-17 11:00:01 UTC
Created attachment 8353 [details]
Proposed patch for master (revised)
Comment 2 SATOH Fumiyasu 2012-12-17 11:00:48 UTC
Created attachment 8354 [details]
Proposed patch for v3-6-test
Comment 3 SATOH Fumiyasu 2012-12-17 13:00:00 UTC
In my proposed patch,

  DEBUG(0, ("Could not resolve %s\n", path));

should be

  DEBUG(1, ("Could not resolve %s\n", path));

?
Comment 4 Andrew Bartlett 2012-12-31 08:48:41 UTC
The issue I see here is that we are mixing up routines written to be part of command line tools only with library usage, which I agree must not just arbitrarily write to stdout.

We need to fix more than just this message however, we need to fix any and all d_printf() calls that can be made from libsmbclient. 

Given the limited options available, changing these to DEBUG() seems the best available option, sadly we don't have a better way of sending 'normal' messages to the user from this layer.