From 3534858d61ecf0c2ba597874e8cf8fe572cd50aeb09dc23fd69cfa47ade17d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Str=C3=B6der?= Date: Tue, 28 Mar 2017 21:05:07 +0000 Subject: [PATCH] Accepting request 483192 from home:jengelh:branches:network:ldap - Make libldap equivalent to libldap_r (like Debian) to avoid crashes in threaded programs which unknowingly get libldap inserted into their process image. [rh#1370065, boo#996551] OBS-URL: https://build.opensuse.org/request/show/483192 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=172 --- baselibs.conf | 2 ++ openldap2.changes | 7 +++++++ openldap2.spec | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/baselibs.conf b/baselibs.conf index 3b434dc..83913f7 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,6 @@ libldap-2_4-2 + targettype 32bit provides "libldap-2.4.so.2" + targettype 64bit provides "libldap-2.4.so.2()(64bit)" provides "openldap2-client- = " obsoletes "openldap2-client- <= " openldap2-devel diff --git a/openldap2.changes b/openldap2.changes index b047d67..df81bce 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 23 15:06:27 UTC 2017 - jengelh@inai.de + +- Make libldap equivalent to libldap_r (like Debian) to avoid + crashes in threaded programs which unknowingly get libldap + inserted into their process image. [rh#1370065, boo#996551] + ------------------------------------------------------------------- Sat Feb 18 22:11:29 UTC 2017 - kukuk@suse.com diff --git a/openldap2.spec b/openldap2.spec index 691d84f..0038fdb 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -185,8 +185,8 @@ OpenLDAP client utilities such as ldapadd, ldapsearch, ldapmodify. %package devel Summary: Libraries, Header Files and Documentation for OpenLDAP -Group: Development/Libraries/C and C++ # bug437293 +Group: Development/Libraries/C and C++ %ifarch ppc64 Obsoletes: openldap2-devel-64bit %endif @@ -214,6 +214,11 @@ for development. Summary: OpenLDAP Client Libraries Group: Productivity/Networking/LDAP/Clients Recommends: libldap-data >= %{version_main} +%ifarch x86_64 sparc64 ppc64 s390x +Provides: libldap-2.4.so.2()(64bit) +%else +Provides: libldap-2.4.so.2 +%endif %description -n libldap-2_4-2 This package contains the OpenLDAP client libraries. @@ -386,7 +391,7 @@ install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/var/lib/ldap/DB_CONFIG install -m 644 ${RPM_BUILD_ROOT}/etc/openldap/DB_CONFIG.example ${RPM_BUILD_ROOT}/var/lib/ldap/DB_CONFIG.example install -d ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/ install -m 644 %{SOURCE15} ${RPM_BUILD_ROOT}/etc/sysconfig/SuSEfirewall2.d/services/openldap -rm -f `find doc/guide ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d` +find doc/guide '(' ! -name *.html -a ! -name *.gif -a ! -name *.png -a ! -type d ')' -delete rm -rf doc/guide/release %define DOCDIR %{_defaultdocdir}/%{name} @@ -423,6 +428,11 @@ rm -f ${RPM_BUILD_ROOT}/usr/share/man/man5/slapd-tcl.5 # Remove *.la files, libtool does not handle this correct rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib*.la +# Make ldap_r the only copy in the system [rh#1370065] +rm -f "%{buildroot}/%{_libdir}"/libldap-2.4.so* +ln -fs libldap_r-2.4.so.2 "%{buildroot}/%{_libdir}/libldap-2.4.so.2" +ln -fs libldap_r.so "%{buildroot}/%{_libdir}/libldap.so" + %pre getent group ldap >/dev/null || /usr/sbin/groupadd -g 70 -o -r ldap || : getent passwd ldap >/dev/null || /usr/sbin/useradd -r -o -g ldap -u 76 -s /bin/false -c "User for OpenLDAP" -d /var/lib/ldap ldap || :