Fix pam_console_apply -r segfaulting if a group used in
authorMartin Schlemmer <azarah@gentoo.org>
Sun, 31 Oct 2004 16:08:21 +0000 (16:08 +0000)
committerMartin Schlemmer <azarah@gentoo.org>
Sun, 31 Oct 2004 16:08:21 +0000 (16:08 +0000)
/etc/security/console.perms are missing, bug #50315

13 files changed:
sys-libs/pam/ChangeLog
sys-libs/pam/Manifest
sys-libs/pam/files/digest-pam-0.75-r7 [deleted file]
sys-libs/pam/files/digest-pam-0.77-r2 [moved from sys-libs/pam/files/digest-pam-0.77-r1 with 63% similarity]
sys-libs/pam/files/pam-0.75-r7-gentoo.tbz2 [deleted file]
sys-libs/pam/files/pam-0.77-console-reset.patch [new file with mode: 0644]
sys-libs/pam/pam-0.75-r10.ebuild
sys-libs/pam/pam-0.75-r11.ebuild
sys-libs/pam/pam-0.75-r7.ebuild [deleted file]
sys-libs/pam/pam-0.75-r8.ebuild
sys-libs/pam/pam-0.75-r9.ebuild
sys-libs/pam/pam-0.77-r2.ebuild [moved from sys-libs/pam/pam-0.77-r1.ebuild with 92% similarity]
sys-libs/pam/pam-0.77.ebuild

index 4927db21326419a229530863a5680aa8e095b854..54bc47fa6add24126ff42af6f0ce92c3b4ba0b1b 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for sys-libs/pam
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.56 2004/09/01 12:47:25 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.57 2004/10/31 16:08:21 azarah Exp $
+
+*pam-0.77-r2 (31 Oct 2004)
+
+  31 Oct 2004; Martin Schlemmer <azarah@gentoo.org>
+  +files/pam-0.77-console-reset.patch, +pam-0.77-r2.ebuild, pam-0.77.ebuild:
+  Fix pam_console_apply -r segfaulting if a group used in
+  /etc/security/console.perms are missing, bug #50315
 
   01 Sep 2004; Travis Tilley <lv@gentoo.org> pam-0.77-r1.ebuild:
   made pam use $(get_libdir) for installing to lib64/lib32
index ad26c4520471fb74b29778184dd8792ce72a3277..65cc50c5b18cdeaa051ca16d4ae01079642ad67a 100644 (file)
@@ -1,23 +1,21 @@
-MD5 233b93764c08d0d3e5fff22b15484eb2 ChangeLog 8056
+MD5 86597ce418e8c6d6fbec7199a19f9890 pam-0.75-r9.ebuild 4086
+MD5 1fb1663f841e5afe50da00cdbd22e439 ChangeLog 8330
+MD5 d9e4ca42b79c105aa47283786d511446 pam-0.77.ebuild 7422
+MD5 7c9c2ce7d8d8b448fc924e89237a58e4 pam-0.75-r8.ebuild 3632
+MD5 0eba14b31db02fe0e0341ef5f834965a pam-0.75-r11.ebuild 4602
+MD5 e74a2d91ed5495cbc1be4316e3cf2f13 pam-0.75-r10.ebuild 4212
 MD5 1d05f0436f1c273d7862099f309afe4d metadata.xml 156
-MD5 717af9b22f169bd5cf8a51916c1201c6 pam-0.75-r10.ebuild 4222
-MD5 4892168863088fde282fe93f0631a1ef pam-0.75-r11.ebuild 4612
-MD5 e526c9cd3928ad7abe8cc1f172600296 pam-0.75-r7.ebuild 4107
-MD5 5a3b8812bdc05441bc111328d4ef532c pam-0.75-r8.ebuild 3642
-MD5 5e2d38e566747b562aa183395eba9721 pam-0.75-r9.ebuild 4096
-MD5 21709378e42caee8f4061f9aef37de9e pam-0.77.ebuild 7239
-MD5 98a61a3d99d53cd79790398479ecaa24 pam-0.77-r1.ebuild 7957
-MD5 d7ac33a4d3bc266bf5d36862b40c76e5 files/digest-pam-0.75-r10 135
+MD5 301cd084cd567f57a9679687e7691491 pam-0.77-r2.ebuild 7762
+MD5 6a4d8c09b6a1825f28cbd1127a2fe582 files/pam-0.75-pam_userdb-use-db3.patch 1157
 MD5 c8500e98a74c35c4c2007b2bc9ea7589 files/digest-pam-0.75-r11 135
