From 21af7eb21b10a80d39648147aecc037eb3ee10fcccadff0b0c57752fd2207eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Str=C3=B6der?= Date: Mon, 2 Oct 2017 14:37:04 +0000 Subject: [PATCH 1/2] Accepting request 530467 from home:darix:playground - use existing groups instead of inventing new ones OBS-URL: https://build.opensuse.org/request/show/530467 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=194 --- openldap2.changes | 5 +++++ openldap2.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/openldap2.changes b/openldap2.changes index 010ef08..d97fc7f 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 2 13:18:54 UTC 2017 - mrueckert@suse.de + +- use existing groups instead of inventing new ones + ------------------------------------------------------------------- Mon Sep 18 20:45:58 UTC 2017 - michael@stroeder.com diff --git a/openldap2.spec b/openldap2.spec index 3f2f899..c996430 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -135,7 +135,7 @@ to do any programming. %package -n libldap-data Summary: Configuration file for system-wide defaults for all uses of libldap -Group: Productivity/Networking/LDAP +Group: Productivity/Networking/LDAP/Clients %if 0%{?suse_version} != 1110 BuildArch: noarch %endif From 0f916505ad027a1e470d73ea7fda10157ad15ab2a2c7f0e0bd88a20a5109bedc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Str=C3=B6der?= Date: Mon, 2 Oct 2017 18:38:04 +0000 Subject: [PATCH 2/2] Accepting request 530539 from home:jengelh:branches:network:ldap - Add openldap-r-only.dif so that openldap2's own tools also link against libldap_r rather than libldap. - Make libldap equivalent to libldap_r (like Debian) to avoid crashes in threaded programs which unknowingly get both libraries inserted into their process image. [rh#1370065, boo#996551] OBS-URL: https://build.opensuse.org/request/show/530539 OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=195 --- openldap-r-only.dif | 24 ++++++++++++++++++++++++ openldap2.changes | 10 ++++++++++ openldap2.spec | 10 ++++++++-- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 openldap-r-only.dif diff --git a/openldap-r-only.dif b/openldap-r-only.dif new file mode 100644 index 0000000..40b03a9 --- /dev/null +++ b/openldap-r-only.dif @@ -0,0 +1,24 @@ +From: Jan Engelhardt +Date: 2017-07-04 13:53:32.386698982 +0200 + +Build all own programs exclusively with libldap_r and not libldap. + +References: http://bugzilla.redhat.com/1370065 +References: http://bugzilla.opensuse.org/996551 +--- + build/top.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: openldap-2.4.45/build/top.mk +=================================================================== +--- openldap-2.4.45.orig/build/top.mk ++++ openldap-2.4.45/build/top.mk +@@ -171,7 +171,7 @@ LDAP_LIBLUNICODE_A = $(LDAP_LIBDIR)/libl + LDAP_LIBLUTIL_A = $(LDAP_LIBDIR)/liblutil/liblutil.a + + LDAP_L = $(LDAP_LIBLUTIL_A) \ +- $(LDAP_LIBLDAP_LA) $(LDAP_LIBLBER_LA) ++ $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA) + SLAPD_L = $(LDAP_LIBLUNICODE_A) $(LDAP_LIBREWRITE_A) \ + $(LDAP_LIBLUTIL_A) $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA) + diff --git a/openldap2.changes b/openldap2.changes index d97fc7f..5942265 100644 --- a/openldap2.changes +++ b/openldap2.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Oct 2 18:15:46 UTC 2017 - jengelh@inai.de + +- Add openldap-r-only.dif so that openldap2's own tools also + link against libldap_r rather than libldap. +- Make libldap equivalent to libldap_r (like Debian) to avoid + crashes in threaded programs which unknowingly get both + libraries inserted into their process image. + [rh#1370065, boo#996551] + ------------------------------------------------------------------- Mon Oct 2 13:18:54 UTC 2017 - mrueckert@suse.de diff --git a/openldap2.spec b/openldap2.spec index c996430..038b1e5 100644 --- a/openldap2.spec +++ b/openldap2.spec @@ -60,6 +60,7 @@ Patch11: 0011-openldap-re24-its7796.patch Patch12: 0012-ITS8051-sockdnpat.patch Patch13: 0013-ITS-8692-let-back-sock-generate-increment-line.patch Patch14: 0014-ITS-8714-Send-out-EXTENDED-operation-message-from-back-sock.patch +Patch15: openldap-r-only.dif Source200: %{name_ppolicy_check_module}-%{version_ppolicy_check_module}.tar.gz Source201: %{name_ppolicy_check_module}.Makefile Source202: %{name_ppolicy_check_module}.conf @@ -186,8 +187,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 @@ -255,6 +256,7 @@ gzip -k %{S:203} %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 cp %{SOURCE5} . # Move ppolicy check module and its Makefile into openldap-2.4/contrib/slapd-modules/ @@ -359,7 +361,6 @@ install -m 644 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sasl2/slapd.conf install -m 755 -d ${RPM_BUILD_ROOT}/var/lib/ldap chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/liblber.so* chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/libldap_r.so* -chmod a+x ${RPM_BUILD_ROOT}/%{_libdir}/libldap.so* install -m 755 %{SOURCE6} ${RPM_BUILD_ROOT}/usr/sbin/schema2ldif # Install ppolicy check module @@ -424,6 +425,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]. +# libldap.so is only for `gcc/ld -lldap`. Make no libldap-2.4.so.2. +rm -f "%{buildroot}/%{_libdir}"/libldap-2.4.so* +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