summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-11-08 23:05:34 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-11-08 23:05:34 +0000
commitc501ac2bfa4b9fa88c402bb0313312ea0f565443 (patch)
tree5c753104c95368c9947f70390e01ac412e0d9762 /source3/lib
parent48b32cd865b572c797e6f5de1b8a574bd86e250a (diff)
downloadsamba-c501ac2bfa4b9fa88c402bb0313312ea0f565443.tar.gz
samba-c501ac2bfa4b9fa88c402bb0313312ea0f565443.tar.bz2
samba-c501ac2bfa4b9fa88c402bb0313312ea0f565443.zip
Compleatly remove support for logfile truncation. All logs are opened for
append writes. (blessed by jra) Andrew Bartlett (This used to be commit 81633064dd196c40541ecece8def51745f514646)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/debug.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 483db71b85..f2a362bb86 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -74,15 +74,12 @@
*
* dbf - Global debug file handle.
* debugf - Debug file name.
- * append_log - If True, then the output file will be opened in append
- * mode.
* DEBUGLEVEL - System-wide debug message limit. Messages with message-
* levels higher than DEBUGLEVEL will not be processed.
*/
XFILE *dbf = NULL;
pstring debugf = "";
-BOOL append_log = False;
BOOL debug_warn_unknown_class = True;
BOOL debug_auto_add_unknown_class = True;
BOOL AllowDebugChange = True;
@@ -576,10 +573,7 @@ BOOL reopen_logs( void )
}
pstrcpy( debugf, fname );
- if (append_log)
- new_dbf = x_fopen( debugf, O_WRONLY|O_APPEND|O_CREAT, 0644);
- else
- new_dbf = x_fopen( debugf, O_WRONLY|O_CREAT|O_TRUNC, 0644 );
+ new_dbf = x_fopen( debugf, O_WRONLY|O_APPEND|O_CREAT, 0644);
if (!new_dbf) {
log_overflow = True;
@@ -731,10 +725,7 @@ void check_log_size( void )
{
mode_t oldumask = umask( 022 );
- if( append_log )
- dbf = x_fopen( debugf, O_WRONLY|O_APPEND|O_CREAT, 0644 );
- else
- dbf = x_fopen( debugf, O_WRONLY|O_CREAT|O_TRUNC, 0644 );
+ dbf = x_fopen( debugf, O_WRONLY|O_APPEND|O_CREAT, 0644 );
(void)umask( oldumask );
if( dbf )
{