summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2012-01-10 16:59:38 +0100
committerVolker Lendecke <vl@samba.org>2012-04-06 08:19:13 +0200
commit7ff42f3746c88ee999ec1e87b31c741bce016576 (patch)
treefcbe79d2434319a53379572ed00c2a4b0af398f7 /source3/utils
parent6aa12fcb30c8f7246fd0215b1d808191c0d87668 (diff)
downloadsamba-7ff42f3746c88ee999ec1e87b31c741bce016576.tar.gz
samba-7ff42f3746c88ee999ec1e87b31c741bce016576.tar.bz2
samba-7ff42f3746c88ee999ec1e87b31c741bce016576.zip
s3-utils: add do_reload_printers command to smbcontol
Add command to force smbd to reload printers by sending MSG_PRINTER_PCAP.
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcontrol.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 5699f23304..7d7eb1275a 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -1192,6 +1192,19 @@ static bool do_reload_config(struct tevent_context *ev_ctx,
return send_message(msg_ctx, pid, MSG_SMB_CONF_UPDATED, NULL, 0);
}
+static bool do_reload_printers(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
+ const struct server_id pid,
+ const int argc, const char **argv)
+{
+ if (argc != 1) {
+ fprintf(stderr, "Usage: smbcontrol <dest> reload-printers\n");
+ return False;
+ }
+
+ return send_message(msg_ctx, pid, MSG_PRINTER_PCAP, NULL, 0);
+}
+
static void my_make_nmb_name( struct nmb_name *n, const char *name, int type)
{
fstring unix_name;
@@ -1274,6 +1287,7 @@ static const struct {
{ "shutdown", do_shutdown, "Shut down daemon" },
{ "drvupgrade", do_drvupgrade, "Notify a printer driver has changed" },
{ "reload-config", do_reload_config, "Force smbd or winbindd to reload config file"},
+ { "reload-printers", do_reload_printers, "Force smbd to reload printers"},
{ "nodestatus", do_nodestatus, "Ask nmbd to do a node status request"},
{ "online", do_winbind_online, "Ask winbind to go into online state"},
{ "offline", do_winbind_offline, "Ask winbind to go into offline state"},