summaryrefslogtreecommitdiffstats
path: root/source/smbd/server.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-10 21:52:36 +0000
committerJeremy Allison <jra@samba.org>2000-10-10 21:52:36 +0000
commit5e09611acf02bff78647608274fb4a544c4f51a6 (patch)
treefe6864ebff9ff3a602cf440bcf3e93f13b8c479f /source/smbd/server.c
parentb17eadb2220c0fc85cea57466887c3ff9c6481ab (diff)
downloadsamba-5e09611acf02bff78647608274fb4a544c4f51a6.tar.gz
samba-5e09611acf02bff78647608274fb4a544c4f51a6.tar.xz
samba-5e09611acf02bff78647608274fb4a544c4f51a6.zip
Fixes to periodically scan printing.tdb in idle time and occasionally
on exit. Needed to fix printing.tdb from groving to 300Mb+ if being driven by smbclient clients that never ask for status... (effective DOS attack :-). Jeremy.
Diffstat (limited to 'source/smbd/server.c')
-rw-r--r--source/smbd/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/smbd/server.c b/source/smbd/server.c
index 4442a1f71f6..22a95fdd18c 100644
--- a/source/smbd/server.c
+++ b/source/smbd/server.c
@@ -422,6 +422,10 @@ void exit_server(char *reason)
respond_to_all_remaining_local_messages();
+ /* Don't do this on every exit... */
+ if (sys_random() % 10)
+ process_print_queue(time(NULL));
+
#ifdef WITH_DFS
if (dcelogin_atmost_once) {
dfs_unlogin();