-MD5 4d5ecc1712e4049e98db0efd1e474b89 files/digest-pam-0.75-r7 66
-MD5 3fb178824771809622dba0425d744143 files/digest-pam-0.75-r8 136
-MD5 31d4fe7f6f41d6523aaef448ac68e10c files/digest-pam-0.75-r9 134
+MD5 4a38d68124955388013f9ad6ead0b9fa files/pam-0.75-pam_group-confile.patch 478
 MD5 028c285db4076f549774c258d0eddcfc files/digest-pam-0.77 201
-MD5 7d46eb9ff97b13f9f6fcd1b44736adf1 files/pam-0.75-configure-db4.patch 504
 MD5 e23ff84c5fee1855b966271fd61b8f44 files/pam-0.75-pam_console-bison.fixes.patch 534
-MD5 4a38d68124955388013f9ad6ead0b9fa files/pam-0.75-pam_group-confile.patch 478
-MD5 6a4d8c09b6a1825f28cbd1127a2fe582 files/pam-0.75-pam_userdb-use-db3.patch 1157
-MD5 83fe40b0072c25238cb0918e9aee8652 files/pam-0.75-pam_wheel-segfault.patch 949
-MD5 1d0f8d7d82eebab1b2cbe31ec0020833 files/pam-0.75-r7-gentoo.tbz2 114830
 MD5 1974ad520e0b3f8b7a0a7feea28f7fda files/pam-0.75-selinux.diff.bz2 1523
-MD5 028c285db4076f549774c258d0eddcfc files/digest-pam-0.77-r1 201
+MD5 7d46eb9ff97b13f9f6fcd1b44736adf1 files/pam-0.75-configure-db4.patch 504
+MD5 d7ac33a4d3bc266bf5d36862b40c76e5 files/digest-pam-0.75-r10 135
+MD5 83fe40b0072c25238cb0918e9aee8652 files/pam-0.75-pam_wheel-segfault.patch 949
+MD5 31d4fe7f6f41d6523aaef448ac68e10c files/digest-pam-0.75-r9 134
+MD5 3fb178824771809622dba0425d744143 files/digest-pam-0.75-r8 136
+MD5 69f8cfad7f241eb669085eaa753cd9dd files/pam-0.77-console-reset.patch 1826
+MD5 7abfe66b5996b628696d244d462e47b0 files/digest-pam-0.77-r2 201
diff --git a/sys-libs/pam/files/digest-pam-0.75-r7 b/sys-libs/pam/files/digest-pam-0.75-r7
deleted file mode 100644 (file)
index 94204c9..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MD5 513088e0374c235e3b109119862e6bd4 Linux-PAM-0.75.tar.gz 874549
similarity index 63%
rename from sys-libs/pam/files/digest-pam-0.77-r1
rename to sys-libs/pam/files/digest-pam-0.77-r2
index b369b6cb73ab9fd950bc42e2ed8b0d90507edc40..2b18e5cd4d85b38011711e9f6b9dca47d020ad30 100644 (file)
@@ -1,3 +1,3 @@
 MD5 be5a470e553ba71c20e9bbc7665f3754 Linux-PAM-0.77.tar.gz 442569
-MD5 ec1150f6d16428c30f9c65a5b5212edd pam-0.77-patches-1.2.tar.bz2 114371
+MD5 a92c0fc8ccdcb23687600b3dc60732f3 pam-0.77-patches-1.3.tar.bz2 114508
 MD5 df71961002b552c0e72c6e4e358f27e1 db-4.1.25.tar.gz 3080234
