summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-08-01 22:45:39 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-08-01 22:45:39 +0000
commit5a69e521ef7d41a0f9863ae9579634fb7141701d (patch)
treeb23606c5eef27006e16edc0cf6d5406543332d1f /sys-auth
parentUse xfconf.eclass. (diff)
downloadgentoo-2-5a69e521ef7d41a0f9863ae9579634fb7141701d.tar.gz
gentoo-2-5a69e521ef7d41a0f9863ae9579634fb7141701d.tar.bz2
gentoo-2-5a69e521ef7d41a0f9863ae9579634fb7141701d.zip
Add patch to avoid doublefree, thanks to TGL in bug #279538.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth')
-rw-r--r--sys-auth/pam_ssh/ChangeLog8
-rw-r--r--sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch20
-rw-r--r--sys-auth/pam_ssh/pam_ssh-1.97-r1.ebuild46
3 files changed, 73 insertions, 1 deletions
diff --git a/sys-auth/pam_ssh/ChangeLog b/sys-auth/pam_ssh/ChangeLog
index b1eed42a239e..642a71607ed0 100644
--- a/sys-auth/pam_ssh/ChangeLog
+++ b/sys-auth/pam_ssh/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-auth/pam_ssh
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam_ssh/ChangeLog,v 1.29 2009/07/29 21:16:06 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam_ssh/ChangeLog,v 1.30 2009/08/01 22:45:38 flameeyes Exp $
+
+*pam_ssh-1.97-r1 (01 Aug 2009)
+
+ 01 Aug 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ +pam_ssh-1.97-r1.ebuild, +files/pam_ssh-1.97-doublefree.patch:
+ Add patch to avoid doublefree, thanks to TGL in bug #279538.
29 Jul 2009; Markus Meier <maekke@gentoo.org> pam_ssh-1.97.ebuild:
amd64/x86 stable, bug #263579
diff --git a/sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch b/sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch
new file mode 100644
index 000000000000..2f63ff8bdcb0
--- /dev/null
+++ b/sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch
@@ -0,0 +1,20 @@
+--- pam_ssh-1.97/pam_ssh.c.orig 2009-08-01 20:11:00.000000000 +0200
++++ pam_ssh-1.97/pam_ssh.c 2009-08-01 20:11:16.000000000 +0200
+@@ -627,7 +627,7 @@
+ * than the file creation time */
+ if (retval = stat(per_agent, &stat_buf)) {
+ pam_ssh_log(LOG_ERR, "stat() failed on %s", per_agent);
+- free(per_agent);
++ pam_set_data(pamh, "ssh_agent_env_agent", NULL, NULL);
+ fclose(env_read);
+ return retval;
+ }
+@@ -646,7 +646,7 @@
+ if (start_agent) {
+ if ((env_write = open(per_agent, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR)) < 0) {
+ pam_ssh_log(LOG_ERR, "can't write to %s", per_agent);
+- free(per_agent);
++ pam_set_data(pamh, "ssh_agent_env_agent", NULL, NULL);
+ openpam_restore_cred(pamh);
+ return PAM_SERVICE_ERR;
+ }
diff --git a/sys-auth/pam_ssh/pam_ssh-1.97-r1.ebuild b/sys-auth/pam_ssh/pam_ssh-1.97-r1.ebuild
new file mode 100644
index 000000000000..cfedb31b0ccc
--- /dev/null
+++ b/sys-auth/pam_ssh/pam_ssh-1.97-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/pam_ssh/pam_ssh-1.97-r1.ebuild,v 1.1 2009/08/01 22:45:38 flameeyes Exp $
+
+EAPI=2
+
+inherit pam autotools
+
+DESCRIPTION="Uses ssh-agent to provide single sign-on"
+HOMEPAGE="http://pam-ssh.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pam-ssh/${P}.tar.bz2"
+
+LICENSE="BSD as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE=""
+
+# Doesn't work on OpenPAM.
+DEPEND="sys-libs/pam
+ sys-devel/libtool"
+
+RDEPEND="sys-libs/pam
+ virtual/ssh"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-doublefree.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ "--with-pam-dir=$(getpam_mod_dir)" \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+ dodoc AUTHORS ChangeLog NEWS README TODO || die
+
+ find "${D}" -name '*.la' -delete || die "Unable to remove libtool archives."
+}
+
+pkg_postinst() {
+ elog "You can enable pam_ssh for system authentication by enabling"
+ elog "the ssh USE flag on sys-auth/pambase."
+}