Set CACERTDIR during install to work around openldap bug

Even though ldap.conf(5) claims that LDAPTLS_CACERT takes precedence over
LDAPTLS_CACERTDIR, this seems to be broken in F14. This patch works around
the issue by setting both into the environment.

https://fedorahosted.org/freeipa/ticket/467
This commit is contained in:
Jakub Hrozek 2010-11-10 17:33:02 -05:00 committed by Adam Young
parent 1db42b5461
commit 6a9846f3f3

View File

@ -497,7 +497,9 @@ class DsInstance(service.Service):
"-y", dmpwdfile, "-T", admpwdfile,
"uid=admin,cn=users,cn=accounts,"+self.suffix]
try:
ipautil.run(args, env = { 'LDAPTLS_CACERT':CACERT })
env = { 'LDAPTLS_CACERTDIR':os.path.dirname(CACERT),
'LDAPTLS_CACERT':CACERT }
ipautil.run(args, env=env)
logging.debug("ldappasswd done")
except ipautil.CalledProcessError, e:
print "Unable to set admin password", e