diff options
author | Ermal <eri@pfsense.org> | 2011-07-27 20:31:30 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-07-27 20:31:30 +0000 |
commit | 9626710723f5495d1b9fcb0f902ac1d91f9df86b (patch) | |
tree | ae1a45621c3f4a48f042ead1c79bbc6526168c15 /etc | |
parent | 5d6bade495483d81dee13b429b95867cd87c2236 (diff) | |
download | pfsense-9626710723f5495d1b9fcb0f902ac1d91f9df86b.zip pfsense-9626710723f5495d1b9fcb0f902ac1d91f9df86b.tar.gz |
Correct whitespace and some problems in the just merged ldap auth sorce for racoon
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 2 | ||||
-rw-r--r-- | etc/inc/vpn.inc | 47 |
2 files changed, 25 insertions, 24 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index f1bb57d..1abc8c5 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -1139,7 +1139,7 @@ function upgrade_046_to_047() { if (isset($config['ipsec']['mobileclients']['enable'])) { $config['ipsec']['client']['enable'] = true; - $config['ipsec']['client']['enable'] = $config['ipsec']['mobileclients']['user_source']; + $config['ipsec']['client']['user_source'] = 'system'; $config['ipsec']['client']['group_source'] = 'system'; } diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index fe373e5..703ac7a 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -416,30 +416,31 @@ function vpn_ipsec_configure($ipchg = false) } /* end mode_cfg section */ - if ($a_client['user_source'] != "system") - { - foreach ($config['system']['authserver'] as $authcfg) { - if ($authcfg['type'] == 'ldap' and $authcfg['name'] == $a_client['user_source']) - { - $thisauthcfg = $authcfg; - } - } - - /* begin ldapcfg */ - $racoonconf .= "ldapcfg {\n"; - $racoonconf .= "\tversion 3;\n"; - $racoonconf .= "\thost \"".$thisauthcfg['host']."\";\n"; - $lport = "389"; - if ($authcfg['port'] != "") {$lport = $authcfg['port'];}; - $racoonconf .= "\tport ".$lport.";\n"; - $racoonconf .= "\tbase \"".$thisauthcfg['ldap_basedn']."\";\n"; - $racoonconf .= "\tsubtree on;\n"; - $racoonconf .= "\tbind_dn \"".$thisauthcfg['ldap_binddn']."\";\n"; - $racoonconf .= "\tbind_pw \"".$thisauthcfg['ldap_bindpw']."\";\n"; - $racoonconf .= "\tattr_user \"".$thisauthcfg['ldap_attr_user']."\";\n"; - $racoonconf .= "}\n\n"; - /* end ldapcfg */ + if ($a_client['user_source'] != "system") { + if (is_array($config['system']['authserver'])) { + foreach ($config['system']['authserver'] as $authcfg) { + if ($authcfg['type'] == 'ldap' and $authcfg['name'] == $a_client['user_source']) + $thisauthcfg = $authcfg; + } + + /* begin ldapcfg */ + $racoonconf .= "ldapcfg {\n"; + $racoonconf .= "\tversion 3;\n"; + $racoonconf .= "\thost \"".$thisauthcfg['host']."\";\n"; + $lport = "389"; + if ($authcfg['port'] != "") + $lport = $authcfg['port']; + $racoonconf .= "\tport ".$lport.";\n"; + $racoonconf .= "\tbase \"".$thisauthcfg['ldap_basedn']."\";\n"; + $racoonconf .= "\tsubtree on;\n"; + $racoonconf .= "\tbind_dn \"".$thisauthcfg['ldap_binddn']."\";\n"; + $racoonconf .= "\tbind_pw \"".$thisauthcfg['ldap_bindpw']."\";\n"; + $racoonconf .= "\tattr_user \"".$thisauthcfg['ldap_attr_user']."\";\n"; + $racoonconf .= "}\n\n"; + /* end ldapcfg */ + } } + /* begin remote sections */ if (is_array($a_phase1) && count($a_phase1)) { /* begin remote */ |