Bug #1052 » pfsense-fix-bug1052_v2.diff
| root/pfsense/pfSenseGITREPO/pfSenseGITREPO/etc/inc/auth.inc → etc/inc/auth.inc | ||
|---|---|---|
| 683 | 683 |
file_put_contents("{$g['varrun_path']}/certs/{$authcfg['name']}.ca", base64_decode($caref['crt']));
|
| 684 | 684 |
@chmod("{$g['varrun_path']}/certs/{$authcfg['name']}.ca", 0600);
|
| 685 | 685 |
putenv('LDAPTLS_REQCERT=hard');
|
| 686 |
/* XXX: Probably even the hashed link should be created for this? */ |
|
| 687 |
putenv("TLS_CACERTDIR={$g['varrun_path']}/certs");
|
|
| 688 |
putenv("TLS_CACERT={$g['varrun_path']}/certs/{$authcfg['name']}.ca");
|
|
| 686 |
putenv("LDAPTLS_CACERT={$g['varrun_path']}/certs/{$authcfg['name']}.ca");
|
|
| 689 | 687 |
} |
| 690 | 688 |
} |
| 691 | 689 | |
| ... | ... | |
| 1025 | 1023 |
return false; |
| 1026 | 1024 |
} |
| 1027 | 1025 |
|
| 1028 |
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0); |
|
| 1029 |
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, (int)$ldapver); |
|
| 1030 | ||
| 1031 | 1026 |
/* Setup CA environment if needed. */ |
| 1032 | 1027 |
ldap_setup_caenv($authcfg); |
| 1033 | 1028 | |
| 1029 |
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0); |
|
| 1030 |
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, (int)$ldapver); |
|
| 1031 | ||
| 1034 | 1032 |
/* Make sure we can connect to LDAP */ |
| 1035 | 1033 |
$error = false; |
| 1036 | 1034 |
if (!($ldap = ldap_connect($ldapserver))) |
- « Previous
- 1
- 2
- Next »