summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-09-23 08:39:49 +0200
committerKarolin Seeger <kseeger@samba.org>2012-09-28 09:23:07 +0200
commit6d9841db350aae14e26b23fa79a48786274e084c (patch)
treedc2080ab0c61b34f08849d00dfa6d57a04ace2b4
parent4ee9a57f4ee14812b636e1e5036bec1b9189dc2e (diff)
downloadsamba-6d9841db350aae14e26b23fa79a48786274e084c.tar.gz
s3:printing only do printing_subsystem_update when printing is enabled
no point in calling this if printing was disabled and no spoolss service was started this hurts CTDB clusters as the smbds on the cluster nodes will fight for the single record in the TDB This fixes Bug 9197 - Disabling printing still makes smbd create and access printer_list.tdb
-rw-r--r--source3/smbd/server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index d53b19a57f3..15762d84e9d 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1529,7 +1529,10 @@ extern void build_options(bool screen);
/* do a printer update now that all messaging has been set up,
* before we allow clients to start connecting */
- printing_subsystem_update(ev_ctx, msg_ctx, false);
+ if (!lp__disable_spoolss() &&
+ (rpc_spoolss_daemon() != RPC_DAEMON_DISABLED)) {
+ printing_subsystem_update(ev_ctx, msg_ctx, false);
+ }
TALLOC_FREE(frame);
/* make sure we always have a valid stackframe */