Project

General

Profile

Bug #1052 » pfsense-fix-bug1052.diff

Florent Daigniere, 11/13/2011 08:32 AM

View differences:

root/pfsense/pfSenseGITREPO/pfSenseGITREPO/etc/inc/auth.inc → etc/inc/auth.inc
@chmod("{$g['varrun_path']}/certs/{$authcfg['name']}.ca", 0600);
putenv('LDAPTLS_REQCERT=hard');
/* XXX: Probably even the hashed link should be created for this? */
putenv("TLS_CACERTDIR={$g['varrun_path']}/certs");
putenv("TLS_CACERT={$g['varrun_path']}/certs/{$authcfg['name']}.ca");
putenv("LDAPTLS_CACERTDIR={$g['varrun_path']}/certs");
putenv("LDAPTLS_CACERT={$g['varrun_path']}/certs/{$authcfg['name']}.ca");
}
}
......
return false;
}
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, (int)$ldapver);
/* Setup CA environment if needed. */
ldap_setup_caenv($authcfg);
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, (int)$ldapver);
/* Make sure we can connect to LDAP */
$error = false;
if (!($ldap = ldap_connect($ldapserver)))
(1-1/2)