diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-11-03 08:47:42 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-11-03 08:47:42 +0000 |
commit | e6f713d37d38435b4b59c54188cb1252b623a33f (patch) | |
tree | aff6b07dc1a72248869967985aed6c325fa43e4f | |
parent | arm/s390/sh stable (diff) | |
download | historical-e6f713d37d38435b4b59c54188cb1252b623a33f.tar.gz historical-e6f713d37d38435b4b59c54188cb1252b623a33f.tar.bz2 historical-e6f713d37d38435b4b59c54188cb1252b623a33f.zip |
Fix some issues with printing of banners #244222 by Michał Górny.
Package-Manager: portage-2.2_rc13/cvs/Linux 2.6.27.4 x86_64
-rw-r--r-- | net-misc/openssh/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/openssh/Manifest | 17 | ||||
-rw-r--r-- | net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch | 18 | ||||
-rw-r--r-- | net-misc/openssh/files/openssh-5.1_p1-null-banner.patch | 35 | ||||
-rw-r--r-- | net-misc/openssh/openssh-5.1_p1-r2.ebuild | 171 |
5 files changed, 247 insertions, 3 deletions
diff --git a/net-misc/openssh/ChangeLog b/net-misc/openssh/ChangeLog index 45bf415a2cd3..5f2426469173 100644 --- a/net-misc/openssh/ChangeLog +++ b/net-misc/openssh/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-misc/openssh # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.321 2008/11/01 10:36:37 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.322 2008/11/03 08:47:42 vapier Exp $ + +*openssh-5.1_p1-r2 (03 Nov 2008) + + 03 Nov 2008; Mike Frysinger <vapier@gentoo.org> + +files/openssh-5.1_p1-escaped-banner.patch, + +files/openssh-5.1_p1-null-banner.patch, +openssh-5.1_p1-r2.ebuild: + Fix some issues with printing of banners #244222 by Michał Górny. 01 Nov 2008; Robin H. Johnson <robbat2@gentoo.org> openssh-5.1_p1.ebuild, openssh-5.1_p1-r1.ebuild: diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest index 46633d8c74cc..2d4dca3428b7 100644 --- a/net-misc/openssh/Manifest +++ b/net-misc/openssh/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX openssh-3.9_p1-opensc.patch 3242 RMD160 9c382109f0a64c30d6404f6c6ecdd274b8114fd3 SHA1 1020a213c5acb479003bebe6e4bed0f5b1e56a9f SHA256 36f27a6cd277cf08fadbc23cd4d019def69f40a601d75e63ead7bdc7cdf0539b AUX openssh-4.0_p1-smartcard-ldap-happy.patch 545 RMD160 2287950de3385bdffaf6af8eec8b355358891ef1 SHA1 8f24acbab71b677b81d5108a85eaf88a208b3b86 SHA256 c6a6f82dd9d5fe34310e2a2bd82558809d28b29cad6e8f0b4a1c3f232ded67be AUX openssh-4.3_p1-chroot.patch 1034 RMD160 5971fa1466fd9817a8ec811329a8129fcd651bec SHA1 f580aa1a180397b422193c3ebb4cc69eaa7007a0 SHA256 ccedff9ba82db6782ff80cfcafa6bd1dc754f564e61a4e789b792aaa6b3d4fc3 @@ -17,7 +20,9 @@ AUX openssh-4.7_p1-packet-size.patch 1130 RMD160 b604b500747f5b53c9ddc3950adfaca AUX openssh-4.7_p1-x509-hpn-glue.patch 2734 RMD160 ff6961d2b5b018121c6c40af91b485d47eec1d29 SHA1 a081eaac28e6f761dbe2345263f8eaf810f0fa59 SHA256 6e27def1aaf61da6d4c8bb64d1068d255ffad86453cbc8ff6c42dd9e823bff9b AUX openssh-4.7p1-selinux.diff 541 RMD160 bcb8f1fef2ae8378e7000732223c6116e06e0d6f SHA1 395b4dcff3eb7b92582a4364e612fff87278e7bc SHA256 ef8d71c46059bdcc8487cad06914639a8237197561cc030d8eed3baf418cc810 AUX openssh-4.9_p1-x509-hpn-glue.patch 2741 RMD160 54c645340e491dc915d5b8c7f02e089d2663e1ad SHA1 c3ba982038b2bf31e23c747afcbab540933caf0c SHA256 d0da5449d3226baf3bd25080a74550af75946d87c686a79841c41178aecb8c83 +AUX openssh-5.1_p1-escaped-banner.patch 554 RMD160 90ca69b68e774d9640fc3d9e5bac2bf1e94fd706 SHA1 fee652862c4050c3275d258791bdf9e2a12a6083 SHA256 31ca766d4bc7b5cb45546cc85ca088687b6436915d404ecc2d38bba511f4ab8d AUX openssh-5.1_p1-ldap-hpn-glue.patch 1666 RMD160 5fbcc5c60f9a8f44967c258749e2379295015ae2 SHA1 dfdf6fd489a1a2db4cc25d7fc49d31769d48c07d SHA256 f92037859510902f7bc7b97c92dc989614e0d2c07e5812b4d787b38892f3a6a3 +AUX openssh-5.1_p1-null-banner.patch 1411 RMD160 b3034cecc1d74973eed05c8f6ef580cab7ed1a7e SHA1 b5173ac7714c185abbc256b44a80e1dd21687f9b SHA256 7a682f19d1f60bf2c8cde330504fa22306c9ab2ed6d2b7fd455fb6d851a1f423 AUX openssh-5.1_p1-x509-hpn-glue.patch 3373 RMD160 024d7f17972907a591a067bfd0883ba0c0b297d0 SHA1 1b2ad74448c695bedee22a48d0bca879605c23d0 SHA256 0d9b10881a9207e5feec7429693b34fa56464e2c9e4fea1540d258ee2000e37a AUX openssh-securid-1.3.1-updates.patch 445 RMD160 b1db3dfa75f7e03d0dff41e85e285f8b749f27f0 SHA1 757a8b0c1586fdcbff0762b39a52f1b315d4b110 SHA256 11c95cc508d20c8eb1e8faa0d2b5e68346cbb93db8fb560cfa8b4d2c0d1104b3 AUX sshd.confd 396 RMD160 029680b2281961130a815ef599750c4fc4e84987 SHA1 23c283d0967944b6125be26ed4628f49abf586b2 SHA256 29c6d57ac3ec6018cadc6ba6cd9b90c9ed46e20049b970fdcc68ee2481a2ee41 @@ -58,7 +63,15 @@ EBUILD openssh-4.7_p1-r20.ebuild 5364 RMD160 7e9a66b5d54b49f83ae8c85dc6cef9aa431 EBUILD openssh-4.7_p1-r6.ebuild 5351 RMD160 a2e3b8435e17ec0697a49a2da195f95cdaeab947 SHA1 3b9a1137874658af134c462b3de434182d4c2330 SHA256 f21dd1253baa4de4994798afc25a1f2a656705787083d3f619856656b966f059 EBUILD openssh-5.0_p1-r1.ebuild 5185 RMD160 7a6f156064ad1fe10b0147dd3d90727139b5c895 SHA1 520a472607295a03a60cb6a7f3ce46e155123f40 SHA256 87a98ecf1a680b78098bbd2cb11a231f986ec6d0ec7b467e1e5be88e1a67fc96 EBUILD openssh-5.0_p1-r2.ebuild 5239 RMD160 6ccb10bacc5e8d21ab9f44d043f606dd50bea1dc SHA1 26ec517a579b65d9d916746bc1c0acc918c0edf1 SHA256 3763ef177f53a9bccbf449aa3bde6568a1dce1fb7429fd95721e0b45423ceb69 -EBUILD openssh-5.1_p1-r1.ebuild 5313 RMD160 89cd45a4b6587b95947ff50888f48afb804a9146 SHA1 a6a975a6b5987fa34c82cb2a7e90bb49ae587f02 SHA256 b73e5281178b5f29ccab83959e5d79037aa44510b046639897d19fc544ec5260 +EBUILD openssh-5.1_p1-r1.ebuild 5309 RMD160 4fe1fec31914d8f1f4f43b1842cf5512779647bf SHA1 f4fa1fe52ad5314a7035dd8e4149eb1252f44006 SHA256 681731bc24c63e9848df532e82d369956fc15806151c930e2b880e69bfb0c67b +EBUILD openssh-5.1_p1-r2.ebuild 5430 RMD160 07883db4171fd39f11421389f8fa31ae7eb8fe8f SHA1 01709e0302d5cc0db2b556513b46bc4536b3ef9b SHA256 1a7bc20611c10462e7752cb60d72cf41d15c837fe6cc71ec5f8621135cdcae25 EBUILD openssh-5.1_p1.ebuild 5249 RMD160 048d448fc272b34855af9cd89978f1d9557de082 SHA1 3d55a50404ee225fcdb7304ee7a5fc1c405f6db7 SHA256 6d8a9b1ef305ce1c6d9aa92baedf6300dedb2992806035b3776ff28cd5e3dddc -MISC ChangeLog 50214 RMD160 653c56f7d52f5fec1485d0b15af3f39d1edc31ff SHA1 1669ce894b2b34f0dfd2d32b649028b9d7af7cc1 SHA256 f9492be85cb3488edfcc0ec26bf8b3295cb40064e59629faa7c90f6f2f4f953f +MISC ChangeLog 50484 RMD160 a91c79acbee767f239b9447ec88d7de09adda565 SHA1 68c0be51b5310d4fcca47e494724cf8521903ab1 SHA256 340dd421c097874f1461530073c26a7794f82e8e92fc0f863d801c25d907bfc4 MISC metadata.xml 1520 RMD160 541d1e217f79ac6e3988deea05ea7b7e5d508c3d SHA1 b6809c92e434e61fda6eac4c43c4fe380d1591d3 SHA256 749cd9c2ef9a937c3a6a6c8bcf3fa81ca7d2f54f4f011d6f3ee3a5614993cded +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkkOurQACgkQ67wieSYcaxfH5gCcDF8DrqRIHubgMPP6BggeKcRp +hXUAnR8sz1nZ0eNk9NcO0OvBsKBbcp4Y +=oCF4 +-----END PGP SIGNATURE----- diff --git a/net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch b/net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch new file mode 100644 index 000000000000..440772245d6f --- /dev/null +++ b/net-misc/openssh/files/openssh-5.1_p1-escaped-banner.patch @@ -0,0 +1,18 @@ +don't escape the banner output + +http://bugs.gentoo.org/244222 +https://bugzilla.mindrot.org/show_bug.cgi?id=1533 + +fix by Michał Górny <mgorny.3ehbo@mailnull.com> + +--- sshconnect2.c ++++ sshconnect2.c +@@ -415,7 +415,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt) + if (len > 65536) + len = 65536; + msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */ +- strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL); ++ strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH); + fprintf(stderr, "%s", msg); + xfree(msg); + } diff --git a/net-misc/openssh/files/openssh-5.1_p1-null-banner.patch b/net-misc/openssh/files/openssh-5.1_p1-null-banner.patch new file mode 100644 index 000000000000..79e5a6c26476 --- /dev/null +++ b/net-misc/openssh/files/openssh-5.1_p1-null-banner.patch @@ -0,0 +1,35 @@ +apply fixes from upstream for empty banner + +https://bugzilla.mindrot.org/show_bug.cgi?id=1496 +http://bugs.gentoo.org/244222 + +---------------------------- +revision 1.168 +date: 2008/10/03 23:56:28; author: deraadt; state: Exp; lines: +3 -3 +Repair strnvis() buffersize of 4*n+1, with termination gauranteed by the +function. +spotted by des@freebsd, who commited an incorrect fix to the freebsd tree +and (as is fairly typical) did not report the problem to us. But this fix +is correct. +ok djm +---------------------------- +revision 1.167 +date: 2008/07/31 14:48:28; author: markus; state: Exp; lines: +2 -2 +don't allocate space for empty banners; report t8m at centrum.cz; ok deraadt +--- src/usr.bin/ssh/sshconnect2.c 2008/07/17 09:48:00 1.166 ++++ src/usr.bin/ssh/sshconnect2.c 2008/10/04 00:56:28 1.168 +@@ -377,11 +377,11 @@ input_userauth_banner(int type, u_int32_t seq, void *c + debug3("input_userauth_banner"); + raw = packet_get_string(&len); + lang = packet_get_string(NULL); +- if (options.log_level >= SYSLOG_LEVEL_INFO) { ++ if (len > 0 && options.log_level >= SYSLOG_LEVEL_INFO) { + if (len > 65536) + len = 65536; +- msg = xmalloc(len * 4); /* max expansion from strnvis() */ +- strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL); ++ msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */ ++ strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL); + fprintf(stderr, "%s", msg); + xfree(msg); + } diff --git a/net-misc/openssh/openssh-5.1_p1-r2.ebuild b/net-misc/openssh/openssh-5.1_p1-r2.ebuild new file mode 100644 index 000000000000..46320dc993cd --- /dev/null +++ b/net-misc/openssh/openssh-5.1_p1-r2.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-5.1_p1-r2.ebuild,v 1.1 2008/11/03 08:47:42 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.1.1.diff.gz" +LDAP_PATCH="${PARCH/openssh/openssh-lpk}-0.3.10.patch.gz" +HPN_PATCH="${PARCH}-hpn13v5.diff.gz" + +DESCRIPTION="Port of OpenBSD's free SSH release" +HOMEPAGE="http://www.openssh.org/" +SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz + http://www.sxw.org.uk/computing/patches/openssh-5.0p1-gsskex-20080404.patch + ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )} + ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-6.1.1/${X509_PATCH} )} + ${HPN_PATCH:+hpn? ( http://www.psc.edu/networking/projects/hpn-ssh/${HPN_PATCH} )}" + #${LDAP_PATCH:+ldap? ( http://dev.inversepath.com/openssh-lpk/${LDAP_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 X509 ldap smartcard hpn libedit X" + +RDEPEND="pam? ( virtual/pam ) + kerberos? ( virtual/krb5 ) + selinux? ( >=sys-libs/libselinux-1.28 ) + skey? ( >=sys-auth/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" +RDEPEND="${RDEPEND} + pam? ( sys-auth/pambase )" +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}-5.1_p1-x509-hpn-glue.patch + use smartcard && epatch "${FILESDIR}"/openssh-3.9_p1-opensc.patch + if ! use X509 ; then + if [[ -n ${LDAP_PATCH} ]] && use ldap ; then + # The patch for bug 210110 64-bit stuff is now included. + epatch "${DISTDIR}"/${LDAP_PATCH} + epatch "${FILESDIR}"/${PN}-5.1_p1-ldap-hpn-glue.patch + fi + #epatch "${DISTDIR}"/openssh-5.0p1-gsskex-20080404.patch #115553 #216932 + else + use ldap && ewarn "Sorry, X509 and ldap don't get along, disabling ldap" + fi + epatch "${FILESDIR}"/${PN}-4.7_p1-GSSAPI-dns.patch #165444 integrated into gsskex + [[ -n ${HPN_PATCH} ]] && use hpn && epatch "${DISTDIR}"/${HPN_PATCH} + epatch "${FILESDIR}"/${PN}-4.7p1-selinux.diff #191665 + + sed -i "s:-lcrypto:$(pkg-config --libs openssl):" configure{,.ac} || die + + epatch "${FILESDIR}"/${P}-null-banner.patch #244222 + epatch "${FILESDIR}"/${P}-escaped-banner.patch #244222 + + 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 \ + --with-privsep-path=/var/empty \ + --with-privsep-user=sshd \ + --with-md5-passwords \ + --with-ssl-engine \ + $(use ldap && [ -n "${LDAP_PATCH}" ] && 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.2 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 +} |