diff --git a/sys-libs/pam/files/pam-0.75-r7-gentoo.tbz2 b/sys-libs/pam/files/pam-0.75-r7-gentoo.tbz2
deleted file mode 100644 (file)
index d5c0506..0000000
Binary files a/sys-libs/pam/files/pam-0.75-r7-gentoo.tbz2 and /dev/null differ
diff --git a/sys-libs/pam/files/pam-0.77-console-reset.patch b/sys-libs/pam/files/pam-0.77-console-reset.patch
new file mode 100644 (file)
index 0000000..ff45659
--- /dev/null
@@ -0,0 +1,54 @@
+--- Linux-PAM-0.77/modules/pam_console/pam_console_apply.c.console-reset       2003-07-08 05:16:28.000000000 +0200
++++ Linux-PAM-0.77/modules/pam_console/pam_console_apply.c     2003-07-10 22:50:26.000000000 +0200
+@@ -41,8 +41,9 @@
+       va_list args;
+       if (debug_p && !debug) return;
+         va_start(args, format);
+-      fprintf(stderr, format, args);
++      vfprintf(stderr, format, args);
+       va_end(args);
++      fprintf(stderr, "\n");
+ }
+ 
+ int
+--- Linux-PAM-0.77/modules/pam_console/config.y.az     2004-10-31 14:39:41.519539120 +0200
++++ Linux-PAM-0.77/modules/pam_console/config.y        2004-10-31 14:42:44.110781032 +0200
+@@ -425,6 +425,8 @@
+ reset_permissions(pam_handle_t *pamh, const char *consolename, int nonroot_ok) {
+     struct passwd *pwd;
+     struct group *grp;
++    uid_t pw_uid;
++    gid_t gr_gid;
+     config *c;
+     GSList *cl;
+ 
+@@ -439,20 +441,24 @@
+           if (pwd == NULL) {
+               _pam_log(LOG_ERR, FALSE, "getpwnam failed for %s",
+                        c->revert_owner ? c->revert_owner : "root");
+-              return -1;
++              pw_uid = 0;
++          } else {
++              pw_uid = pwd->pw_uid;
+           }
+           grp = _pammodutil_getgrnam(pamh, c->revert_group ? c->revert_group : "root");
+           if (grp == NULL) {
+                 _pam_log(LOG_ERR, FALSE, "getgrnam failed for %s",
+                          c->revert_group ? c->revert_group : "root");
+-                return -1;
+-            }
++              gr_gid = 0;
++            } else {
++              gr_gid = pwd->pw_uid;
++          }
+           if (c->device_class->list)
+               chmod_files(c->revert_mode ? c->revert_mode : "0600",
+-                          pwd->pw_uid, grp->gr_gid, NULL, c->device_class->list);
++                          pw_uid, gr_gid, NULL, c->device_class->list);
+           else
+               chmod_files(c->revert_mode ? c->revert_mode : "0600",
+-                          pwd->pw_uid, grp->gr_gid, c->device_class->name, NULL);
++                          pw_uid, gr_gid, c->device_class->name, NULL);
+       }
+     }
+     return 0;
index 3d8a0defedc12bb0564be29cc6af4bd2510ce401..1793d4a1f16016c35907fe8831f717acb5aa24ab 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r10.ebuild,v 1.16 2004/06/28 02:22:20 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r10.ebuild,v 1.17 2004/10/31 16:08:21 azarah Exp $
 
 IUSE="berkdb"
 
@@ -15,7 +15,7 @@ SRC_URI="http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-${PV}.ta
        mirror://gentoo/pam-${PVR}${PATCH_LEVEL}-gentoo.tbz2"
 HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
 
-LICENSE="BSD | GPL-2"
+LICENSE="PAM"
 KEYWORDS="x86 ppc sparc alpha"
 SLOT="0"
 
index dc4fbf0024afd62483ae4254611219db471b76a1..32d5401273c1a46e325766af1ba76dc567ed4a0d 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r11.ebuild,v 1.28 2004/06/28 02:22:20 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r11.ebuild,v 1.29 2004/10/31 16:08:21 azarah Exp $
 
 inherit gcc eutils flag-o-matic
 
