diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 5 | ||||
-rw-r--r-- | source3/client/smbctool.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 94fcaaca00..d7fe4d43c3 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3422,8 +3422,9 @@ static int do_message_op(void) /* set default debug level to 0 regardless of what smb.conf sets */ setup_logging( "smbclient", True ); DEBUGLEVEL_CLASS[DBGC_ALL] = 1; - dbf = x_stderr; - x_setbuf( x_stderr, NULL ); + if ((dbf = x_fdup(x_stderr))) { + x_setbuf( dbf, NULL ); + } pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); diff --git a/source3/client/smbctool.c b/source3/client/smbctool.c index 5b21d195b7..b3acca5573 100644 --- a/source3/client/smbctool.c +++ b/source3/client/smbctool.c @@ -3561,10 +3561,11 @@ static int do_message_op(void) set_global_myname( "" ); /* set default debug level to 0 regardless of what smb.conf sets */ - setup_logging( "smbclient", True ); + setup_logging( "smbctool", True ); DEBUGLEVEL_CLASS[DBGC_ALL] = 1; - dbf = x_stderr; - x_setbuf( x_stderr, NULL ); + if ((dbf = x_fdup(x_stderr))) { + x_setbuf( dbf, NULL ); + } pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, POPT_CONTEXT_KEEP_FIRST); |