summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/vpn.inc5
-rwxr-xr-xusr/local/www/vpn_ipsec_mobile.php6
2 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 407a490..6bf55b8 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -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;
}
}
diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php
index 34b72d1..9d81c53 100755
--- a/usr/local/www/vpn_ipsec_mobile.php
+++ b/usr/local/www/vpn_ipsec_mobile.php
@@ -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>
OpenPOWER on IntegriCloud