From: Christof Schmitt Date: Fri, 9 Jan 2015 21:51:00 +0000 (-0700) Subject: debug: Remove codepath to open file in Debug1 X-Git-Tag: tdb-1.3.5~312 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25bd64ffb2f214fa1230dbc8f9230fc91dd2b786;p=thirdparty%2Fsamba.git debug: Remove codepath to open file in Debug1 This is not used, the log file is already open from the call to reopen_logs_internal. Signed-off-by: Christof Schmitt Reviewed-by: Amitay Isaacs --- diff --git a/lib/util/debug.c b/lib/util/debug.c index 412333b4fbe..1d8bf811de2 100644 --- a/lib/util/debug.c +++ b/lib/util/debug.c @@ -1036,23 +1036,6 @@ static int Debug1(const char *msg) goto done; } -#ifdef WITH_SYSLOG - if( !state.settings.syslog_only) -#endif - { - if( state.fd <= 0 ) { - mode_t oldumask = umask( 022 ); - int fd = open( state.debugf, O_WRONLY|O_APPEND|O_CREAT, 0644 ); - (void)umask( oldumask ); - if(fd == -1) { - goto done; - } - smb_set_close_on_exec(fd); - state.fd = fd; - } - } - - #ifdef WITH_SYSLOG if( current_msg_level < state.settings.syslog ) { int priority = debug_level_to_priority(current_msg_level);