@@ -17,7 +17,7 @@ SRC_URI="http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-${PV}.ta
        mirror://gentoo/pam-${PVR}${PATCH_LEVEL}-gentoo.tbz2"
 HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
 
-LICENSE="BSD | GPL-2"
+LICENSE="PAM"
 KEYWORDS="amd64 x86 ppc sparc alpha hppa mips"
 SLOT="0"
 
diff --git a/sys-libs/pam/pam-0.75-r7.ebuild b/sys-libs/pam/pam-0.75-r7.ebuild
deleted file mode 100644 (file)
index c85adfa..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r7.ebuild,v 1.19 2004/06/28 02:22:20 agriffis Exp $
-
-IUSE="berkdb"
-
-S=${WORKDIR}/Linux-PAM-${PV}
-S2=${WORKDIR}/pam
-DESCRIPTION="Pluggable Authentication Modules"
-SRC_URI="http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-${PV}.tar.gz"
-HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
-
-LICENSE="GPL-2 | BSD"
-KEYWORDS="x86 ppc sparc alpha"
-SLOT="0"
-
-RDEPEND=">=sys-libs/cracklib-2.7-r3
-       =dev-libs/glib-1.2*
-       >=sys-libs/pwdb-0.61-r3
-       berkdb? ( ~sys-libs/db-1.85 ~sys-libs/db-3.2.9 )"
-
-DEPEND="$RDEPEND
-       >=sys-devel/autoconf-2.58
-       >=sys-devel/automake-1.6
-       >=sys-devel/flex-2.5.4a-r5"
-
-src_unpack() {
-       unpack ${A}
-
-       cd ${WORKDIR}
-       tar -jxf ${FILESDIR}/pam-${PVR}-gentoo.tbz2 || \
-               die "Failed to unpack patches"
-
-       cd ${S}
-       tar -jxf ${S2}/pam-redhat-0.75-21.tar.bz2 || \
-               die "Failed to unpack pam-redhat-0.75-21.tar.bz2"
-
-       cp /usr/share/automake/install-sh . || die
-       ln -sf defs/redhat.defs default.defs
-
-       for x in `cat ${S2}/patch.list`
-       do
-               bzip2 -dc ${S2}/patchdir/${x} | patch -p1 || \
-                       die "Failed to apply ${x}"
-       done
-
-       # Fixes a segfault in module pam_wheel.so when "use_uid" is not
-       # used as argument to module.  This should resolve bug #5686.
-       #
-       # Martin Schlemmer <azarah@gentoo.org> (31 Jul 2002)
-       patch -p1 < ${FILESDIR}/${P}-pam_wheel-segfault.patch || die
-
-       # Fixes the config file location of pam_group.so.  This
-       # resolves bug #6010.
-       #
-       # Martin Schlemmer <azarah@gentoo.org> (05 Aug 2002)
-       patch -p1 < ${FILESDIR}/${P}-pam_group-confile.patch || die
-
-       export WANT_AUTOCONF=2.5
-       autoconf
-
-       # For some reason do not link to libcrypt.
-       cp configure configure_old
-       sed -e "s:-lpwdb:-lpwdb -lcrypt -L/lib -L/usr/lib:" \
-               configure_old > configure
-       chmod 0755 configure
-}
-
-src_compile() {
-       export CFLAGS="${CFLAGS} -fPIC"
-
-       ./configure --prefix= \
-               --host=${CHOST} \
-               --sbindir=/usr/sbin \
-               --mandir=/usr/share/man \
-               --enable-fakeroot=${D} \
-               --enable-static-libpam \
-               || die "Failed to configure"
-
-       # Python stuff in docs gives sandbox problems
-       cp Makefile Makefile.orig
-       sed -e "s:libpam_misc doc examples:libpam_misc:" \
-               Makefile.orig > Makefile
-       cp Make.Rules Make.orig
-
-       # Fix warnings for gcc-2.95.3
-       [ -z "${CC}" ] && CC=gcc
-       if [ "`${CC} -dumpversion`" = "2.95.3" ]
-       then
-               sed -e "s:/usr/bin/install:/bin/install:" \
-                       -e "s:-Wpointer-arith::" \
-                       Make.orig > Make.Rules
-       else
-               sed -e "s:/usr/bin/install:/bin/install:" \
-                       Make.orig > Make.Rules
-       fi
-
-       # For some reason do not link to libcrypt
-       cp modules/pam_pwdb/Makefile modules/pam_pwdb/Makefile_orig
-       sed -e "s:-lpwdb:-lpwdb -lcrypt -lnsl:g" \
-               modules/pam_pwdb/Makefile_orig > modules/pam_pwdb/Makefile
-
-       if ! use berkdb
-       then
-               cp Make.Rules Make.orig
-               sed -e "s:^HAVE_LIBNDBM=yes:HAVE_LIBNDBM=no:" \
-                       Make.orig > Make.Rules
-       fi
-
-       make || die "Failed to build"
-
-       cd ${S}/doc
-       tar -xvzf Linux-PAM-0.75-docs.tar.gz || die "Failed to unpack docs"
-}
-
-src_install() {
-       make FAKEROOT=${D} \
-               MANDIR="/usr/share/man" \
-               LDCONFIG="" \
-               install || die
-
-       #make sure every module built.
-       #do not remove this, as some module can fail to build
-       #and effectively lock the user out of his system.
-       for x in ${S}/modules/pam_*
-       do
-               if [ -d ${x} ]
-               then
-                       if ! ls -1 ${D}/lib/security/`basename ${x}`*.so
-                       then
-                               if ! use berkdb && \
-                                  [ "`basename ${x}`" = "pam_userdb" ]
-                               then
-                                       continue
-                               fi
-                               eerror "ERROR: `basename ${x}` module did not build."
-                               exit 1
-                       fi
-               fi
-       done
-
-       dodoc CHANGELOG Copyright README
-       docinto modules
-       dodoc modules/README
-
-       cd ${S}/modules
-       for x in pam_*
-       do
-               if [ -f ${x}/README ]
-               then
-                       docinto modules/${x}
-                       dodoc ${x}/README
-               fi
-       done
-
-       cd ${S}
-       docinto html
-       dohtml doc/html/*.html
-       docinto txt
-       dodoc doc/txts/*.txt doc/specs/*.txt
-       docinto print
-       dodoc doc/ps/*.ps
-
-
-       cd ${D}/lib
-       for x in pam pamc pam_misc
-       do
-               rm lib${x}.so
-               ln -s lib${x}.so.${PV} lib${x}.so
-               ln -s lib${x}.so.${PV} lib${x}.so.0
-       done
-
-       insinto /etc/pam.d
-       cd ${FILESDIR}/${PVR}/pam.d
-       doins *
-}
-
index 2c3f1efb234d83f52d39c5cd0095cd2f6f7608f3..27fbab592ecb464479f017d36bc26dceb8e258a0 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r8.ebuild,v 1.15 2004/06/28 02:22:20 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r8.ebuild,v 1.16 2004/10/31 16:08:21 azarah Exp $
 
 IUSE="berkdb"
 
@@ -15,7 +15,7 @@ SRC_URI="http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-${PV}.ta
        mirror://gentoo/pam-${PVR}${PATCH_LEVEL}-gentoo.tbz2"
 HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
 
-LICENSE="BSD | GPL-2"
+LICENSE="PAM"
 KEYWORDS="x86 ppc sparc alpha"
 SLOT="0"
 
index dd72b11900ce9ad95fac06a6efb2519e10ff0aa5..32e5c3215711f3ac3e82f64b30f360ab84b56071 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r9.ebuild,v 1.15 2004/06/28 02:22:20 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r9.ebuild,v 1.16 2004/10/31 16:08:21 azarah Exp $
 
 IUSE="berkdb"
 
@@ -15,7 +15,7 @@ SRC_URI="http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-${PV}.ta
        mirror://gentoo/pam-${PVR}${PATCH_LEVEL}-gentoo.tbz2"
 HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
 
-LICENSE="GPL-2 | BSD"
+LICENSE="PAM"
 KEYWORDS="x86 ppc sparc alpha mips ia64"
 SLOT="0"
 
similarity index 92%
rename from sys-libs/pam/pam-0.77-r1.ebuild
rename to sys-libs/pam/pam-0.77-r2.ebuild
index a0965c333dbdfea945e82e2a6405709483dd7015..117a518991a2003ddf6c0aa58025347518c0b9c0 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.77-r1.ebuild,v 1.10 2004/09/01 12:47:25 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.77-r2.ebuild,v 1.1 2004/10/31 16:08:21 azarah Exp $
 
-PATCH_LEVEL="1.2"
+PATCH_LEVEL="1.3"
 BDB_VER="4.1.25"
 PAM_REDHAT_VER="0.77-4"
 
@@ -41,11 +41,7 @@ HOMEPAGE="http://www.kernel.org/pub/linux/libs/pam/"
 DESCRIPTION="Pluggable Authentication Modules"
 
 S="${WORKDIR}/Linux-PAM-${PV}"
-#S2="${WORKDIR}/pam-${PVR}-patches"
-
-# Note that the patches for this revision are equal to the base version so we
-# don't create a new patch set. In bumps this might be necessary though
-S2="${WORKDIR}/pam-${PVR/-r1/}-patches"
+S2="${WORKDIR}/pam-${PV}-patches"
 SRC_URI="http://www.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-${PV}.tar.gz
        mirror://gentoo/${P}-patches-${PATCH_LEVEL}.tar.bz2
        berkdb? ( http://www.sleepycat.com/update/snapshot/db-${BDB_VER}.tar.gz )"
@@ -193,11 +189,11 @@ src_compile() {
                        -e "s:^HAVE_LIBDB=yes:HAVE_LIBDB=no:" \
                        Make.Rules
 
-                       # Also edit the configuration file else the wrong include files
-                         get used
-                       sed -i -e "s:^#define HAVE_NDBM_H.*$:/* #undef HAVE_NDBM_H */:" \
-                              -e "s:^#define HAVE_DB_H.*$:/* #undef HAVE_DB_H */:" \
-                              _pam_aconf.h
+               # Also edit the configuration file else the wrong include files
+               # get used
+               sed -i -e "s:^#define HAVE_NDBM_H.*$:/* #undef HAVE_NDBM_H */:" \
+                      -e "s:^#define HAVE_DB_H.*$:/* #undef HAVE_DB_H */:" \
+                      _pam_aconf.h
 
        else
                # Do not link pam_userdb.so to db-1.85 ...
@@ -206,7 +202,7 @@ src_compile() {
                        Make.Rules
 
                # Also edit the configuration file else the wrong include files
-                 get used
+               # get used
                sed -i -e "s:^#define HAVE_NDBM_H.*$:/* #undef HAVE_NDBM_H */:" _pam_aconf.h
        fi
 
index 14bf89a41eea903d676ef101bc8d104536ac8702..6a632f389f6e74360b4e2f5ad5795ddab8c28fef 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.77.ebuild,v 1.22 2004/06/28 02:22:20 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.77.ebuild,v 1.23 2004/10/31 16:08:21 azarah Exp $
 
 PATCH_LEVEL="1.2"
 BDB_VER="4.1.25"
@@ -87,6 +87,10 @@ src_unpack() {
        tar -zxf ${S2}/pam-redhat-${PAM_REDHAT_VER}.tar.gz \
                || die "Couldn't unpack pam-redhat-${PAM_REDHAT_VER}.tar.gz"
 
+       # Fix pam_console_apply -r segfaulting if a group used in
+       # /etc/security/console.perms are missing, bug #50315
+       cp -f ${FILESDIR}/pam-0.77-console-reset.patch ${S2}/gentoo-patches/
+
        apply_pam_patches
 
        use selinux && epatch ${S2}/gentoo-patches/pam-selinux.patch