summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-06-16 15:36:06 -0400
committerGünther Deschner <gd@samba.org>2011-03-29 16:03:50 +0200
commit0b7b8414ddb94ea05c633ec655493db4ffcad3cd (patch)
treee319aae72a7bc63653a3f1e12f80770709392db0
parent2d333ae8bc42a5aab7df6985b1432e3a480e74dc (diff)
downloadsamba-0b7b8414ddb94ea05c633ec655493db4ffcad3cd.tar.gz
samba-0b7b8414ddb94ea05c633ec655493db4ffcad3cd.tar.bz2
samba-0b7b8414ddb94ea05c633ec655493db4ffcad3cd.zip
s3:spoolssd handle smb.conf reloads directly
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--source3/printing/spoolssd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/printing/spoolssd.c b/source3/printing/spoolssd.c
index b501a33755..1668bd886d 100644
--- a/source3/printing/spoolssd.c
+++ b/source3/printing/spoolssd.c
@@ -37,6 +37,18 @@ static void spoolss_reopen_logs(void)
reopen_logs();
}
+static void smb_conf_updated(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+ DEBUG(10, ("Got message saying smb.conf was updated. Reloading.\n"));
+ change_to_root_user();
+ reload_printers(msg);
+ spoolss_reopen_logs();
+}
+
void start_spoolssd(void)
{
pid_t pid;
@@ -86,6 +98,8 @@ void start_spoolssd(void)
messaging_register(server_messaging_context(), NULL,
MSG_PRINTER_UPDATE, print_queue_receive);
+ messaging_register(server_messaging_context(), NULL,
+ MSG_SMB_CONF_UPDATED, smb_conf_updated);
if (!setup_named_pipe_socket(SPOOLSS_PIPE_NAME, server_event_context())) {
exit(1);