summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-29 14:49:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:53 -0500
commit3f5742e20b30010ef88e19b6ee41c6b071258aee (patch)
tree06ca13e711f78bbe7a39d592ff21662cafc90476 /source3/utils
parentd3ed91d9e1f3ba9f3d5093b3607dd563b37c27ed (diff)
downloadsamba-3f5742e20b30010ef88e19b6ee41c6b071258aee.tar.gz
samba-3f5742e20b30010ef88e19b6ee41c6b071258aee.tar.bz2
samba-3f5742e20b30010ef88e19b6ee41c6b071258aee.zip
r23204: Add MSG_SMB_BRL_VALIDATE. Tridge, this is a bit different from your bzr
branch, please check if it fulfils your needs. Two changes: The validation is not done inside the brlock.c traverse_fn, it's done as a separate routine. Secondly, this patch does not call the checker routines in smbcontrol directly but depends on a running smbd. (This used to be commit 7e39d77c1f90d9025cab08918385d140e20ca25b)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcontrol.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 2b927adb96..1a1a190957 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -698,6 +698,34 @@ static BOOL do_closeshare(struct messaging_context *msg_ctx,
strlen(argv[1]) + 1);
}
+/* force a blocking lock retry */
+
+static BOOL do_lockretry(struct messaging_context *msg_ctx,
+ const struct server_id pid,
+ const int argc, const char **argv)
+{
+ if (argc != 1) {
+ fprintf(stderr, "Usage: smbcontrol <dest> lockretry\n");
+ return False;
+ }
+
+ return send_message(msg_ctx, pid, MSG_SMB_UNLOCK, NULL, 0);
+}
+
+/* force a validation of all brl entries, including re-sends. */
+
+static BOOL do_brl_revalidate(struct messaging_context *msg_ctx,
+ const struct server_id pid,
+ const int argc, const char **argv)
+{
+ if (argc != 1) {
+ fprintf(stderr, "Usage: smbcontrol <dest> brl-revalidate\n");
+ return False;
+ }
+
+ return send_message(msg_ctx, pid, MSG_SMB_BRL_VALIDATE, NULL, 0);
+}
+
/* Force a SAM synchronisation */
static BOOL do_samsync(struct messaging_context *msg_ctx,
@@ -1037,6 +1065,8 @@ static const struct {
{ "debuglevel", do_debuglevel, "Display current debuglevels" },
{ "printnotify", do_printnotify, "Send a print notify message" },
{ "close-share", do_closeshare, "Forcibly disconnect a share" },
+ { "lockretry", do_lockretry, "Force a blocking lock retry" },
+ { "brl-revalidate", do_brl_revalidate, "Revalidate all brl entries" },
{ "samsync", do_samsync, "Initiate SAM synchronisation" },
{ "samrepl", do_samrepl, "Initiate SAM replication" },
{ "pool-usage", do_poolusage, "Display talloc memory usage" },