diff options
author | Tim Potter <tpot@samba.org> | 2003-01-23 03:02:08 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-01-23 03:02:08 +0000 |
commit | 644d31ae25c696e88148632362b8c55646008efc (patch) | |
tree | 6db9962f0a56232eb1c42a9e379d3e1794d563b0 /source3/smbd | |
parent | 1c4eacafbafd11afa1992cd1f18a421d7737139c (diff) | |
download | samba-644d31ae25c696e88148632362b8c55646008efc.tar.gz samba-644d31ae25c696e88148632362b8c55646008efc.tar.bz2 samba-644d31ae25c696e88148632362b8c55646008efc.zip |
Merge of max log file fixes from appliance:
- smbd/process.c: check log file sizes more often than in
timeout_processing()
- lib/debug.c: increment debug_count inside Debug1() instead of
when log file sizes are checked.
(This used to be commit 303710c2065850beebef678e657633497e4d8452)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index ff84dc8e1a..2b92b9910f 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1314,5 +1314,17 @@ void smbd_process(void) last_timeout_processing_time = new_check_time; /* Reset time. */ } } + + /* The timeout_processing function isn't run nearly + often enough to implement 'max log size' without + overrunning the size of the file by many megabytes. + This is especially true if we are running at debug + level 10. Checking every 50 SMBs is a nice + tradeoff of performance vs log file size overrun. */ + + if ((num_smbs % 50) == 0 && need_to_check_log_size()) { + change_to_root_user(); + check_log_size(); + } } } |