components/krb5/patches/071-t_kdb-slapd.patch
author Shawn Emery <shawn.emery@oracle.com>
Tue, 09 Aug 2016 21:10:38 -0700
changeset 6599 1d033832c5e7
parent 6311 b926fcac67df
child 6978 14cbeb78966a
permissions -rw-r--r--
24377741 Update Userland krb5 to MIT 1.14.3 24379666 problem in UTILITY/KERBEROS

#
# Patch to allow the t_kdb.py test to test a KDC using a LDAP backend provided
# by the Solaris OpenLDAP slapd for the KDB.  MIT have been notified and they
# say they will update t_kdb.py to work on S12 by the 1.15 release.
#
# Patch source: in-house
#

diff --git a/src/tests/t_kdb.py b/src/tests/t_kdb.py
--- a/src/tests/t_kdb.py
+++ b/src/tests/t_kdb.py
@@ -14,7 +14,10 @@ if (not os.path.exists(os.path.join(plugins, 'kdb', 'kldap.so')) and
 
 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 @@ shutil.copy(system_slapd, slapd)
 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('pidfile %s\n' % slapd_pidfile)
 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)