From 1fb41f2a59dc03c712fdd62a16962e72799f7ff1 Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Wed, 11 Feb 2015 10:52:43 +0100 Subject: [PATCH] fix: Unknown Berkeley DB major version in db.h (#1191098) --- openldap-gcc-5.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ openldap.spec | 8 ++++++++ 2 files changed, 51 insertions(+) create mode 100644 openldap-gcc-5.patch diff --git a/openldap-gcc-5.patch b/openldap-gcc-5.patch new file mode 100644 index 0000000..40ba9de --- /dev/null +++ b/openldap-gcc-5.patch @@ -0,0 +1,43 @@ +From f0409f40dab6013d1aec05f5c86ae31d2f49b485 Mon Sep 17 00:00:00 2001 +From: Jan Synacek +Date: Wed, 11 Feb 2015 10:32:28 +0100 +Subject: [PATCH] fix libdb detection with gcc 5 + +The old cpp version generated: +__db_version 5 + +The new output: +__db_version + 5 + +Running cpp with -P (inhibit linemarkers generation) fixes this when using gcc 5. +Behavior with older versions of gcc is not changed. +--- + build/openldap.m4 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/build/openldap.m4 b/build/openldap.m4 +index caf8fc2..bdcb4d6 100644 +--- a/build/openldap.m4 ++++ b/build/openldap.m4 +@@ -328,7 +328,7 @@ AC_DEFUN([OL_BDB_HEADER_VERSION], + #endif + __db_version DB_VERSION_MAJOR + ]) +- set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none ++ set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none + ol_cv_bdb_major=${3} + ]) + case $ol_cv_bdb_major in [[1-9]]*) : ;; *) +@@ -344,7 +344,7 @@ AC_CACHE_CHECK([for Berkeley DB minor version in db.h], [ol_cv_bdb_minor],[ + #endif + __db_version DB_VERSION_MINOR + ]) +- set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none ++ set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none + ol_cv_bdb_minor=${3} + ]) + case $ol_cv_bdb_minor in [[0-9]]*) : ;; *) +-- +2.1.0 + diff --git a/openldap.spec b/openldap.spec index b0b5f09..88107a7 100644 --- a/openldap.spec +++ b/openldap.spec @@ -43,6 +43,9 @@ Patch22: openldap-require-non-empty-attributelist.patch Patch90: check-password-makefile.patch Patch91: check-password.patch +# GCC 5 cpp patch, pending upstream inclusion (ITS #8056) +Patch100: openldap-gcc-5.patch + BuildRequires: cyrus-sasl-devel, krb5-devel, tcp_wrappers-devel, unixODBC-devel BuildRequires: glibc-devel, libtool, libtool-ltdl-devel, groff, perl, perl-devel, perl(ExtUtils::Embed) # smbk5pwd overlay: @@ -112,6 +115,8 @@ programs needed for accessing and modifying OpenLDAP directories. pushd openldap-%{version} +%patch100 -p1 + AUTOMAKE=%{_bindir}/true autoreconf -fi %patch0 -p1 @@ -509,6 +514,9 @@ exit 0 %{_mandir}/man3/* %changelog +* Wed Feb 11 2015 Jan Synáček - 2.4.40-9 +- fix: Unknown Berkeley DB major version in db.h (#1191098) + * Tue Feb 10 2015 Jan Synáček - 2.4.40-9 - CVE-2015-1545: slapd crashes on search with deref control (#1190645)