diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2002-07-30 23:48:02 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2002-07-30 23:48:02 +0000 |
commit | 4fa846fb70f56188b912f39685b3005f1f30114a (patch) | |
tree | d8bf6a282457824ed95a21a294ba76ca43f6d3c7 /sys-libs | |
parent | locked down binutils to .7 again, otherwise glibc b0rks (diff) | |
download | historical-4fa846fb70f56188b912f39685b3005f1f30114a.tar.gz historical-4fa846fb70f56188b912f39685b3005f1f30114a.tar.bz2 historical-4fa846fb70f56188b912f39685b3005f1f30114a.zip |
fix segfault in pam_wheel.so, resolving bug #5686
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/pam/ChangeLog | 6 | ||||
-rw-r--r-- | sys-libs/pam/files/pam-0.75-pam_wheel-segfault.patch | 26 | ||||
-rw-r--r-- | sys-libs/pam/pam-0.75-r7.ebuild | 9 |
3 files changed, 39 insertions, 2 deletions
diff --git a/sys-libs/pam/ChangeLog b/sys-libs/pam/ChangeLog index a8fa8b32f3b8..d9a787497084 100644 --- a/sys-libs/pam/ChangeLog +++ b/sys-libs/pam/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-libs/pam # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.8 2002/07/30 22:11:02 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.9 2002/07/30 23:48:02 azarah Exp $ + + 31 Jul 2002; M.Schlemmer <azarah@gentoo.org> ${P}-pam_wheel-segfault.patch : + Fix a segfault in pam_wheel.so if "use_uid" was not given as parameter. + This resolves bug #5686. *pam-0.75-r7 (31 Jul 2002) diff --git a/sys-libs/pam/files/pam-0.75-pam_wheel-segfault.patch b/sys-libs/pam/files/pam-0.75-pam_wheel-segfault.patch new file mode 100644 index 000000000000..ba38c3a56feb --- /dev/null +++ b/sys-libs/pam/files/pam-0.75-pam_wheel-segfault.patch @@ -0,0 +1,26 @@ +--- Linux-PAM-0.75/modules/pam_wheel/pam_wheel.c.orig Wed Jul 31 01:24:03 2002 ++++ Linux-PAM-0.75/modules/pam_wheel/pam_wheel.c Wed Jul 31 01:30:36 2002 +@@ -162,9 +162,20 @@ + fromsu = tpwd->pw_name; + } else { + fromsu = getlogin(); +- if (_pam_getpwnam_r(fromsu, &passwd, &tbuf, &tbuflen, &tpwd) != 0) +- tpwd = NULL; +- if((!fromsu) || (!tpwd)) { ++ /* If this one fails, we get a segfault on calling _pam_getpwnam_r(), ++ * so rather revert to behavior as with "ctrl & PAM_USE_UID_ARG" ++ */ ++ if (!fromsu) { ++ if (_pam_getpwuid_r(getuid(), &passwd, &tbuf, &tbuflen, &tpwd) != 0) ++ tpwd = NULL; ++ if (tpwd) { ++ fromsu = tpwd->pw_name; ++ } ++ } else { ++ if (_pam_getpwnam_r(fromsu, &passwd, &tbuf, &tbuflen, &tpwd) != 0) ++ tpwd = NULL; ++ } ++ if (!tpwd) { + if (ctrl & PAM_DEBUG_ARG) + _pam_log(LOG_NOTICE,"who is running me ?!"); + return PAM_SERVICE_ERR; diff --git a/sys-libs/pam/pam-0.75-r7.ebuild b/sys-libs/pam/pam-0.75-r7.ebuild index df5a713db3e6..e5cd785c36a5 100644 --- a/sys-libs/pam/pam-0.75-r7.ebuild +++ b/sys-libs/pam/pam-0.75-r7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r7.ebuild,v 1.1 2002/07/30 22:11:02 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.75-r7.ebuild,v 1.2 2002/07/30 23:48:02 azarah Exp $ S=${WORKDIR}/Linux-PAM-${PV} S2=${WORKDIR}/pam @@ -40,6 +40,13 @@ src_unpack() { 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 + export WANT_AUTOCONF_2_5=1 autoconf |