summaryrefslogtreecommitdiffstats
path: root/etc/inc/priv.inc
diff options
context:
space:
mode:
authorMatthew Grooms <mgrooms@pfsense.org>2008-09-03 17:25:47 +0000
committerMatthew Grooms <mgrooms@pfsense.org>2008-09-03 17:25:47 +0000
commit322ac5a628b2961cbf0cfc670b96dd48051e7aa1 (patch)
tree41fd929ce8bed5bb56583c7c81b4b72030dff923 /etc/inc/priv.inc
parent45335fc4a41c15b9261de60402f474fbb33b1347 (diff)
downloadpfsense-322ac5a628b2961cbf0cfc670b96dd48051e7aa1.zip
pfsense-322ac5a628b2961cbf0cfc670b96dd48051e7aa1.tar.gz
Correct a regression in the privilege system where pages were not being
matched correctly. Reported by Seth.
Diffstat (limited to 'etc/inc/priv.inc')
-rw-r--r--etc/inc/priv.inc15
1 files changed, 9 insertions, 6 deletions
diff --git a/etc/inc/priv.inc b/etc/inc/priv.inc
index dfacf55..e03e160 100644
--- a/etc/inc/priv.inc
+++ b/etc/inc/priv.inc
@@ -91,6 +91,9 @@ function sort_privs(& $privs) {
function cmp_page_matches($page, & $matches, $fullwc = true) {
+// $dbg_matches = implode(",", $matches);
+// log_error("debug: checking page {$page} match with {$dbg_matches}");
+
if (!is_array($matches))
return false;
@@ -202,7 +205,7 @@ function isAllowedPage($page) {
return true;
/* user privelege access check */
- if (cmp_page_matches($page, $allowed_pages))
+ if (cmp_page_matches($page, $_SESSION['page-match']))
return true;
return false;
@@ -262,12 +265,12 @@ function getAllowedPages($username) {
if (in_array($group['name'], $allowed_groups))
getPrivPages($group, $allowed_pages);
- $allowed_groups = print_r($allowed_groups, true);
- $fdny = fopen("/tmp/groups", "w");
- fwrite($fdny, $allowed_groups);
- fclose($fdny);
+// $dbg_pages = implode(",", $allowed_pages);
+// $dbg_groups = implode(",", $allowed_groups);
+// log_error("debug: user {$username} groups = {$dbg_groups}");
+// log_error("debug: user {$username} pages = {$dbg_pages}");
- $_SESSION['privs'] = $allowed_pages;
+ $_SESSION['page-match'] = $allowed_pages;
return $allowed_pages;
}
OpenPOWER on IntegriCloud