diff options
Diffstat (limited to 'etc/inc/ipsec.auth-user.php')
-rwxr-xr-x | etc/inc/ipsec.auth-user.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/inc/ipsec.auth-user.php b/etc/inc/ipsec.auth-user.php index 273abaf..553ba69 100755 --- a/etc/inc/ipsec.auth-user.php +++ b/etc/inc/ipsec.auth-user.php @@ -115,8 +115,14 @@ foreach ($authmodes as $authmode) { continue; $authenticated = authenticate_user($username, $password, $authcfg, $attributes); - if ($authenticated == true) + if ($authenticated == true) { + if (stristr($authmode, "local") && !userHasPrivilege($username, "user-ipsec-xauth-dialin")) { + $authenticated = false; + syslog(LOG_WARNING, "user '{$username}' cannot authenticate through IPSec since the required priviledges are missing.\n"); + continue; + } break; + } } if ($authenticated == false) { |