Improved ipsec ldap xauth

This commit is contained in:
Bryan Haase 2011-07-27 08:47:10 -05:00
parent e3d357047c
commit 2c189c8cb1
2 changed files with 7 additions and 4 deletions

View File

@ -420,10 +420,11 @@ function vpn_ipsec_configure($ipchg = false)
}
/* end mode_cfg section */
if ($a_client['user_source'] = "ldap")
if ($a_client['user_source'] != "system")
{
foreach ($config['system']['authserver'] as $authcfg) {
if ($authcfg['type'] == 'ldap') {
if ($authcfg['type'] == 'ldap' and $authcfg['name'] == $a_client['user_source'])
{
$thisauthcfg = $authcfg;
}
}

View File

@ -358,11 +358,13 @@ function login_banner_change() {
<?
foreach ($config['system']['authserver'] as $authcfg) {
if ($authcfg['type'] == 'ldap') {
print '<option value="ldap">ldap</option>';
$selected = "";
if ($pconfig['user_source'] == $authcfg['name']) $selected = "selected";
print '<option value="'.$authcfg['name'].'" '. $selected.'>'.$authcfg['name'].'</option>';
}
}
?>
<option value="system"><?=gettext("system"); ?></option>
<option value="system" <?php if ($pconfig['user_source'] == 'system') echo "selected"; ?>><?=gettext("system"); ?></option>
</select>
</td>
</tr>