mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Something in the LDAP libraries has changed and it no longer likes spaces in the CA filename. Use the refid for the CA filename since it will always be unqiue, and it will never contain any spaces, unlike authname or the CA's descr.
This commit is contained in:
parent
e550b82c03
commit
6f165ffcdf
@ -670,14 +670,14 @@ function ldap_setup_caenv($authcfg) {
|
||||
}
|
||||
if (!is_dir("{$g['varrun_path']}/certs"))
|
||||
@mkdir("{$g['varrun_path']}/certs");
|
||||
if (file_exists("{$g['varrun_path']}/certs/{$authcfg['name']}.ca"))
|
||||
@unlink("{$g['varrun_path']}/certs/{$authcfg['name']}.ca");
|
||||
file_put_contents("{$g['varrun_path']}/certs/{$authcfg['name']}.ca", base64_decode($caref['crt']));
|
||||
@chmod("{$g['varrun_path']}/certs/{$authcfg['name']}.ca", 0600);
|
||||
if (file_exists("{$g['varrun_path']}/certs/{$caref['refid']}.ca"))
|
||||
@unlink("{$g['varrun_path']}/certs/{$caref['refid']}.ca");
|
||||
file_put_contents("{$g['varrun_path']}/certs/{$caref['refid']}.ca", base64_decode($caref['crt']));
|
||||
@chmod("{$g['varrun_path']}/certs/{$caref['refid']}.ca", 0600);
|
||||
putenv('LDAPTLS_REQCERT=hard');
|
||||
/* XXX: Probably even the hashed link should be created for this? */
|
||||
putenv("LDAPTLS_CACERTDIR={$g['varrun_path']}/certs");
|
||||
putenv("LDAPTLS_CACERT={$g['varrun_path']}/certs/{$authcfg['name']}.ca");
|
||||
putenv("LDAPTLS_CACERT={$g['varrun_path']}/certs/{$caref['refid']}.ca");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user