summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-29 07:54:36 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-29 07:54:36 +0000
commite9192924eda19b991774fb869391793f02f2234b (patch)
treedda016957099354ea24d483131d70813fa9f012b /net-misc/openssh
parentVersion bump, bug #190967. (diff)
downloadgentoo-2-e9192924eda19b991774fb869391793f02f2234b.tar.gz
gentoo-2-e9192924eda19b991774fb869391793f02f2234b.tar.bz2
gentoo-2-e9192924eda19b991774fb869391793f02f2234b.zip
Enable ssl-engine support #194163 by Nikhil Sethi and add GSSAPI/DNS patch #165444 by Alex Iribarren.
(Portage version: 2.1.3.9)
Diffstat (limited to 'net-misc/openssh')
-rw-r--r--net-misc/openssh/ChangeLog9
-rw-r--r--net-misc/openssh/files/digest-openssh-4.7_p1-r212
-rw-r--r--net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch127
-rw-r--r--net-misc/openssh/openssh-4.7_p1-r2.ebuild163
4 files changed, 310 insertions, 1 deletions
diff --git a/net-misc/openssh/ChangeLog b/net-misc/openssh/ChangeLog
index a6a9355bd774..7b950ea28400 100644
--- a/net-misc/openssh/ChangeLog
+++ b/net-misc/openssh/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/openssh
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.267 2007/09/27 04:48:53 kumba Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.268 2007/09/29 07:54:35 vapier Exp $
+
+*openssh-4.7_p1-r2 (29 Sep 2007)
+
+ 29 Sep 2007; Mike Frysinger <vapier@gentoo.org>
+ +files/openssh-4.7_p1-GSSAPI-dns.patch, +openssh-4.7_p1-r2.ebuild:
+ Enable ssl-engine support #194163 by Nikhil Sethi and add GSSAPI/DNS patch
+ #165444 by Alex Iribarren.
27 Sep 2007; Joshua Kinard <kumba@gentoo.org> openssh-4.7_p1-r1.ebuild:
Stable on mips, per #191321.
diff --git a/net-misc/openssh/files/digest-openssh-4.7_p1-r2 b/net-misc/openssh/files/digest-openssh-4.7_p1-r2
new file mode 100644
index 000000000000..f3462cb633b0
--- /dev/null
+++ b/net-misc/openssh/files/digest-openssh-4.7_p1-r2
@@ -0,0 +1,12 @@
+MD5 4a1b1e35074a17f08077e19af665d516 openssh-4.7p1+x509-6.0.1.diff.gz 147459
+RMD160 4ac66d2422f7137dd0af3aae697308266a0ce0cb openssh-4.7p1+x509-6.0.1.diff.gz 147459
+SHA256 2a5524161ac01e44980d74765f6f843d77aa96643879e9ce16120f1a4eb3ebd0 openssh-4.7p1+x509-6.0.1.diff.gz 147459
+MD5 5b536701ee999a29bb622c2f41745ef8 openssh-4.7p1-hpn12v18.diff.gz 16094
+RMD160 7b35eb1a3f6f3b703ac7f155f620bff63a900a0e openssh-4.7p1-hpn12v18.diff.gz 16094
+SHA256 45e6ea24e2722cab9b4e143952bf6539024aa8cc93353b88807c910330bb735b openssh-4.7p1-hpn12v18.diff.gz 16094
+MD5 50a800fd2c6def9e9a53068837e87b91 openssh-4.7p1.tar.gz 991119
+RMD160 b828e79d3d1a931cb77651ec7d7276cf3ba22d90 openssh-4.7p1.tar.gz 991119
+SHA256 d47133f0c6737d2889bf8da7bdf389fc2268d1c7fa3cd11a52451501eab548bc openssh-4.7p1.tar.gz 991119
+MD5 f43a8aae7d69e72f0ec07bc96e46b328 openssh-lpk-4.6p1-0.3.9.patch 61605
+RMD160 1bf1830192c3eba43c66c3c6469740724cb1ecf2 openssh-lpk-4.6p1-0.3.9.patch 61605
+SHA256 e12335e8bf020508ea3866db07b306f4c965e3f9de262c06f62fad494e93107e openssh-lpk-4.6p1-0.3.9.patch 61605
diff --git a/net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch b/net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch
new file mode 100644
index 000000000000..c81ae5cb706d
--- /dev/null
+++ b/net-misc/openssh/files/openssh-4.7_p1-GSSAPI-dns.patch
@@ -0,0 +1,127 @@
+http://bugs.gentoo.org/165444
+https://bugzilla.mindrot.org/show_bug.cgi?id=1008
+
+Index: readconf.c
+===================================================================
+RCS file: /cvs/openssh/readconf.c,v
+retrieving revision 1.135
+diff -u -r1.135 readconf.c
+--- readconf.c 5 Aug 2006 02:39:40 -0000 1.135
++++ readconf.c 19 Aug 2006 11:59:52 -0000
+@@ -126,6 +126,7 @@
+ oClearAllForwardings, oNoHostAuthenticationForLocalhost,
+ oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
+ oAddressFamily, oGssAuthentication, oGssDelegateCreds,
++ oGssTrustDns,
+ oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
+ oSendEnv, oControlPath, oControlMaster, oHashKnownHosts,
+ oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
+@@ -163,9 +164,11 @@
+ #if defined(GSSAPI)
+ { "gssapiauthentication", oGssAuthentication },
+ { "gssapidelegatecredentials", oGssDelegateCreds },
++ { "gssapitrustdns", oGssTrustDns },
+ #else
+ { "gssapiauthentication", oUnsupported },
+ { "gssapidelegatecredentials", oUnsupported },
++ { "gssapitrustdns", oUnsupported },
+ #endif
+ { "fallbacktorsh", oDeprecated },
+ { "usersh", oDeprecated },
+@@ -444,6 +447,10 @@
+ intptr = &options->gss_deleg_creds;
+ goto parse_flag;
+
++ case oGssTrustDns:
++ intptr = &options->gss_trust_dns;
++ goto parse_flag;
++
+ case oBatchMode:
+ intptr = &options->batch_mode;
+ goto parse_flag;
+@@ -1010,6 +1017,7 @@
+ options->challenge_response_authentication = -1;
+ options->gss_authentication = -1;
+ options->gss_deleg_creds = -1;
++ options->gss_trust_dns = -1;
+ options->password_authentication = -1;
+ options->kbd_interactive_authentication = -1;
+ options->kbd_interactive_devices = NULL;
+@@ -1100,6 +1108,8 @@
+ options->gss_authentication = 0;
+ if (options->gss_deleg_creds == -1)
+ options->gss_deleg_creds = 0;
++ if (options->gss_trust_dns == -1)
++ options->gss_trust_dns = 0;
+ if (options->password_authentication == -1)
+ options->password_authentication = 1;
+ if (options->kbd_interactive_authentication == -1)
+Index: readconf.h
+===================================================================
+RCS file: /cvs/openssh/readconf.h,v
+retrieving revision 1.63
+diff -u -r1.63 readconf.h
+--- readconf.h 5 Aug 2006 02:39:40 -0000 1.63
++++ readconf.h 19 Aug 2006 11:59:52 -0000
+@@ -45,6 +45,7 @@
+ /* Try S/Key or TIS, authentication. */
+ int gss_authentication; /* Try GSS authentication */
+ int gss_deleg_creds; /* Delegate GSS credentials */
++ int gss_trust_dns; /* Trust DNS for GSS canonicalization */
+ int password_authentication; /* Try password
+ * authentication. */
+ int kbd_interactive_authentication; /* Try keyboard-interactive auth. */
+Index: ssh_config.5
+===================================================================
+RCS file: /cvs/openssh/ssh_config.5,v
+retrieving revision 1.97
+diff -u -r1.97 ssh_config.5
+--- ssh_config.5 5 Aug 2006 01:34:51 -0000 1.97
++++ ssh_config.5 19 Aug 2006 11:59:53 -0000
+@@ -483,7 +483,16 @@
+ Forward (delegate) credentials to the server.
+ The default is
+ .Dq no .
+-Note that this option applies to protocol version 2 only.
++Note that this option applies to protocol version 2 connections using GSSAPI.
++.It Cm GSSAPITrustDns
++Set to
++.Dq yes to indicate that the DNS is trusted to securely canonicalize
++the name of the host being connected to. If
++.Dq no, the hostname entered on the
++command line will be passed untouched to the GSSAPI library.
++The default is
++.Dq no .
++This option only applies to protocol version 2 connections using GSSAPI.
+ .It Cm HashKnownHosts
+ Indicates that
+ .Xr ssh 1
+Index: sshconnect2.c
+===================================================================
+RCS file: /cvs/openssh/sshconnect2.c,v
+retrieving revision 1.151
+diff -u -r1.151 sshconnect2.c
+--- sshconnect2.c 18 Aug 2006 14:33:34 -0000 1.151
++++ sshconnect2.c 19 Aug 2006 11:59:53 -0000
+@@ -499,6 +499,12 @@
+ static u_int mech = 0;
+ OM_uint32 min;
+ int ok = 0;
++ const char *gss_host;
++
++ if (options.gss_trust_dns)
++ gss_host = get_canonical_hostname(1);
++ else
++ gss_host = authctxt->host;
+
+ /* Try one GSSAPI method at a time, rather than sending them all at
+ * once. */
+@@ -511,7 +517,7 @@
+ /* My DER encoding requires length<128 */
+ if (gss_supported->elements[mech].length < 128 &&
+ ssh_gssapi_check_mechanism(&gssctxt,
+- &gss_supported->elements[mech], authctxt->host)) {
++ &gss_supported->elements[mech], gss_host)) {
+ ok = 1; /* Mechanism works */
+ } else {
+ mech++;
diff --git a/net-misc/openssh/openssh-4.7_p1-r2.ebuild b/net-misc/openssh/openssh-4.7_p1-r2.ebuild
new file mode 100644
index 000000000000..9c6fe0bd88f8
--- /dev/null
+++ b/net-misc/openssh/openssh-4.7_p1-r2.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.7_p1-r2.ebuild,v 1.1 2007/09/29 07:54:35 vapier Exp $
+
+inherit eutils flag-o-matic ccc multilib autotools pam
+
+# Make it more portable between straight releases
+# and _p? releases.
+PARCH=${P/_/}
+
+X509_PATCH="${PARCH}+x509-6.0.1.diff.gz"
+LDAP_PATCH="${PARCH/openssh-4.7/openssh-lpk-4.6}-0.3.9.patch"
+HPN_PATCH="${PARCH}-hpn12v18.diff.gz"
+
+DESCRIPTION="Port of OpenBSD's free SSH release"
+HOMEPAGE="http://www.openssh.com/"
+SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz
+ ldap? ( http://dev.inversepath.com/openssh-lpk/${LDAP_PATCH} )
+ X509? ( http://roumenpetrov.info/openssh/x509-6.0.1/${X509_PATCH} )
+ hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="static pam tcpd kerberos skey selinux chroot X509 ldap smartcard hpn libedit X"
+RESTRICT="mirror" #193401
+
+RDEPEND="pam? ( virtual/pam )
+ kerberos? ( virtual/krb5 )
+ selinux? ( >=sys-libs/libselinux-1.28 )
+ skey? ( >=app-admin/skey-1.1.5-r1 )
+ ldap? ( net-nds/openldap )
+ libedit? ( dev-libs/libedit )
+ >=dev-libs/openssl-0.9.6d
+ >=sys-libs/zlib-1.2.3
+ smartcard? ( dev-libs/opensc )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ X? ( x11-apps/xauth )
+ userland_GNU? ( sys-apps/shadow )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ virtual/os-headers
+ sys-devel/autoconf"
+PROVIDE="virtual/ssh"
+
+S=${WORKDIR}/${PARCH}
+
+pkg_setup() {
+ # this sucks, but i'd rather have people unable to `emerge -u openssh`
+ # than not be able to log in to their server any more
+ maybe_fail() { [[ -z ${!2} ]] && use ${1} && echo ${1} ; }
+ local fail="
+ $(maybe_fail X509 X509_PATCH)
+ $(maybe_fail ldap LDAP_PATCH)
+ "
+ fail=$(echo ${fail})
+ if [[ -n ${fail} ]] ; then
+ eerror "Sorry, but this version does not yet support features"
+ eerror "that you requested: ${fail}"
+ eerror "Please mask ${PF} for now and check back later:"
+ eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
+ die "booooo"
+ fi
+}
+
+src_unpack() {
+ unpack ${PARCH}.tar.gz
+ cd "${S}"
+
+ sed -i \
+ -e '/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:/usr/bin/xauth:' \
+ pathnames.h || die
+
+ use X509 && epatch "${DISTDIR}"/${X509_PATCH} "${FILESDIR}"/${PN}-4.4_p1-x509-hpn-glue.patch
+ use chroot && epatch "${FILESDIR}"/openssh-4.3_p1-chroot.patch
+ use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch
+ if ! use X509 ; then
+ if [[ -n ${LDAP_PATCH} ]] && use ldap ; then
+ epatch "${DISTDIR}"/${LDAP_PATCH} "${FILESDIR}"/${PN}-4.4_p1-ldap-hpn-glue.patch
+ fi
+ elif use ldap ; then
+ ewarn "Sorry, X509 and ldap don't get along, disabling ldap"
+ fi
+ [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH}
+ epatch "${FILESDIR}"/${P}-GSSAPI-dns.patch #165444
+
+ sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die
+
+ eautoreconf
+}
+
+src_compile() {
+ addwrite /dev/ptmx
+ addpredict /etc/skey/skeykeys #skey configure code triggers this
+
+ local myconf=""
+ if use static ; then
+ append-ldflags -static
+ use pam && ewarn "Disabling pam support becuse of static flag"
+ myconf="${myconf} --without-pam"
+ else
+ myconf="${myconf} $(use_with pam)"
+ fi
+
+ econf \
+ --with-ldflags="${LDFLAGS}" \
+ --disable-strip \
+ --sysconfdir=/etc/ssh \
+ --libexecdir=/usr/$(get_libdir)/misc \
+ --datadir=/usr/share/openssh \
+ --disable-suid-ssh \
+ --with-privsep-path=/var/empty \
+ --with-privsep-user=sshd \
+ --with-md5-passwords \
+ --with-ssl-engine \
+ $(use_with ldap) \
+ $(use_with libedit) \
+ $(use_with kerberos kerberos5 /usr) \
+ $(use_with tcpd tcp-wrappers) \
+ $(use_with selinux) \
+ $(use_with skey) \
+ $(use_with smartcard opensc) \
+ ${myconf} \
+ || die "bad configure"
+ emake || die "compile problem"
+}
+
+src_install() {
+ emake install-nokeys DESTDIR="${D}" || die
+ fperms 600 /etc/ssh/sshd_config
+ dobin contrib/ssh-copy-id
+ newinitd "${FILESDIR}"/sshd.rc6 sshd
+ newconfd "${FILESDIR}"/sshd.confd sshd
+ keepdir /var/empty
+
+ newpamd "${FILESDIR}"/sshd.pam_include.1 sshd
+ use pam \
+ && dosed "/^#UsePAM /s:.*:UsePAM yes:" /etc/ssh/sshd_config \
+ && dosed "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" /etc/ssh/sshd_config
+
+ doman contrib/ssh-copy-id.1
+ dodoc ChangeLog CREDITS OVERVIEW README* TODO sshd_config
+
+ diropts -m 0700
+ dodir /etc/skel/.ssh
+}
+
+pkg_postinst() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+
+ # help fix broken perms caused by older ebuilds.
+ # can probably cut this after the next stage release.
+ chmod u+x "${ROOT}"/etc/skel/.ssh >& /dev/null
+
+ ewarn "Remember to merge your config files in /etc/ssh/ and then"
+ ewarn "restart sshd: '/etc/init.d/sshd restart'."
+ if use pam ; then
+ echo
+ ewarn "Please be aware users need a valid shell in /etc/passwd"
+ ewarn "in order to be allowed to login."
+ fi
+}