git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c75ad6
)
ctdb-cluster-mutex: Ensure that the configured command is not empty
author
Martin Schwenke
<martin@meltin.net>
Fri, 7 Jun 2019 20:56:00 +0000
(06:56 +1000)
committer
Amitay Isaacs
<amitay@samba.org>
Fri, 5 Jul 2019 05:03:23 +0000
(
05:03
+0000)
... and does not just contain whitespace.
Otherwise NULL can be passed as the first argument to execv().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_cluster_mutex.c
patch
|
blob
|
history
diff --git
a/ctdb/server/ctdb_cluster_mutex.c
b/ctdb/server/ctdb_cluster_mutex.c
index 2e3cb8112ad6cea6b22a356c59c8fe9a6c976552..719b5c14f7a10c5adc5967e7e8ba9559767e7ae8 100644
(file)
--- a/
ctdb/server/ctdb_cluster_mutex.c
+++ b/
ctdb/server/ctdb_cluster_mutex.c
@@
-176,6
+176,10
@@
static bool cluster_mutex_helper_args_cmd(TALLOC_CTX *mem_ctx,
return false;
}
n = strv_count(strv);
+ if (n == 0) {
+ D_ERR("Mutex helper command is empty \"%s\"\n", argstring);
+ return false;
+ }
/* Extra slot for NULL */
args = talloc_array(mem_ctx, char *, n + 1);