summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-auth/pam_ssh')
-rw-r--r--sys-auth/pam_ssh/Manifest3
-rw-r--r--sys-auth/pam_ssh/files/pam_ssh-1.97-EOF.patch11
-rw-r--r--sys-auth/pam_ssh/files/pam_ssh-1.97-doublefree.patch20
-rw-r--r--sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch22
-rw-r--r--sys-auth/pam_ssh/files/pam_symbols.ver4
-rw-r--r--sys-auth/pam_ssh/metadata.xml11
-rw-r--r--sys-auth/pam_ssh/pam_ssh-1.97-r1.ebuild46
-rw-r--r--sys-auth/pam_ssh/pam_ssh-1.97-r2.ebuild52
-rw-r--r--sys-auth/pam_ssh/pam_ssh-1.97-r3.ebuild53
-rw-r--r--sys-auth/pam_ssh/pam_ssh-1.98.ebuild46
-rw-r--r--sys-auth/pam_ssh/pam_ssh-2.1.ebuild61
11 files changed, 329 insertions, 0 deletions
diff --git a/sys-auth/pam_ssh/Manifest b/sys-auth/pam_ssh/Manifest
new file mode 100644
index 000000000000..09d71b452c4b
--- /dev/null
+++ b/sys-auth/pam_ssh/Manifest
@@ -0,0 +1,3 @@
+DIST pam_ssh-1.97.tar.bz2 200184 SHA256 10233b0d3e480fdc977d4e3a1ea5a994cf1f257c3b948650a86e4d753796789d SHA512 78632ef5baf8c7ac6d28d16a4c7e452978ad09a969c562cfcc708b835dbba3da12317569a618768ef6f9d59db1d5d31f2a0c7b2ab1244ed9caa37eb89413494e WHIRLPOOL efe23d1d86f92298682edeb960e046d0c5def65961e3e51dc82bb244b98f76ac7b7a456fd80d31740e851602e8d8cd27d17d0b66ca6e0e44d1356982c4496887
+DIST pam_ssh-1.98.tar.bz2 292989 SHA256 30312f242c00551b120cc39defd3745b8cb50408ea845e8688d18d2a28b51180 SHA512 bf6da4ced0619549d56516c6b24e899664e0948da7a0cc04ff1b536d06cc8c26242c83eb36ed835668c824b777e270aa293162ac77e3c479311386e6e5da39ff WHIRLPOOL a62dccfec3a0208e8e94c0635aa1d8813ff3bbfeba5eebbff854c44638c51a547251a22460f78d08d34cc60b0318bcec622649b6a0dac030d159378451df09ae
+DIST pam_ssh-2.1.tar.xz 361000 SHA256 55fbe8488d59cff05a77523b4afc2e2a8d1ba35d93546f1828ec48e20e2600cb SHA512 8252b15efffa5687f740963f7a3c3479b73f99eca26a17155f915a10b9a71362a2778449adf10f01c174cc8545961ce3ea64459338a7c995c242b209529fd640 WHIRLPOOL e46d22325b06d9801d99d36b1045a4b8da0b8e874d83c6309353c54827189e47bbadb5789f498037829b6b9b9e618fec3ea5a441ac349643d93667fcf1dc2759
diff --git a/sys-auth/pam_ssh/files/pam_ssh-1.97-EOF.patch b/sys-auth/pam_ssh/files/pam_ssh-1.97-EOF.patch
new file mode 100644
index 000000000000..80214a1df70c
--- /dev/null
+++ b/sys-auth/pam_ssh/files/pam_ssh-1.97-EOF.patch
@@ -0,0 +1,11 @@
+--- pam_ssh-1.92.orig/pam_get_pass.c 2004-02-19 19:59:05.000000000 +0100
++++ pam_ssh-1.92/pam_get_pass.c 2009-04-18 13:51:10.000000000 +0200
+@@ -63,6 +63,8 @@
+ retval = conv->conv(1, msgs, &resp, conv->appdata_ptr);
+ if (retval != PAM_SUCCESS)
+ return retval;
++ if (resp[0].resp == NULL)
++ return PAM_AUTHTOK_RECOVERY_ERR;
+ retval = pam_set_item(pamh, PAM_AUTHTOK, resp[0].resp);
+ if (retval != PAM_SUCCESS)
+ return retval;
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/files/pam_ssh-2.1-dot-ssh-check.patch b/sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch
new file mode 100644
index 000000000000..b5baa71e8f4a
--- /dev/null
+++ b/sys-auth/pam_ssh/files/pam_ssh-2.1-dot-ssh-check.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/503424#c5
+http://sourceforge.net/p/pam-ssh/bugs/16/
+
+--- a/pam_ssh.c
++++ b/pam_ssh.c
+@@ -867,6 +867,7 @@
+ int attempt; /* No. of attempt to contact agent */
+ const char *user; /* username */
+ struct options options; /* PAM options */
++ struct stat sb; /* to check for existing .ssh */
+
+ #if HAVE_PAM_STRUCT_OPTIONS || !HAVE_PAM_STD_OPTION
+ memset(&options, 0, sizeof options);
+@@ -916,7 +917,7 @@
+ openpam_restore_cred(pamh);
+ return PAM_SERVICE_ERR;
+ }
+- if ((access(dotdir,F_OK)) == -1) {
++ if (stat(dotdir, &sb) == -1) {
+ pam_ssh_log(LOG_DEBUG, "inexistent configuration directory");
+ free(dotdir);
+ openpam_restore_cred(pamh);
diff --git a/sys-auth/pam_ssh/files/pam_symbols.ver b/sys-auth/pam_ssh/files/pam_symbols.ver
new file mode 100644
index 000000000000..dbc677b77a2d
--- /dev/null
+++ b/sys-auth/pam_ssh/files/pam_symbols.ver
@@ -0,0 +1,4 @@
+{
+ global: pam_sm_*;
+ local: *;
+};
diff --git a/sys-auth/pam_ssh/metadata.xml b/sys-auth/pam_ssh/metadata.xml
new file mode 100644
index 000000000000..66fb0a248b3b
--- /dev/null
+++ b/sys-auth/pam_ssh/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>pam</herd>
+ <maintainer>
+ <email>pam-bugs@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pam-ssh</remote-id>
+ </upstream>
+</pkgmetadata>
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..c4924d59e350
--- /dev/null
+++ b/sys-auth/pam_ssh/pam_ssh-1.97-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit pam autotools eutils
+
+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-2 BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
+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."
+}
diff --git a/sys-auth/pam_ssh/pam_ssh-1.97-r2.ebuild b/sys-auth/pam_ssh/pam_ssh-1.97-r2.ebuild
new file mode 100644
index 000000000000..0dce47d6e51e
--- /dev/null
+++ b/sys-auth/pam_ssh/pam_ssh-1.97-r2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit pam autotools eutils flag-o-matic
+
+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-2 BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ~ppc64 s390 sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE=""
+
+# Doesn't work on OpenPAM; looks for OpenSSH at build time (bug
+# #282993) and won't work with other implementations either
+RDEPEND="sys-libs/pam
+ net-misc/openssh"
+
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-doublefree.patch"
+ eautoreconf
+}
+
+src_configure() {
+ # hide all the otherwise-exported symbols that may clash with
+ # other software loading the PAM modules (see bug #274924 as an
+ # example).
+ append-ldflags -Wl,--version-script="${FILESDIR}"/pam_symbols.ver
+
+ 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."
+}
diff --git a/sys-auth/pam_ssh/pam_ssh-1.97-r3.ebuild b/sys-auth/pam_ssh/pam_ssh-1.97-r3.ebuild
new file mode 100644
index 000000000000..017a0314b27e
--- /dev/null
+++ b/sys-auth/pam_ssh/pam_ssh-1.97-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit pam autotools eutils flag-o-matic
+
+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-2 BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE=""
+
+# Doesn't work on OpenPAM; looks for OpenSSH at build time (bug
+# #282993) and won't work with other implementations either
+RDEPEND="sys-libs/pam
+ net-misc/openssh"
+
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-doublefree.patch"
+ epatch "${FILESDIR}/${P}-EOF.patch"
+ eautoreconf
+}
+
+src_configure() {
+ # hide all the otherwise-exported symbols that may clash with
+ # other software loading the PAM modules (see bug #274924 as an
+ # example).
+ append-ldflags -Wl,--version-script="${FILESDIR}"/pam_symbols.ver
+
+ 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."
+}
diff --git a/sys-auth/pam_ssh/pam_ssh-1.98.ebuild b/sys-auth/pam_ssh/pam_ssh-1.98.ebuild
new file mode 100644
index 000000000000..d9c53f79ac5c
--- /dev/null
+++ b/sys-auth/pam_ssh/pam_ssh-1.98.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit pam eutils flag-o-matic readme.gentoo
+
+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-2 BSD ISC"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE=""
+
+# Doesn't work on OpenPAM; looks for OpenSSH at build time (bug
+# #282993) and won't work with other implementations either
+RDEPEND="
+ sys-libs/pam
+ net-misc/openssh
+"
+DEPEND="${RDEPEND}
+ sys-devel/libtool
+"
+
+DOC_CONTENTS="
+ You can enable pam_ssh for system authentication by enabling
+ the pam_ssh USE flag on sys-auth/pambase.
+"
+
+src_configure() {
+ # hide all the otherwise-exported symbols that may clash with
+ # other software loading the PAM modules (see bug #274924 as an
+ # example).
+ append-ldflags -Wl,--version-script="${FILESDIR}"/pam_symbols.ver
+
+ econf \
+ "--with-pam-dir=$(getpam_mod_dir)"
+}
+
+src_install() {
+ default
+ prune_libtool_files --modules
+ readme.gentoo_create_doc
+}
diff --git a/sys-auth/pam_ssh/pam_ssh-2.1.ebuild b/sys-auth/pam_ssh/pam_ssh-2.1.ebuild
new file mode 100644
index 000000000000..40670e4df8a6
--- /dev/null
+++ b/sys-auth/pam_ssh/pam_ssh-2.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit pam eutils flag-o-matic readme.gentoo
+
+DESCRIPTION="Uses ssh-agent to provide single sign-on"
+HOMEPAGE="http://pam-ssh.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pam-ssh/${P}.tar.xz"
+
+LICENSE="BSD-2 BSD ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE=""
+
+# Only supports OpenSSH via `ssh-agent` #282993
+DEPEND="virtual/pam
+ dev-libs/openssl:0="
+RDEPEND="${DEPEND}
+ net-misc/openssh"
+
+DOC_CONTENTS="
+ You can enable pam_ssh for system authentication by enabling
+ the pam_ssh USE flag on sys-auth/pambase.
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-dot-ssh-check.patch #503424#c5
+}
+
+src_configure() {
+ # hide all the otherwise-exported symbols that may clash with
+ # other software loading the PAM modules (see bug #274924 as an
+ # example).
+ append-ldflags -Wl,--version-script="${FILESDIR}"/pam_symbols.ver
+
+ # Set the cache var so the configure script doesn't go probing hardcoded
+ # file system paths and picking up the wrong thing.
+ export ac_cv_openssldir=''
+
+ # Avoid cross-compiling funkiness and requiring openssh at build time.
+ export PATH_SSH_AGENT="${EPREFIX}/usr/bin/ssh-agent"
+
+ econf \
+ "--with-pam-dir=$(getpam_mod_dir)"
+}
+
+src_install() {
+ default
+ prune_libtool_files --modules
+ readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-2.0" ; then #554150
+ ewarn "Upstream pam_ssh has changed where ssh keys live. Only keys in your"
+ ewarn "~/.ssh/login-keys.d/ will be accepted for authentication."
+ fi
+}