Bug #1052 » pfsense-fix-bug1052_v2.diff
| root/pfsense/pfSenseGITREPO/pfSenseGITREPO/etc/inc/auth.inc → etc/inc/auth.inc | ||
|---|---|---|
|
file_put_contents("{$g['varrun_path']}/certs/{$authcfg['name']}.ca", base64_decode($caref['crt']));
|
||
|
@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_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)))
|
||
- « Previous
- 1
- 2
- Next »