debug: Remove codepath to open file in Debug1
authorChristof Schmitt <cs@samba.org>
Fri, 9 Jan 2015 21:51:00 +0000 (14:51 -0700)
committerChristof Schmitt <cs@samba.org>
Mon, 23 Mar 2015 20:22:11 +0000 (21:22 +0100)
This is not used, the log file is already open from the call to
reopen_logs_internal.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
lib/util/debug.c

index 412333b4fbe13cf33fe8ad2a4c11bf26cf61ec05..1d8bf811de270bb9e80c804171e566e5415f9b52 100644 (file)
@@ -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);