1 |
commit: 6b0dea5feb4e927a973caa037ebee05e46e081e1 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 21 09:47:33 2017 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 21 09:47:49 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=6b0dea5f |
7 |
|
8 |
net-misc/openssh: sync with tree version |
9 |
|
10 |
Package-Manager: Portage-2.3.13, Repoman-2.3.3 |
11 |
RepoMan-Options: --force |
12 |
|
13 |
net-misc/openssh/Manifest | 7 +- |
14 |
.../files/openssh-7.5_p1-CVE-2017-15906.patch | 31 ++ |
15 |
net-misc/openssh/openssh-7.3_p1-r7.ebuild | 355 --------------------- |
16 |
...h-7.5_p1-r1.ebuild => openssh-7.5_p1-r3.ebuild} | 8 +- |
17 |
4 files changed, 36 insertions(+), 365 deletions(-) |
18 |
|
19 |
diff --git a/net-misc/openssh/Manifest b/net-misc/openssh/Manifest |
20 |
index 4a1820a..bda2277 100644 |
21 |
--- a/net-misc/openssh/Manifest |
22 |
+++ b/net-misc/openssh/Manifest |
23 |
@@ -1,10 +1,5 @@ |
24 |
-DIST openssh-7.3_p1-hpn-14.10-r1.patch.xz 20584 SHA256 0bbbfeb1f9f975ad591ed4ec74927172c5299ec1a76210197c14575204efa85d SHA512 f0a1c84af85f7cfc7cb58b5117b3d0f57fc25ae0dd608e38b48ef42da43780fd5cf243d26ff9b3fbd6f4cb1567852b87bcb75f98791cf3ad1892e8579a7834d3 WHIRLPOOL b1a8bae14c8189745056c15c9ed45207aa06af1f4c598a1af7dc3cc56e47bd0211a63989a920727e20311a148bbcf3202c202eae94cd1512c7d87816a9f44bcb |
25 |
-DIST openssh-7.3_p1-sctp.patch.xz 9968 SHA256 18c3db45ed1e5495db29626938d8432aee509e88057494f052cfc09d40824c7f SHA512 f249b76898af0c6f1f65f2a1cfb422648aa712818d0dc051b85a171f26bdddf7980fff5de7761161aa41c309e528b3801b4234f5cdd9f79f8eef173ae83f1e3c WHIRLPOOL 1d92b969154b77d8ce9e3a6d0302aa17ec95e2d5ea4de72c0fb5680a8ee12f518ee5b1c47f22ad5d1a923a74c43829ed36cf478fe75fe400de967ab48d93dc99 |
26 |
-DIST openssh-7.3p1+x509-9.2.diff.gz 588078 SHA256 45f054cbb2b77ac8cc7ab01439e34083382137d47b840ca274555b7e2cf7098b SHA512 fab0da148b0833a651e8a7c36f344aacecef6fa92f8f1cb6302272d98c1ab018831f5850dcaa8f54a39f9ada9b7d5b0a0ea01defc3c6f603bbe211f6bff6a841 WHIRLPOOL 53f63d879f563909c57d23ced273e23eda1eace2a2ddfd54edf5f2ef15218cc7e5d927e54714b6850db541f361c459de50d79b0a4516b43ce4cba8eb66b49485 |
27 |
-DIST openssh-7.3p1.tar.gz 1522617 SHA256 3ffb989a6dcaa69594c3b550d4855a5a2e1718ccdde7f5e36387b424220fbecc SHA512 7ba2d6140f38bd359ebf32ef17626e0ae1c00c3a38c01877b7c6b0317d030f10a8f82a0a51fc3b6273619de9ed73e24b8cf107b1e968f927053a3bedf97ff801 WHIRLPOOL f852026638d173d455f74e3fce16673fc4b10f32d954d5bb8c7c65df8d1ca7efd0938177dd9fb6e1f7354383f21c7bca8a2f01e89793e32f8ca68c30456a611c |
28 |
DIST openssh-7.4_p1-sctp.patch.xz 8220 SHA256 18fa77f79ccae8b9a76bc877e9602113d91953bd487b6cc8284bfd1217438a23 SHA512 0c199e3b26949482125aeaa88216b2458292589e3eac8908d9134d13a1cae891094fcb0f752ed3009b3126cc72277b460205f39140c251792eb1b545271c3bd4 WHIRLPOOL 0f0ea1d36523b35d3be33d22fb84daa05fd14c464d69c19695235f81d26326bc53d6804bf34d0cc0c2584f412bfdac361d2b018032447d1033a4ff4fd9458a09 |
29 |
-DIST openssh-7.5p1+x509-10.1.diff.gz 460721 SHA256 e7abe401e7f651779c680491cfefbfcf4f26743202641b2bda934f80bb4464d2 SHA512 d3b5a8f5e3a88eda7989b002236811867b7e2c39bf7cd29a6dbbce277fca3fbedbfdbeaf1fba7d8c19f3dea32a17790e90604765f18576bcc5627a9c1d39109c WHIRLPOOL 2d4f96b47bcde9eabd19cad2fdc4da01a3d207f6ad5f4f1ea5a7dbd708d61783ae6a53e4cb622feed838106f57dbe6a7ecd1b41426325870378caf44803ff9ef |
30 |
+DIST openssh-7.5p1+x509-10.2.diff.gz 467040 SHA256 24d5c1949d245b432abf2db6c28554a09bcffdcb4f4247826c0a33bdbee8b92c SHA512 ec760d38771749d09afc8d720120ea2aa065c1c7983898b45dba74a4411f7e61e7705da226864e1e8e62e2261eecc3a4ab654b528c71512a07798824d9fb1a9a WHIRLPOOL 3291a3e39b1a47efe149cdf805de11217fd55c4260477f2a6c6cc0bfa376b98a5dc7f56a49ae184fb57bae6226c73d1794db7b2285e3ea26a8fea4bc9304655b |
31 |
DIST openssh-7.5p1-hpnssh14v12.tar.xz 23068 SHA256 8a1ed99c121a4ad21d7a26cd32627a8dd51595fd3ee9f95dc70e6b50fe779ce2 SHA512 45c42090a212b9ce898fbaa8284ddf0f0d17236af13c4a780e00bf265b0c7a4286027e90a7ce9ad70066309db722709dd2f0a7914f57e5364ffbaf7c4859cdf9 WHIRLPOOL 6089ad8ae16c112a6f15d168c092e7f057b9e6d815724346b5a6a1cd0de932f779d5f410d48c904d935fcb3bad3f597fa4de075ab1f49cadc9842ce7bd8fdf42 |
32 |
DIST openssh-7.5p1.tar.gz 1510857 SHA256 9846e3c5fab9f0547400b4d2c017992f914222b3fd1f8eee6c7dc6bc5e59f9f0 SHA512 58c542e8a110fb4316a68db94abb663fa1c810becd0638d45281df8aeca62c1f705090437a80e788e6c29121769b72a505feced537d3118c933fde01b5285c81 WHIRLPOOL 1a42c68d8e350bc4790dd4c1a98dd6571bfa353ad6871b1462c53b6412f752719daabd1a13bb4434d294de966a00428ac66334bab45f371420029b5e34a6914c |
33 |
-DIST openssh-lpk-7.3p1-0.3.14.patch.xz 17800 SHA256 cf1f60235cb8b0e561cd36cbf9e4f437e16fd748c2616d3f511c128c02deb76c SHA512 e9a73c5f13e41f6e11c744fdbcdb2e399c394479f79249e901cb3c101efb06f23d51d3ba4869db872184fa034a5910fc93a730fe906266c8d7409e39ad5b1ecd WHIRLPOOL bbdeadbed8f901148713bd9e4a082a4be2992c3151f995febd8be89bbb85d91185e1f0413b5a94a9340f2f404d18c9cee2aa6e032adaee0306aa1c624f6cc09c |
34 |
DIST openssh-lpk-7.5p1-0.3.14.patch.xz 17040 SHA256 11060be996b291b8d78de698c68a92428430e4ff440553f5045c6de5c0e1dab3 SHA512 9ce5d7e5d831c972f0f866b686bf93a048a03979ab38627973f5491eeeaa45f9faab0520b3a7ed90a13a67213fdc9cd4cf11e423acad441ea91b71037c8b435b WHIRLPOOL 58526777475786bb5efa193f3a3ec0500c4d48b18fef67698f8b1999cb07f04fbca7b7d3ece469f3a1e1ceca5152cdd08d3dbe7cfa4e7494740dc2c233101b93 |
35 |
|
36 |
diff --git a/net-misc/openssh/files/openssh-7.5_p1-CVE-2017-15906.patch b/net-misc/openssh/files/openssh-7.5_p1-CVE-2017-15906.patch |
37 |
new file mode 100644 |
38 |
index 0000000..b97ceb4 |
39 |
--- /dev/null |
40 |
+++ b/net-misc/openssh/files/openssh-7.5_p1-CVE-2017-15906.patch |
41 |
@@ -0,0 +1,31 @@ |
42 |
+From a6981567e8e215acc1ef690c8dbb30f2d9b00a19 Mon Sep 17 00:00:00 2001 |
43 |
+From: djm <djm@×××××××.org> |
44 |
+Date: Tue, 4 Apr 2017 00:24:56 +0000 |
45 |
+Subject: [PATCH] disallow creation (of empty files) in read-only mode; |
46 |
+ reported by Michal Zalewski, feedback & ok deraadt@ |
47 |
+ |
48 |
+--- |
49 |
+ usr.bin/ssh/sftp-server.c | 6 +++--- |
50 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
51 |
+ |
52 |
+diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c |
53 |
+index 2510d234a3a..42249ebd60d 100644 |
54 |
+--- a/usr.bin/ssh/sftp-server.c |
55 |
++++ b/usr.bin/ssh/sftp-server.c |
56 |
+@@ -1,4 +1,4 @@ |
57 |
+-/* $OpenBSD: sftp-server.c,v 1.110 2016/09/12 01:22:38 deraadt Exp $ */ |
58 |
++/* $OpenBSD: sftp-server.c,v 1.111 2017/04/04 00:24:56 djm Exp $ */ |
59 |
+ /* |
60 |
+ * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. |
61 |
+ * |
62 |
+@@ -683,8 +683,8 @@ process_open(u_int32_t id) |
63 |
+ logit("open \"%s\" flags %s mode 0%o", |
64 |
+ name, string_from_portable(pflags), mode); |
65 |
+ if (readonly && |
66 |
+- ((flags & O_ACCMODE) == O_WRONLY || |
67 |
+- (flags & O_ACCMODE) == O_RDWR)) { |
68 |
++ ((flags & O_ACCMODE) != O_RDONLY || |
69 |
++ (flags & (O_CREAT|O_TRUNC)) != 0)) { |
70 |
+ verbose("Refusing open request in read-only mode"); |
71 |
+ status = SSH2_FX_PERMISSION_DENIED; |
72 |
+ } else { |
73 |
|
74 |
diff --git a/net-misc/openssh/openssh-7.3_p1-r7.ebuild b/net-misc/openssh/openssh-7.3_p1-r7.ebuild |
75 |
deleted file mode 100644 |
76 |
index 681a5ee..0000000 |
77 |
--- a/net-misc/openssh/openssh-7.3_p1-r7.ebuild |
78 |
+++ /dev/null |
79 |
@@ -1,355 +0,0 @@ |
80 |
-# Copyright 1999-2017 Gentoo Foundation |
81 |
-# Distributed under the terms of the GNU General Public License v2 |
82 |
- |
83 |
-EAPI="5" |
84 |
- |
85 |
-inherit eutils user flag-o-matic multilib autotools pam systemd versionator toolchain-funcs |
86 |
- |
87 |
-# Make it more portable between straight releases |
88 |
-# and _p? releases. |
89 |
-PARCH=${P/_} |
90 |
-HPN_PV="${PV}" |
91 |
-HPN_VER="14.10" |
92 |
- |
93 |
-HPN_PATCH="${PN}-${HPN_PV}-hpn-14.10-r1.patch" |
94 |
-SCTP_PATCH="${PN}-7.3_p1-sctp.patch.xz" |
95 |
-LDAP_PATCH="${PN}-lpk-7.3p1-0.3.14.patch.xz" |
96 |
-X509_VER="9.2" X509_PATCH="${PN}-${PV/_}+x509-${X509_VER}.diff.gz" |
97 |
- |
98 |
-DESCRIPTION="Port of OpenBSD's free SSH release" |
99 |
-HOMEPAGE="http://www.openssh.org/" |
100 |
-SRC_URI="mirror://openbsd/OpenSSH/portable/${PARCH}.tar.gz |
101 |
- ${SCTP_PATCH:+mirror://gentoo/${SCTP_PATCH}} |
102 |
- ${HPN_PATCH:+hpn? ( |
103 |
- mirror://gentoo/${HPN_PATCH}.xz |
104 |
- http://dev.gentoo.org/~chutzpah/${HPN_PATCH}.xz |
105 |
- )} |
106 |
- ${LDAP_PATCH:+ldap? ( mirror://gentoo/${LDAP_PATCH} )} |
107 |
- ${X509_PATCH:+X509? ( http://roumenpetrov.info/openssh/x509-${X509_VER}/${X509_PATCH} )} |
108 |
- " |
109 |
- |
110 |
-LICENSE="BSD GPL-2" |
111 |
-SLOT="0" |
112 |
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
113 |
-# Probably want to drop ssl defaulting to on in a future version. |
114 |
-IUSE="bindist debug ${HPN_PATCH:++}hpn kerberos kernel_linux ldap ldns libedit libressl livecd pam +pie sctp selinux skey ssh1 +ssl static test X X509" |
115 |
-REQUIRED_USE="ldns? ( ssl ) |
116 |
- pie? ( !static ) |
117 |
- ssh1? ( ssl ) |
118 |
- static? ( !kerberos !pam ) |
119 |
- X509? ( !ldap ssl ) |
120 |
- test? ( ssl )" |
121 |
- |
122 |
-LIB_DEPEND=" |
123 |
- ldns? ( |
124 |
- net-libs/ldns[static-libs(+)] |
125 |
- !bindist? ( net-libs/ldns[ecdsa,ssl] ) |
126 |
- bindist? ( net-libs/ldns[-ecdsa,ssl] ) |
127 |
- ) |
128 |
- libedit? ( dev-libs/libedit[static-libs(+)] ) |
129 |
- sctp? ( net-misc/lksctp-tools[static-libs(+)] ) |
130 |
- selinux? ( >=sys-libs/libselinux-1.28[static-libs(+)] ) |
131 |
- skey? ( >=sys-auth/skey-1.1.5-r1[static-libs(+)] ) |
132 |
- ssl? ( |
133 |
- !libressl? ( |
134 |
- >=dev-libs/openssl-0.9.8f:0[bindist=] |
135 |
- dev-libs/openssl:0[static-libs(+)] |
136 |
- ) |
137 |
- libressl? ( dev-libs/libressl[static-libs(+)] ) |
138 |
- ) |
139 |
- >=sys-libs/zlib-1.2.3[static-libs(+)]" |
140 |
-RDEPEND=" |
141 |
- !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) |
142 |
- pam? ( virtual/pam ) |
143 |
- kerberos? ( virtual/krb5 ) |
144 |
- ldap? ( net-nds/openldap )" |
145 |
-DEPEND="${RDEPEND} |
146 |
- static? ( ${LIB_DEPEND} ) |
147 |
- virtual/pkgconfig |
148 |
- virtual/os-headers |
149 |
- sys-devel/autoconf" |
150 |
-RDEPEND="${RDEPEND} |
151 |
- pam? ( >=sys-auth/pambase-20081028 ) |
152 |
- userland_GNU? ( virtual/shadow ) |
153 |
- X? ( x11-apps/xauth )" |
154 |
- |
155 |
-S=${WORKDIR}/${PARCH} |
156 |
- |
157 |
-pkg_pretend() { |
158 |
- # this sucks, but i'd rather have people unable to `emerge -u openssh` |
159 |
- # than not be able to log in to their server any more |
160 |
- maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; } |
161 |
- local fail=" |
162 |
- $(use X509 && maybe_fail X509 X509_PATCH) |
163 |
- $(use ldap && maybe_fail ldap LDAP_PATCH) |
164 |
- $(use hpn && maybe_fail hpn HPN_PATCH) |
165 |
- " |
166 |
- fail=$(echo ${fail}) |
167 |
- if [[ -n ${fail} ]] ; then |
168 |
- eerror "Sorry, but this version does not yet support features" |
169 |
- eerror "that you requested: ${fail}" |
170 |
- eerror "Please mask ${PF} for now and check back later:" |
171 |
- eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask" |
172 |
- die "booooo" |
173 |
- fi |
174 |
- |
175 |
- # Make sure people who are using tcp wrappers are notified of its removal. #531156 |
176 |
- if grep -qs '^ *sshd *:' "${EROOT}"/etc/hosts.{allow,deny} ; then |
177 |
- ewarn "Sorry, but openssh no longer supports tcp-wrappers, and it seems like" |
178 |
- ewarn "you're trying to use it. Update your ${EROOT}etc/hosts.{allow,deny} please." |
179 |
- fi |
180 |
-} |
181 |
- |
182 |
-save_version() { |
183 |
- # version.h patch conflict avoidence |
184 |
- mv version.h version.h.$1 |
185 |
- cp -f version.h.pristine version.h |
186 |
-} |
187 |
- |
188 |
-src_prepare() { |
189 |
- sed -i \ |
190 |
- -e "/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \ |
191 |
- pathnames.h || die |
192 |
- # keep this as we need it to avoid the conflict between LPK and HPN changing |
193 |
- # this file. |
194 |
- cp version.h version.h.pristine |
195 |
- |
196 |
- # don't break .ssh/authorized_keys2 for fun |
197 |
- sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die |
198 |
- |
199 |
- if use X509 ; then |
200 |
- pushd .. >/dev/null |
201 |
- if use hpn ; then |
202 |
- pushd "${WORKDIR}" >/dev/null |
203 |
- epatch "${FILESDIR}"/${P}-hpn-x509-9.2-glue.patch |
204 |
- popd >/dev/null |
205 |
- fi |
206 |
- epatch "${FILESDIR}"/${PN}-7.3_p1-sctp-x509-glue.patch |
207 |
- sed -i 's:PKIX_VERSION:SSH_X509:g' "${WORKDIR}"/${X509_PATCH%.*} || die |
208 |
- popd >/dev/null |
209 |
- epatch "${WORKDIR}"/${X509_PATCH%.*} |
210 |
- epatch "${FILESDIR}"/${P}-x509-9.2-warnings.patch |
211 |
- save_version X509 |
212 |
- else |
213 |
- # bug #592122, fixed by X509 patch |
214 |
- epatch "${FILESDIR}"/${P}-fix-ssh1-with-no-ssh1-host-key.patch |
215 |
- fi |
216 |
- if use ldap ; then |
217 |
- epatch "${WORKDIR}"/${LDAP_PATCH%.*} |
218 |
- save_version LPK |
219 |
- fi |
220 |
- |
221 |
- epatch "${FILESDIR}"/${PN}-7.3_p1-GSSAPI-dns.patch #165444 integrated into gsskex |
222 |
- epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch |
223 |
- epatch "${WORKDIR}"/${SCTP_PATCH%.*} |
224 |
- |
225 |
- if use hpn ; then |
226 |
- #EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \ |
227 |
- # EPATCH_MULTI_MSG="Applying HPN patchset ..." \ |
228 |
- # epatch "${WORKDIR}"/${HPN_PATCH%.*.*} |
229 |
- epatch "${WORKDIR}"/${HPN_PATCH} |
230 |
- epatch "${FILESDIR}"/${P}-hpn-cipher-ctr-mt-no-deadlocks.patch |
231 |
- save_version HPN |
232 |
- fi |
233 |
- |
234 |
- tc-export PKG_CONFIG |
235 |
- local sed_args=( |
236 |
- -e "s:-lcrypto:$(${PKG_CONFIG} --libs openssl):" |
237 |
- # Disable PATH reset, trust what portage gives us #254615 |
238 |
- -e 's:^PATH=/:#PATH=/:' |
239 |
- # Disable fortify flags ... our gcc does this for us |
240 |
- -e 's:-D_FORTIFY_SOURCE=2::' |
241 |
- ) |
242 |
- # The -ftrapv flag ICEs on hppa #505182 |
243 |
- use hppa && sed_args+=( |
244 |
- -e '/CFLAGS/s:-ftrapv:-fdisable-this-test:' |
245 |
- -e '/OSSH_CHECK_CFLAG_LINK.*-ftrapv/d' |
246 |
- ) |
247 |
- sed -i "${sed_args[@]}" configure{.ac,} || die |
248 |
- |
249 |
- # 7.3 added seccomp support to MIPS, but failed to handled the N32 |
250 |
- # case. This patch is temporary until upstream fixes. See |
251 |
- # Gentoo bug #591392 or upstream #2590. |
252 |
- [[ ${CHOST} == mips64*-linux-* && ${ABI} == "n32" ]] \ |
253 |
- && epatch "${FILESDIR}"/${PN}-7.3-mips-seccomp-n32.patch |
254 |
- |
255 |
- epatch "${FILESDIR}"/${P}-NEWKEYS_null_deref.patch # 595342 |
256 |
- epatch "${FILESDIR}"/${P}-Unregister-the-KEXINIT-handler-after-receive.patch # 597360 |
257 |
- |
258 |
- epatch_user #473004 |
259 |
- |
260 |
- # Now we can build a sane merged version.h |
261 |
- ( |
262 |
- sed '/^#define SSH_RELEASE/d' version.h.* | sort -u |
263 |
- macros=() |
264 |
- for p in HPN LPK X509 ; do [ -e version.h.${p} ] && macros+=( SSH_${p} ) ; done |
265 |
- printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}" |
266 |
- ) > version.h |
267 |
- |
268 |
- eautoreconf |
269 |
-} |
270 |
- |
271 |
-src_configure() { |
272 |
- addwrite /dev/ptmx |
273 |
- |
274 |
- use debug && append-cppflags -DSANDBOX_SECCOMP_FILTER_DEBUG |
275 |
- use static && append-ldflags -static |
276 |
- |
277 |
- local myconf=( |
278 |
- --with-ldflags="${LDFLAGS}" |
279 |
- --disable-strip |
280 |
- --with-pid-dir="${EPREFIX}"$(usex kernel_linux '' '/var')/run |
281 |
- --sysconfdir="${EPREFIX}"/etc/ssh |
282 |
- --libexecdir="${EPREFIX}"/usr/$(get_libdir)/misc |
283 |
- --datadir="${EPREFIX}"/usr/share/openssh |
284 |
- --with-privsep-path="${EPREFIX}"/var/empty |
285 |
- --with-privsep-user=sshd |
286 |
- $(use_with kerberos kerberos5 "${EPREFIX}"/usr) |
287 |
- # We apply the ldap patch conditionally, so can't pass --without-ldap |
288 |
- # unconditionally else we get unknown flag warnings. |
289 |
- $(use ldap && use_with ldap) |
290 |
- $(use_with ldns) |
291 |
- $(use_with libedit) |
292 |
- $(use_with pam) |
293 |
- $(use_with pie) |
294 |
- $(use_with sctp) |
295 |
- $(use_with selinux) |
296 |
- $(use_with skey) |
297 |
- $(use_with ssh1) |
298 |
- $(use_with ssl openssl) |
299 |
- $(use_with ssl md5-passwords) |
300 |
- $(use_with ssl ssl-engine) |
301 |
- ) |
302 |
- |
303 |
- if [[ $(tc-arch) == x86 ]]; then |
304 |
- myconf+=( --without-stackprotect) |
305 |
- fi |
306 |
- |
307 |
- # The seccomp sandbox is broken on x32, so use the older method for now. #553748 |
308 |
- use amd64 && [[ ${ABI} == "x32" ]] && myconf+=( --with-sandbox=rlimit ) |
309 |
- |
310 |
- econf "${myconf[@]}" |
311 |
-} |
312 |
- |
313 |
-src_install() { |
314 |
- emake install-nokeys DESTDIR="${D}" |
315 |
- fperms 600 /etc/ssh/sshd_config |
316 |
- dobin contrib/ssh-copy-id |
317 |
- newinitd "${FILESDIR}"/sshd.rc6.4 sshd |
318 |
- newconfd "${FILESDIR}"/sshd.confd sshd |
319 |
- keepdir /var/empty |
320 |
- |
321 |
- newpamd "${FILESDIR}"/sshd.pam_include.2 sshd |
322 |
- if use pam ; then |
323 |
- sed -i \ |
324 |
- -e "/^#UsePAM /s:.*:UsePAM yes:" \ |
325 |
- -e "/^#PasswordAuthentication /s:.*:PasswordAuthentication no:" \ |
326 |
- -e "/^#PrintMotd /s:.*:PrintMotd no:" \ |
327 |
- -e "/^#PrintLastLog /s:.*:PrintLastLog no:" \ |
328 |
- "${ED}"/etc/ssh/sshd_config || die |
329 |
- fi |
330 |
- |
331 |
- # Gentoo tweaks to default config files |
332 |
- cat <<-EOF >> "${ED}"/etc/ssh/sshd_config |
333 |
- |
334 |
- # Allow client to pass locale environment variables #367017 |
335 |
- AcceptEnv LANG LC_* |
336 |
- EOF |
337 |
- cat <<-EOF >> "${ED}"/etc/ssh/ssh_config |
338 |
- |
339 |
- # Send locale environment variables #367017 |
340 |
- SendEnv LANG LC_* |
341 |
- EOF |
342 |
- |
343 |
- if use livecd ; then |
344 |
- sed -i \ |
345 |
- -e '/^#PermitRootLogin/c# Allow root login with password on livecds.\nPermitRootLogin Yes' \ |
346 |
- "${ED}"/etc/ssh/sshd_config || die |
347 |
- fi |
348 |
- |
349 |
- if ! use X509 && [[ -n ${LDAP_PATCH} ]] && use ldap ; then |
350 |
- insinto /etc/openldap/schema/ |
351 |
- newins openssh-lpk_openldap.schema openssh-lpk.schema |
352 |
- fi |
353 |
- |
354 |
- doman contrib/ssh-copy-id.1 |
355 |
- dodoc CREDITS OVERVIEW README* TODO sshd_config |
356 |
- use X509 || dodoc ChangeLog |
357 |
- |
358 |
- diropts -m 0700 |
359 |
- dodir /etc/skel/.ssh |
360 |
- |
361 |
- systemd_dounit "${FILESDIR}"/sshd.{service,socket} |
362 |
- systemd_newunit "${FILESDIR}"/sshd_at.service 'sshd@.service' |
363 |
-} |
364 |
- |
365 |
-src_test() { |
366 |
- local t tests skipped failed passed shell |
367 |
- tests="interop-tests compat-tests" |
368 |
- skipped="" |
369 |
- shell=$(egetshell ${UID}) |
370 |
- if [[ ${shell} == */nologin ]] || [[ ${shell} == */false ]] ; then |
371 |
- elog "Running the full OpenSSH testsuite" |
372 |
- elog "requires a usable shell for the 'portage'" |
373 |
- elog "user, so we will run a subset only." |
374 |
- skipped="${skipped} tests" |
375 |
- else |
376 |
- tests="${tests} tests" |
377 |
- fi |
378 |
- # It will also attempt to write to the homedir .ssh |
379 |
- local sshhome=${T}/homedir |
380 |
- mkdir -p "${sshhome}"/.ssh |
381 |
- for t in ${tests} ; do |
382 |
- # Some tests read from stdin ... |
383 |
- HOMEDIR="${sshhome}" HOME="${sshhome}" \ |
384 |
- emake -k -j1 ${t} </dev/null \ |
385 |
- && passed="${passed}${t} " \ |
386 |
- || failed="${failed}${t} " |
387 |
- done |
388 |
- einfo "Passed tests: ${passed}" |
389 |
- ewarn "Skipped tests: ${skipped}" |
390 |
- if [[ -n ${failed} ]] ; then |
391 |
- ewarn "Failed tests: ${failed}" |
392 |
- die "Some tests failed: ${failed}" |
393 |
- else |
394 |
- einfo "Failed tests: ${failed}" |
395 |
- return 0 |
396 |
- fi |
397 |
-} |
398 |
- |
399 |
-pkg_preinst() { |
400 |
- enewgroup sshd 22 |
401 |
- enewuser sshd 22 -1 /var/empty sshd |
402 |
-} |
403 |
- |
404 |
-pkg_postinst() { |
405 |
- if has_version "<${CATEGORY}/${PN}-5.8_p1" ; then |
406 |
- elog "Starting with openssh-5.8p1, the server will default to a newer key" |
407 |
- elog "algorithm (ECDSA). You are encouraged to manually update your stored" |
408 |
- elog "keys list as servers update theirs. See ssh-keyscan(1) for more info." |
409 |
- fi |
410 |
- if has_version "<${CATEGORY}/${PN}-6.9_p1" ; then |
411 |
- elog "Starting with openssh-6.9p1, ssh1 support is disabled by default." |
412 |
- fi |
413 |
- if has_version "<${CATEGORY}/${PN}-7.0_p1" ; then |
414 |
- elog "Starting with openssh-6.7, support for USE=tcpd has been dropped by upstream." |
415 |
- elog "Make sure to update any configs that you might have. Note that xinetd might" |
416 |
- elog "be an alternative for you as it supports USE=tcpd." |
417 |
- fi |
418 |
- if has_version "<${CATEGORY}/${PN}-7.1_p1" ; then #557388 #555518 |
419 |
- elog "Starting with openssh-7.0, support for ssh-dss keys were disabled due to their" |
420 |
- elog "weak sizes. If you rely on these key types, you can re-enable the key types by" |
421 |
- elog "adding to your sshd_config or ~/.ssh/config files:" |
422 |
- elog " PubkeyAcceptedKeyTypes=+ssh-dss" |
423 |
- elog "You should however generate new keys using rsa or ed25519." |
424 |
- |
425 |
- elog "Starting with openssh-7.0, the default for PermitRootLogin changed from 'yes'" |
426 |
- elog "to 'prohibit-password'. That means password auth for root users no longer works" |
427 |
- elog "out of the box. If you need this, please update your sshd_config explicitly." |
428 |
- fi |
429 |
- if ! use ssl && has_version "${CATEGORY}/${PN}[ssl]" ; then |
430 |
- elog "Be aware that by disabling openssl support in openssh, the server and clients" |
431 |
- elog "no longer support dss/rsa/ecdsa keys. You will need to generate ed25519 keys" |
432 |
- elog "and update all clients/servers that utilize them." |
433 |
- fi |
434 |
-} |
435 |
|
436 |
diff --git a/net-misc/openssh/openssh-7.5_p1-r1.ebuild b/net-misc/openssh/openssh-7.5_p1-r3.ebuild |
437 |
similarity index 97% |
438 |
rename from net-misc/openssh/openssh-7.5_p1-r1.ebuild |
439 |
rename to net-misc/openssh/openssh-7.5_p1-r3.ebuild |
440 |
index b35db78..e3d5da9 100644 |
441 |
--- a/net-misc/openssh/openssh-7.5_p1-r1.ebuild |
442 |
+++ b/net-misc/openssh/openssh-7.5_p1-r3.ebuild |
443 |
@@ -12,7 +12,7 @@ PARCH=${P/_} |
444 |
HPN_PATCH="${PARCH}-hpnssh14v12.tar.xz" |
445 |
SCTP_PATCH="${PN}-7.4_p1-sctp.patch.xz" |
446 |
LDAP_PATCH="${PN}-lpk-7.5p1-0.3.14.patch.xz" |
447 |
-X509_VER="10.1" X509_PATCH="${PN}-${PV/_}+x509-${X509_VER}.diff.gz" |
448 |
+X509_VER="10.2" X509_PATCH="${PN}-${PV/_}+x509-${X509_VER}.diff.gz" |
449 |
|
450 |
DESCRIPTION="Port of OpenBSD's free SSH release" |
451 |
HOMEPAGE="http://www.openssh.org/" |
452 |
@@ -121,7 +121,6 @@ src_prepare() { |
453 |
fi |
454 |
save_version X509 |
455 |
epatch "${WORKDIR}"/${X509_PATCH%.*} |
456 |
- use libressl && epatch "${FILESDIR}"/${PN}-7.5p1-x509-libressl.patch |
457 |
fi |
458 |
|
459 |
if use ldap ; then |
460 |
@@ -132,6 +131,7 @@ src_prepare() { |
461 |
epatch "${FILESDIR}"/${PN}-7.5_p1-GSSAPI-dns.patch #165444 integrated into gsskex |
462 |
epatch "${FILESDIR}"/${PN}-6.7_p1-openssl-ignore-status.patch |
463 |
epatch "${FILESDIR}"/${PN}-7.5_p1-cross-cache.patch |
464 |
+ epatch "${FILESDIR}"/${PN}-7.5_p1-CVE-2017-15906.patch |
465 |
use X509 || epatch "${WORKDIR}"/${SCTP_PATCH%.*} |
466 |
use X509 || epatch "${FILESDIR}"/${PN}-7.5_p1-x32-typo.patch |
467 |
use abi_mips_n32 && epatch "${FILESDIR}"/${PN}-7.3-mips-seccomp-n32.patch |
468 |
@@ -168,8 +168,8 @@ src_prepare() { |
469 |
( |
470 |
sed '/^#define SSH_RELEASE/d' version.h.* | sort -u |
471 |
macros=() |
472 |
- for p in HPN LPK X509 ; do [[ -e version.h.${p} ]] && macros+=( SSH_${p} ) ; done |
473 |
- printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros}" |
474 |
+ for p in HPN LPK X509; do [[ -e version.h.${p} ]] && macros+=( SSH_${p} ) ; done |
475 |
+ printf '#define SSH_RELEASE SSH_VERSION SSH_PORTABLE %s\n' "${macros[*]}" |
476 |
) > version.h |
477 |
|
478 |
eautoreconf |