summaryrefslogtreecommitdiffstats
path: root/etc/inc/auth.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-06-05 19:37:45 +0000
committerErmal <eri@pfsense.org>2012-06-05 19:37:45 +0000
commit1492e02cb4f48de3ff33ed4d4db013aac00087d3 (patch)
treef632662f50022f848ec50239cd84f23d406c5b97 /etc/inc/auth.inc
parentae5c8d0e05720ace47f57fcbd9478504277efc89 (diff)
downloadpfsense-1492e02cb4f48de3ff33ed4d4db013aac00087d3.zip
pfsense-1492e02cb4f48de3ff33ed4d4db013aac00087d3.tar.gz
Import OpenVPN cisco style radius attributes applying policy to logged in users. Feature #2100
Diffstat (limited to 'etc/inc/auth.inc')
-rw-r--r--etc/inc/auth.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 1c176ab..614c93d 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -1127,7 +1127,7 @@ function ldap_backed($username, $passwd, $authcfg) {
return true;
}
-function radius_backed($username, $passwd, $authcfg){
+function radius_backed($username, $passwd, $authcfg, &$attributes = array()) {
global $debug, $config;
$ret = false;
@@ -1163,6 +1163,8 @@ function radius_backed($username, $passwd, $authcfg){
if ($debug)
printf(gettext("Radius send failed: %s<br>\n"), $retvalue['error']);
} else if ($result === true) {
+ if ($rauth->getAttributes())
+ $attributes = $rauth->listAttributes();
$retvalue['auth_val'] = 2;
if ($debug)
printf(gettext("Radius Auth succeeded")."<br>\n");
@@ -1259,7 +1261,7 @@ function getUserGroups($username, $authcfg) {
return $member_groups;
}
-function authenticate_user($username, $password, $authcfg = NULL) {
+function authenticate_user($username, $password, $authcfg = NULL, &$attributes = array()) {
if (!$authcfg) {
return local_backed($username, $password);
@@ -1272,7 +1274,7 @@ function authenticate_user($username, $password, $authcfg = NULL) {
$authenticated = true;
break;
case 'radius':
- if (radius_backed($username, $password, $authcfg))
+ if (radius_backed($username, $password, $authcfg, $attributes))
$authenticated = true;
break;
default:
OpenPOWER on IntegriCloud