[asterisk-commits] tilghman: trunk r97655 - /trunk/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 9 18:39:35 CST 2008


Author: tilghman
Date: Wed Jan  9 18:39:34 2008
New Revision: 97655

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97655
Log:
oops, missed the case of a 0 permission (which should mean everybody is allowed, not nobody)

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=97655&r1=97654&r2=97655
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Wed Jan  9 18:39:34 2008
@@ -1392,7 +1392,7 @@
 
 	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 @@
 	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");




More information about the asterisk-commits mailing list