aboutsummaryrefslogtreecommitdiffstats
path: root/main/manager.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-10 00:39:34 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-10 00:39:34 +0000
commit928cdf67bc1889f67b5fd51101e326492bda70ab (patch)
treec13127aa529c15ee0557156b72851ec18be882b8 /main/manager.c
parentc46162bb4ce79beca38b36c48f25aa81b0735808 (diff)
oops, missed the case of a 0 permission (which should mean everybody is allowed, not nobody)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97655 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/manager.c b/main/manager.c
index ba3ad9264..a2ed42885 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -1392,7 +1392,7 @@ static int action_listcommands(struct mansession *s, const struct message *m)
astman_start_ack(s, m);
AST_RWLIST_TRAVERSE(&actions, cur, list) {
- if (s->writeperm & cur->authority)
+ if (s->writeperm & cur->authority || cur->authority == 0)
astman_append(s, "%s: %s (Priv: %s)\r\n",
cur->action, cur->synopsis, authority_to_str(cur->authority, &temp));
}
@@ -2510,7 +2510,7 @@ static int process_message(struct mansession *s, const struct message *m)
AST_RWLIST_TRAVERSE(&actions, tmp, list) {
if (strcasecmp(action, tmp->action))
continue;
- if (s->writeperm & tmp->authority)
+ if (s->writeperm & tmp->authority || tmp->authority == 0)
ret = tmp->func(s, m);
else
astman_send_error(s, m, "Permission denied");