diff options
author | jim-p <jim@pingle.org> | 2010-04-12 15:03:43 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-04-12 15:03:43 -0400 |
commit | 99a00640c02745680b44994cbe194a577490ed2c (patch) | |
tree | 7d1c2aa1919c9a2c788002145b3373c94af4e0e1 /usr/local/www/wizards/openvpn_wizard.inc | |
parent | c062a711147e64c8c5e6681617d06cded8afe6c8 (diff) | |
download | pfsense-99a00640c02745680b44994cbe194a577490ed2c.zip pfsense-99a00640c02745680b44994cbe194a577490ed2c.tar.gz |
Fixup OpenVPN wizard LDAP settings. Ticket #500.
Diffstat (limited to 'usr/local/www/wizards/openvpn_wizard.inc')
-rw-r--r-- | usr/local/www/wizards/openvpn_wizard.inc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc index cba0d10..c516707 100644 --- a/usr/local/www/wizards/openvpn_wizard.inc +++ b/usr/local/www/wizards/openvpn_wizard.inc @@ -76,8 +76,16 @@ function step2_submitphpaction() { function step3_submitphpaction() { global $stepid, $savemsg, $config; - if (empty($_POST['name']) || empty($_POST['ip']) || empty($_POST['port']) || - empty($_POST['transport']) || empty($_POST['scope']) || empty($_POST['authscope']) || empty($_POST['nameattr'])) { + /* Default LDAP port is 389 for TCP and 636 for SSL */ + if (empty($_POST['port'])) { + if ($_POST['transport'] == "tcp") + $_POST['port'] = 389; + elseif ($_POST['transport'] == "ssl") + $_POST['port'] = 636; + } + + if (empty($_POST['name']) || empty($_POST['ip']) ||empty($_POST['transport']) || + empty($_POST['scope']) || empty($_POST['basedn']) || empty($_POST['authscope']) || empty($_POST['nameattr'])) { $stepid--; $savemsg = "Please enter all information for authentication server."; } else if (count(($authcfg = auth_get_authserver($_POST['name']))) > 0) { @@ -358,6 +366,7 @@ function step12_submitphpaction() { $auth['ldap_urltype'] = 'SSL - Encrypted'; $auth['ldap_protver'] = 3; $auth['ldap_scope'] = $pconfig['step2']['scope']; + $auth['ldap_basedn'] = $pconfig['step2']['basedn']; $auth['ldap_authcn'] = $pconfig['step2']['authscope']; $auth['ldap_binddn'] = $pconfig['step2']['userdn']; $auth['ldap_bindpw'] = $pconfig['step2']['passdn']; |