MINOR: cli: Block the usage of the command "acl add" in many cases.
If acl is shared with a map, the "add acl" command must be blocked
because it not take a sample on his parameters. The absense of this
parameter can cause error with corresponding maps.
diff --git a/src/dumpstats.c b/src/dumpstats.c
index a796cd7..202bd71 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -2041,6 +2041,17 @@
return 1;
}
+ /* The command "add acl" is prohibited if the reference
+ * use samples.
+ */
+ if ((appctx->ctx.map.display_flags & PAT_REF_ACL) &&
+ (appctx->ctx.map.ref->flags & PAT_REF_SMP)) {
+ appctx->ctx.cli.msg = "This ACL is shared with a map containing samples. "
+ "You must use the command 'add map' to add values.\n";
+ appctx->st0 = STAT_CLI_PRINT;
+ return 1;
+ }
+
/* Add value. */
err = NULL;
if (appctx->ctx.map.display_flags == PAT_REF_MAP)