summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/auth.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 1e6f26a..3a26030 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -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");
}
}
OpenPOWER on IntegriCloud