summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-01-30 04:38:39 +0000
committerTim Potter <tpot@samba.org>2003-01-30 04:38:39 +0000
commit142837e5d3bd9d3d853fc1c2eb181fea87a38d3a (patch)
tree707fb4f29934c346cdb06c778b3907d02f3fa06a /source3/smbd/process.c
parent97027aa5ff4ba6bb05f66458e9b8db98c194c619 (diff)
downloadsamba-142837e5d3bd9d3d853fc1c2eb181fea87a38d3a.tar.gz
samba-142837e5d3bd9d3d853fc1c2eb181fea87a38d3a.tar.bz2
samba-142837e5d3bd9d3d853fc1c2eb181fea87a38d3a.zip
Merge of controversial 'max log size' fix.
(This used to be commit 71e2b60d8f784174cd2a75c5e03bf2a6ab353900)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 8018d5f6f6..98ec6ce184 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();
+ }
}
}