diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-03 17:25:47 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-03 17:25:47 +0000 |
commit | 322ac5a628b2961cbf0cfc670b96dd48051e7aa1 (patch) | |
tree | 41fd929ce8bed5bb56583c7c81b4b72030dff923 /etc/inc/priv.inc | |
parent | 45335fc4a41c15b9261de60402f474fbb33b1347 (diff) | |
download | pfsense-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.inc | 15 |
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;
}
|