Revision a9157b6b
Added by Ermal LUÇI over 12 years ago
etc/inc/ipsec.auth-user.php | ||
---|---|---|
116 | 116 |
|
117 | 117 |
$authenticated = authenticate_user($username, $password, $authcfg, $attributes); |
118 | 118 |
if ($authenticated == true) { |
119 |
if (stristr($authmode, "local") && !userHasPrivilege($username, "user-ipsec-xauth-dialin")) { |
|
120 |
$authenticated = false; |
|
121 |
syslog(LOG_WARNING, "user '{$username}' cannot authenticate through IPSec since the required privileges are missing.\n"); |
|
122 |
continue; |
|
119 |
if (stristr($authmode, "local")) { |
|
120 |
$user = getUserEntry($username); |
|
121 |
if (!is_array($user) || !userHasPrivilege($user, "user-ipsec-xauth-dialin")) { |
|
122 |
$authenticated = false; |
|
123 |
syslog(LOG_WARNING, "user '{$username}' cannot authenticate through IPSec since the required privileges are missing.\n"); |
|
124 |
continue; |
|
125 |
} |
|
123 | 126 |
} |
124 | 127 |
break; |
125 | 128 |
} |
Also available in: Unified diff
Correct checking for privileges.