diff --git a/openldap-ldapi-sasl.patch b/openldap-ldapi-sasl.patch deleted file mode 100644 index 058cc1c32eb9eb1b7a49783a15251706d796b065..0000000000000000000000000000000000000000 --- a/openldap-ldapi-sasl.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 69709289b083c53ba41d2cef7d65120220f8c59b Mon Sep 17 00:00:00 2001 -From: Sumit Bose -Date: Tue, 7 May 2013 17:02:57 +0200 -Subject: [PATCH] LDAPI SASL fix - -Resolves: #960222 ---- - libraries/libldap/cyrus.c | 19 ++++++++++++++++--- - 1 Datei geändert, 16 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-) - -diff --git a/libraries/libldap/cyrus.c b/libraries/libldap/cyrus.c -index 28c241b..a9acf36 100644 ---- a/libraries/libldap/cyrus.c -+++ b/libraries/libldap/cyrus.c -@@ -394,6 +394,8 @@ ldap_int_sasl_bind( - struct berval ccred = BER_BVNULL; - int saslrc, rc; - unsigned credlen; -+ char my_hostname[HOST_NAME_MAX + 1]; -+ int free_saslhost = 0; - - Debug( LDAP_DEBUG_TRACE, "ldap_int_sasl_bind: %s\n", - mechs ? mechs : "", 0, 0 ); -@@ -454,14 +456,25 @@ ldap_int_sasl_bind( - - /* If we don't need to canonicalize just use the host - * from the LDAP URI. -+ * Always use the result of gethostname() for LDAPI. - */ -- if ( nocanon ) -+ if (ld->ld_defconn->lconn_server->lud_scheme != NULL && -+ strcmp("ldapi", ld->ld_defconn->lconn_server->lud_scheme) == 0) { -+ rc = gethostname(my_hostname, HOST_NAME_MAX + 1); -+ if (rc == 0) { -+ saslhost = my_hostname; -+ } else { -+ saslhost = "localhost"; -+ } -+ } else if ( nocanon ) - saslhost = ld->ld_defconn->lconn_server->lud_host; -- else -+ else { - saslhost = ldap_host_connected_to( ld->ld_defconn->lconn_sb, - "localhost" ); -+ free_saslhost = 1; -+ } - rc = ldap_int_sasl_open( ld, ld->ld_defconn, saslhost ); -- if ( !nocanon ) -+ if ( free_saslhost ) - LDAP_FREE( saslhost ); - } - --- -1.7.11.7 - diff --git a/openldap.spec b/openldap.spec index 599e209e61562674eb93d6f3077bbc9f080b4b3f..b055331a93d780c804ba06d5ac7f0f3144b84011 100644 --- a/openldap.spec +++ b/openldap.spec @@ -2,7 +2,7 @@ Name: openldap Version: 2.4.49 -Release: 2 +Release: 3 Summary: LDAP support libraries License: OpenLDAP URL: https://www.openldap.org/ @@ -260,7 +260,7 @@ mv %{buildroot}%{_sysconfdir}/openldap/schema/README README.schema mv %{buildroot}%{_sysconfdir}/openldap/DB_CONFIG.example %{buildroot}%{_datadir}/openldap-servers/DB_CONFIG.example chmod 0644 %{buildroot}%{_datadir}/openldap-servers/DB_CONFIG.example -%delete_la +rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_localstatedir}/openldap-data/DB_CONFIG.example rmdir %{buildroot}%{_localstatedir}/openldap-data @@ -415,6 +415,12 @@ exit 0 %doc ltb-project-openldap-ppolicy-check-password-1.1/README.check_pwd %changelog +* Thu Jul 23 2020 zhouyihang - 2.4.49-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:keep *.la under %{_libdir}/openldap/ + * Wed Apr 22 2020 songnannan - 2.4.49-2 - Type:bugfix - ID:NA