MINOR: cli: add ACCESS_LVL_MASK to store the access level
The current level variable use only 2 bits for storing the 3 access
level (user, oper and admin).
This patch add a bitmask which allows to use the remaining bits for
other usage.
diff --git a/src/stick_table.c b/src/stick_table.c
index a03a824..8cc7dd2 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -2253,7 +2253,7 @@
/* any other information should be dumped here */
- if (target && strm_li(s)->bind_conf->level < ACCESS_LVL_OPER)
+ if (target && (strm_li(s)->bind_conf->level & ACCESS_LVL_MASK) < ACCESS_LVL_OPER)
chunk_appendf(msg, "# contents not dumped due to insufficient privileges\n");
if (bi_putchk(si_ic(si), msg) == -1) {
@@ -2667,7 +2667,7 @@
return 0;
if (appctx->ctx.table.target &&
- strm_li(s)->bind_conf->level >= ACCESS_LVL_OPER) {
+ (strm_li(s)->bind_conf->level & ACCESS_LVL_MASK) >= ACCESS_LVL_OPER) {
/* dump entries only if table explicitly requested */
eb = ebmb_first(&appctx->ctx.table.proxy->table.keys);
if (eb) {