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.
Created attachment 8353 [details] Proposed patch for master (revised)
Created attachment 8354 [details] Proposed patch for v3-6-test
In my proposed patch, DEBUG(0, ("Could not resolve %s\n", path)); should be DEBUG(1, ("Could not resolve %s\n", path)); ?
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.