Skip Menu |

Subject: needs some tweeks to work on Solaris 12
Download (untitled) / with headers
text/plain 1.9KiB
I've been working on getting the krb5-1.14.2/src/tests/ to test
with the Solaris OpenLDAP slapd and I've found I had to make a couple
small changes to that test program. Aside from the location of the core
schema being different the other issue is that the Solaris 12 slapd does
not support the Berkeley DB (bdb) anymore and instead supports the mdb.
A Oracle developer working on OpenLDAP for Solaris tells me that the
OpenLDAP group is planning on not supporting bdb because of license
issue (I guess) and is going to support mdb instead so I thought I'd
give y'all a heads up. It would be nice if there was some way to
dynamically determine what database type slapd supports at the time is run but given I wasn't able to figure out how to do that I
ended up making the following patch to which allows it to run
on current Solaris 12:

--- krb5-1.14.2-23587748/src/tests/
+++ krb5-1.14.2/src/tests/
@@ -14,7 +14,10 @@

system_slapd = which('slapd')
if not system_slapd:
- skip_rest('LDAP KDB tests', 'slapd not found')
+ if os.path.isfile('/usr/lib/slapd'):
+ system_slapd = '/usr/lib/slapd'
+ else:
+ skip_rest('LDAP KDB tests', 'slapd not found')

ldapdir = os.path.abspath('ldap')
slapd = os.path.join(ldapdir, 'slapd')
@@ -44,6 +47,8 @@
core_schema = None
if os.path.isfile('/etc/ldap/schema/core.schema'):
core_schema = '/etc/ldap/schema/core.schema'
+elif os.path.isfile('/etc/openldap/schema/core.schema'):
+ core_schema = '/etc/openldap/schema/core.schema'

# Make a slapd config file. This is deprecated in OpenLDAP 2.3 and
# later, but it's easier than using LDIF and slapadd. Include some
@@ -54,8 +59,7 @@
file.write('include %s\n' % schema)
if core_schema:
file.write('include %s\n' % core_schema)
-file.write('moduleload back_bdb\n')
-file.write('database bdb\n')
+file.write('database mdb\n')
file.write('suffix %s\n' % top_dn)
file.write('rootdn %s\n' % admin_dn)
file.write('rootpw %s\n' % admin_pw)