From 2cf8192cd1281d60adea4439e46f42572dfb4b79 Mon Sep 17 00:00:00 2001 From: wangchen2020 <15955488707@163.com> Date: Fri, 8 Jan 2021 14:21:48 +0800 Subject: [PATCH] Use gdbm --- change-ndbm-to-gdbm.patch | 24 ++++++++++++++++++++++++ pam.spec | 13 +++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 change-ndbm-to-gdbm.patch diff --git a/change-ndbm-to-gdbm.patch b/change-ndbm-to-gdbm.patch new file mode 100644 index 0000000..40e3d91 --- /dev/null +++ b/change-ndbm-to-gdbm.patch @@ -0,0 +1,24 @@ +From c8ff297d3ca1d5a195147c32859b87dba820c281 Mon Sep 17 00:00:00 2001 +From: gaoyi +Date: Wed, 28 Oct 2020 19:37:25 +0800 +Subject: [PATCH] change ndbm to gdbm + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d537907..ecbaa2d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -435,7 +435,7 @@ if test x"$WITH_DB" !=xno ; then + LIBS=$old_libs + fi + if test -z "$LIBDB" ; then +- AC_CHECK_LIB([ndbm],[dbm_store], LIBDB="-lndbm", LIBDB="") ++ AC_CHECK_LIB([gdbm_compat],[dbm_stroe], LIBDB="-lgdbm_compat", LIBDB="") + if test -n "$LIBDB" ; then + AC_CHECK_HEADERS(ndbm.h) + fi +-- +2.23.0 diff --git a/pam.spec b/pam.spec index cdd824e..ac83a2a 100644 --- a/pam.spec +++ b/pam.spec @@ -4,7 +4,7 @@ %define _pamconfdir %{_sysconfdir}/pam.d Name: pam Version: 1.4.0 -Release: 3 +Release: 4 Summary: Pluggable Authentication Modules for Linux License: BSD and GPLv2+ URL: http://www.linux-pam.org/ @@ -25,10 +25,11 @@ Patch3: Move-check_user_in_passwd-from-pam_localuser.c-to-pa.patch Patch4: pam_faillock-fix-build-on-musl.patch Patch5: pam_modutil_check_user_in_passwd-avoid-timing-attack.patch Patch6: Prevent-SEGFAULT-for-unknown-UID.patch +Patch7: change-ndbm-to-gdbm.patch -BuildRequires: autoconf automake libtool bison flex sed cracklib-devel +BuildRequires: autoconf automake libtool bison flex sed cracklib-devel gdbm-devel BuildRequires: perl-interpreter pkgconfig gettext-devel libtirpc-devel libnsl2-devel -BuildRequires: audit-libs-devel libselinux-devel libdb-devel +BuildRequires: audit-libs-devel libselinux-devel BuildRequires: linuxdoc-tools elinks libxslt docbook-style-xsl docbook-dtds Requires: cracklib libpwquality coreutils glibc audit libselinux @@ -65,7 +66,8 @@ autoreconf -i --disable-prelude \ --enable-cracklib \ --enable-tally \ - --enable-tally2 + --enable-tally2 \ + --enable-db=ndbm make -C po update-gmo %make_build @@ -175,6 +177,9 @@ fi %changelog +* Fri Jan 8 2021 wangchen - 1.4.0-4 +- Use gdbm + * Sat Oct 31 2020 panxiaohe - 1.4.0-3 - Prevent SEGFAULT for unknown UID