]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Add "notify-cleanup" to smbcontrol
authorVolker Lendecke <vl@samba.org>
Wed, 4 Apr 2012 12:49:21 +0000 (14:49 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Apr 2012 08:21:03 +0000 (10:21 +0200)
This triggers a notify cleanup run which would normally only run periodically

source3/utils/smbcontrol.c

index 7d7eb1275a344d487e462b2307410df5c3df1c71..95c56b03c8c65b14ed382ed86f5a5d45eb02b974 100644 (file)
@@ -1254,6 +1254,18 @@ static bool do_nodestatus(struct tevent_context *ev_ctx,
        return send_message(msg_ctx, pid, MSG_SEND_PACKET, &p, sizeof(p));
 }
 
+static bool do_notify_cleanup(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 smbd notify-cleanup\n");
+               return false;
+       }
+       return send_message(msg_ctx, pid, MSG_SMB_NOTIFY_CLEANUP, NULL, 0);
+}
+
 /* A list of message type supported */
 
 static const struct {
@@ -1296,6 +1308,7 @@ static const struct {
        { "validate-cache" , do_winbind_validate_cache,
          "Validate winbind's credential cache" },
        { "dump-domain-list", do_winbind_dump_domain_list, "Dump winbind domain list"},
+       { "notify-cleanup", do_notify_cleanup },
        { "noop", do_noop, "Do nothing" },
        { NULL }
 };