23726723 t_kdb.py can't find slapd so tests aren't run
authorWill Fiveash <will.fiveash@oracle.com>
Thu, 30 Jun 2016 17:38:22 -0500
changeset 6311 b926fcac67df
parent 6310 456a99f2d979
child 6312 02dc7f60c5f1
23726723 t_kdb.py can't find slapd so tests aren't run
components/krb5/Makefile
components/krb5/patches/071-t_kdb-slapd.patch
--- a/components/krb5/Makefile	Thu Jun 30 14:58:02 2016 -0700
+++ b/components/krb5/Makefile	Thu Jun 30 17:38:22 2016 -0500
@@ -187,9 +187,11 @@
 REQUIRED_PACKAGES += library/openldap
 REQUIRED_PACKAGES += library/security/openssl
 REQUIRED_PACKAGES += network/dns/bind
+REQUIRED_PACKAGES += service/network/ldap/openldap
 REQUIRED_PACKAGES += service/security/kerberos-5
 REQUIRED_PACKAGES += shell/ksh93
 REQUIRED_PACKAGES += system/core-os
 REQUIRED_PACKAGES += system/library/math
 REQUIRED_PACKAGES += system/library/security/gss
+REQUIRED_PACKAGES += system/library/security/sasl/digestmd5
 REQUIRED_PACKAGES += system/network/ldap/openldap
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/krb5/patches/071-t_kdb-slapd.patch	Thu Jun 30 17:38:22 2016 -0500
@@ -0,0 +1,41 @@
+#
+# 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
+#
+
+--- krb5-1.14.2-23587748/src/tests/t_kdb.py
++++ krb5-1.14.2/src/tests/t_kdb.py
+@@ -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)