diff options
author | Colin Watson <cjwatson@debian.org> | 2010-03-31 10:46:28 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2010-03-31 10:46:28 +0100 |
commit | efd3d4522636ae029488c2e9730b60c88e257d2e (patch) | |
tree | 31e02ac3f16090ce8c53448677356b2b7f423683 /debian | |
parent | bbec4db36d464ea1d464a707625125f9fd5c7b5e (diff) | |
parent | d1a87e462e1db89f19cd960588d0c6b287cb5ccc (diff) |
* New upstream release (LP: #535029).
- After a transition period of about 10 years, this release disables SSH
protocol 1 by default. Clients and servers that need to use the
legacy protocol must explicitly enable it in ssh_config / sshd_config
or on the command-line.
- Remove the libsectok/OpenSC-based smartcard code and add support for
PKCS#11 tokens. This support is enabled by default in the Debian
packaging, since it now doesn't involve additional library
dependencies (closes: #231472, LP: #16918).
- Add support for certificate authentication of users and hosts using a
new, minimal OpenSSH certificate format (closes: #482806).
- Added a 'netcat mode' to ssh(1): "ssh -W host:port ...".
- Add the ability to revoke keys in sshd(8) and ssh(1). (For the Debian
package, this overlaps with the key blacklisting facility added in
openssh 1:4.7p1-9, but with different file formats and slightly
different scopes; for the moment, I've roughly merged the two.)
- Various multiplexing improvements, including support for requesting
port-forwardings via the multiplex protocol (closes: #360151).
- Allow setting an explicit umask on the sftp-server(8) commandline to
override whatever default the user has (closes: #496843).
- Many sftp client improvements, including tab-completion, more options,
and recursive transfer support for get/put (LP: #33378). The old
mget/mput commands never worked properly and have been removed
(closes: #270399, #428082).
- Do not prompt for a passphrase if we fail to open a keyfile, and log
the reason why the open failed to debug (closes: #431538).
- Prevent sftp from crashing when given a "-" without a command. Also,
allow whitespace to follow a "-" (closes: #531561).
Diffstat (limited to 'debian')
32 files changed, 305 insertions, 1063 deletions
diff --git a/debian/changelog b/debian/changelog index d349e6ef9..e792fc91b 100644 --- a/debian/changelog +++ b/debian/changelog | |||
@@ -1,4 +1,33 @@ | |||
1 | openssh (1:5.3p1-4) UNRELEASED; urgency=low | 1 | openssh (1:5.4p1-1) UNRELEASED; urgency=low |
2 | |||
3 | * New upstream release (LP: #535029). | ||
4 | - After a transition period of about 10 years, this release disables SSH | ||
5 | protocol 1 by default. Clients and servers that need to use the | ||
6 | legacy protocol must explicitly enable it in ssh_config / sshd_config | ||
7 | or on the command-line. | ||
8 | - Remove the libsectok/OpenSC-based smartcard code and add support for | ||
9 | PKCS#11 tokens. This support is enabled by default in the Debian | ||
10 | packaging, since it now doesn't involve additional library | ||
11 | dependencies (closes: #231472, LP: #16918). | ||
12 | - Add support for certificate authentication of users and hosts using a | ||
13 | new, minimal OpenSSH certificate format (closes: #482806). | ||
14 | - Added a 'netcat mode' to ssh(1): "ssh -W host:port ...". | ||
15 | - Add the ability to revoke keys in sshd(8) and ssh(1). (For the Debian | ||
16 | package, this overlaps with the key blacklisting facility added in | ||
17 | openssh 1:4.7p1-9, but with different file formats and slightly | ||
18 | different scopes; for the moment, I've roughly merged the two.) | ||
19 | - Various multiplexing improvements, including support for requesting | ||
20 | port-forwardings via the multiplex protocol (closes: #360151). | ||
21 | - Allow setting an explicit umask on the sftp-server(8) commandline to | ||
22 | override whatever default the user has (closes: #496843). | ||
23 | - Many sftp client improvements, including tab-completion, more options, | ||
24 | and recursive transfer support for get/put (LP: #33378). The old | ||
25 | mget/mput commands never worked properly and have been removed | ||
26 | (closes: #270399, #428082). | ||
27 | - Do not prompt for a passphrase if we fail to open a keyfile, and log | ||
28 | the reason why the open failed to debug (closes: #431538). | ||
29 | - Prevent sftp from crashing when given a "-" without a command. Also, | ||
30 | allow whitespace to follow a "-" (closes: #531561). | ||
2 | 31 | ||
3 | * Fix 'debian/rules quilt-setup' to avoid writing .orig files if some | 32 | * Fix 'debian/rules quilt-setup' to avoid writing .orig files if some |
4 | patches apply with offsets. | 33 | patches apply with offsets. |
diff --git a/debian/patches/authorized-keys-man-symlink.patch b/debian/patches/authorized-keys-man-symlink.patch index 34535f001..32b1dcc72 100644 --- a/debian/patches/authorized-keys-man-symlink.patch +++ b/debian/patches/authorized-keys-man-symlink.patch | |||
@@ -8,7 +8,7 @@ Index: b/Makefile.in | |||
8 | =================================================================== | 8 | =================================================================== |
9 | --- a/Makefile.in | 9 | --- a/Makefile.in |
10 | +++ b/Makefile.in | 10 | +++ b/Makefile.in |
11 | @@ -284,6 +284,7 @@ | 11 | @@ -285,6 +285,7 @@ |
12 | $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 | 12 | $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 |
13 | $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 | 13 | $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 |
14 | $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 | 14 | $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 |
diff --git a/debian/patches/banner-noslash.patch b/debian/patches/banner-noslash.patch deleted file mode 100644 index fa7b08f23..000000000 --- a/debian/patches/banner-noslash.patch +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | Description: Don't duplicate backslashes when displaying server banner | ||
2 | Origin: vendor, http://bugs.gentoo.org/show_bug.cgi?id=244222 | ||
3 | Author: Michał Górny <gentoo@mgorny.alt.pl> | ||
4 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1533 | ||
5 | Bug-Debian: http://bugs.debian.org/505378 | ||
6 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/425346 | ||
7 | Bug-Gentoo: http://bugs.gentoo.org/show_bug.cgi?id=244222 | ||
8 | Last-Update: 2010-02-27 | ||
9 | |||
10 | Index: b/sshconnect2.c | ||
11 | =================================================================== | ||
12 | --- a/sshconnect2.c | ||
13 | +++ b/sshconnect2.c | ||
14 | @@ -472,7 +472,7 @@ | ||
15 | if (len > 65536) | ||
16 | len = 65536; | ||
17 | msg = xmalloc(len * 4 + 1); /* max expansion from strnvis() */ | ||
18 | - strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL); | ||
19 | + strnvis(msg, raw, len * 4 + 1, VIS_SAFE|VIS_OCTAL|VIS_NOSLASH); | ||
20 | fprintf(stderr, "%s", msg); | ||
21 | xfree(msg); | ||
22 | } | ||
diff --git a/debian/patches/config-guess-sub.patch b/debian/patches/config-guess-sub.patch deleted file mode 100644 index aabe99b9e..000000000 --- a/debian/patches/config-guess-sub.patch +++ /dev/null | |||
@@ -1,387 +0,0 @@ | |||
1 | Description: Update config.guess and config.sub from autotools-dev 20090611.1 | ||
2 | From: Bradley Smith <bradsmith@debian.org> | ||
3 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1722 | ||
4 | Bug-Debian: http://bugs.debian.org/538301 | ||
5 | Last-Update: 2010-03-01 | ||
6 | |||
7 | Index: b/config.guess | ||
8 | =================================================================== | ||
9 | --- a/config.guess | ||
10 | +++ b/config.guess | ||
11 | @@ -1,10 +1,10 @@ | ||
12 | #! /bin/sh | ||
13 | # Attempt to guess a canonical system name. | ||
14 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | ||
15 | -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 | ||
16 | +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | ||
17 | # Free Software Foundation, Inc. | ||
18 | |||
19 | -timestamp='2008-04-14' | ||
20 | +timestamp='2009-06-10' | ||
21 | |||
22 | # This file is free software; you can redistribute it and/or modify it | ||
23 | # under the terms of the GNU General Public License as published by | ||
24 | @@ -170,7 +170,7 @@ | ||
25 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) | ||
26 | eval $set_cc_for_build | ||
27 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | ||
28 | - | grep __ELF__ >/dev/null | ||
29 | + | grep -q __ELF__ | ||
30 | then | ||
31 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | ||
32 | # Return netbsd for either. FIX? | ||
33 | @@ -324,6 +324,9 @@ | ||
34 | case `/usr/bin/uname -p` in | ||
35 | sparc) echo sparc-icl-nx7; exit ;; | ||
36 | esac ;; | ||
37 | + s390x:SunOS:*:*) | ||
38 | + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
39 | + exit ;; | ||
40 | sun4H:SunOS:5.*:*) | ||
41 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
42 | exit ;; | ||
43 | @@ -331,7 +334,20 @@ | ||
44 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
45 | exit ;; | ||
46 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) | ||
47 | - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
48 | + eval $set_cc_for_build | ||
49 | + SUN_ARCH="i386" | ||
50 | + # If there is a compiler, see if it is configured for 64-bit objects. | ||
51 | + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. | ||
52 | + # This test works for both compilers. | ||
53 | + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | ||
54 | + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ | ||
55 | + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | ||
56 | + grep IS_64BIT_ARCH >/dev/null | ||
57 | + then | ||
58 | + SUN_ARCH="x86_64" | ||
59 | + fi | ||
60 | + fi | ||
61 | + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
62 | exit ;; | ||
63 | sun4*:SunOS:6*:*) | ||
64 | # According to config.sub, this is the proper way to canonicalize | ||
65 | @@ -640,7 +656,7 @@ | ||
66 | # => hppa64-hp-hpux11.23 | ||
67 | |||
68 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | | ||
69 | - grep __LP64__ >/dev/null | ||
70 | + grep -q __LP64__ | ||
71 | then | ||
72 | HP_ARCH="hppa2.0w" | ||
73 | else | ||
74 | @@ -796,7 +812,7 @@ | ||
75 | x86) | ||
76 | echo i586-pc-interix${UNAME_RELEASE} | ||
77 | exit ;; | ||
78 | - EM64T | authenticamd) | ||
79 | + EM64T | authenticamd | genuineintel) | ||
80 | echo x86_64-unknown-interix${UNAME_RELEASE} | ||
81 | exit ;; | ||
82 | IA64) | ||
83 | @@ -806,6 +822,9 @@ | ||
84 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | ||
85 | echo i${UNAME_MACHINE}-pc-mks | ||
86 | exit ;; | ||
87 | + 8664:Windows_NT:*) | ||
88 | + echo x86_64-pc-mks | ||
89 | + exit ;; | ||
90 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | ||
91 | # How do we know it's Interix rather than the generic POSIX subsystem? | ||
92 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | ||
93 | @@ -866,40 +885,17 @@ | ||
94 | m68*:Linux:*:*) | ||
95 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
96 | exit ;; | ||
97 | - mips:Linux:*:*) | ||
98 | + mips:Linux:*:* | mips64:Linux:*:*) | ||
99 | eval $set_cc_for_build | ||
100 | sed 's/^ //' << EOF >$dummy.c | ||
101 | #undef CPU | ||
102 | - #undef mips | ||
103 | - #undef mipsel | ||
104 | + #undef ${UNAME_MACHINE} | ||
105 | + #undef ${UNAME_MACHINE}el | ||
106 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
107 | - CPU=mipsel | ||
108 | + CPU=${UNAME_MACHINE}el | ||
109 | #else | ||
110 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
111 | - CPU=mips | ||
112 | - #else | ||
113 | - CPU= | ||
114 | - #endif | ||
115 | - #endif | ||
116 | -EOF | ||
117 | - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | ||
118 | - /^CPU/{ | ||
119 | - s: ::g | ||
120 | - p | ||
121 | - }'`" | ||
122 | - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } | ||
123 | - ;; | ||
124 | - mips64:Linux:*:*) | ||
125 | - eval $set_cc_for_build | ||
126 | - sed 's/^ //' << EOF >$dummy.c | ||
127 | - #undef CPU | ||
128 | - #undef mips64 | ||
129 | - #undef mips64el | ||
130 | - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
131 | - CPU=mips64el | ||
132 | - #else | ||
133 | - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
134 | - CPU=mips64 | ||
135 | + CPU=${UNAME_MACHINE} | ||
136 | #else | ||
137 | CPU= | ||
138 | #endif | ||
139 | @@ -931,10 +927,13 @@ | ||
140 | EV67) UNAME_MACHINE=alphaev67 ;; | ||
141 | EV68*) UNAME_MACHINE=alphaev68 ;; | ||
142 | esac | ||
143 | - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null | ||
144 | + objdump --private-headers /bin/sh | grep -q ld.so.1 | ||
145 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | ||
146 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | ||
147 | exit ;; | ||
148 | + padre:Linux:*:*) | ||
149 | + echo sparc-unknown-linux-gnu | ||
150 | + exit ;; | ||
151 | parisc:Linux:*:* | hppa:Linux:*:*) | ||
152 | # Look for CPU level | ||
153 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | ||
154 | @@ -982,14 +981,6 @@ | ||
155 | elf32-i386) | ||
156 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" | ||
157 | ;; | ||
158 | - a.out-i386-linux) | ||
159 | - echo "${UNAME_MACHINE}-pc-linux-gnuaout" | ||
160 | - exit ;; | ||
161 | - "") | ||
162 | - # Either a pre-BFD a.out linker (linux-gnuoldld) or | ||
163 | - # one that does not give us useful --help. | ||
164 | - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" | ||
165 | - exit ;; | ||
166 | esac | ||
167 | # Determine whether the default compiler is a.out or elf | ||
168 | eval $set_cc_for_build | ||
169 | @@ -1055,7 +1046,7 @@ | ||
170 | i*86:syllable:*:*) | ||
171 | echo ${UNAME_MACHINE}-pc-syllable | ||
172 | exit ;; | ||
173 | - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) | ||
174 | + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) | ||
175 | echo i386-unknown-lynxos${UNAME_RELEASE} | ||
176 | exit ;; | ||
177 | i*86:*DOS:*:*) | ||
178 | @@ -1099,8 +1090,11 @@ | ||
179 | pc:*:*:*) | ||
180 | # Left here for compatibility: | ||
181 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | ||
182 | - # the processor, so we play safe by assuming i386. | ||
183 | - echo i386-pc-msdosdjgpp | ||
184 | + # the processor, so we play safe by assuming i586. | ||
185 | + # Note: whatever this is, it MUST be the same as what config.sub | ||
186 | + # prints for the "djgpp" host, or else GDB configury will decide that | ||
187 | + # this is a cross-build. | ||
188 | + echo i586-pc-msdosdjgpp | ||
189 | exit ;; | ||
190 | Intel:Mach:3*:*) | ||
191 | echo i386-pc-mach3 | ||
192 | @@ -1138,6 +1132,16 @@ | ||
193 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | ||
194 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | ||
195 | && { echo i486-ncr-sysv4; exit; } ;; | ||
196 | + NCR*:*:4.2:* | MPRAS*:*:4.2:*) | ||
197 | + OS_REL='.3' | ||
198 | + test -r /etc/.relid \ | ||
199 | + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | ||
200 | + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | ||
201 | + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } | ||
202 | + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | ||
203 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } | ||
204 | + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ | ||
205 | + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; | ||
206 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | ||
207 | echo m68k-unknown-lynxos${UNAME_RELEASE} | ||
208 | exit ;; | ||
209 | @@ -1150,7 +1154,7 @@ | ||
210 | rs6000:LynxOS:2.*:*) | ||
211 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | ||
212 | exit ;; | ||
213 | - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) | ||
214 | + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) | ||
215 | echo powerpc-unknown-lynxos${UNAME_RELEASE} | ||
216 | exit ;; | ||
217 | SM[BE]S:UNIX_SV:*:*) | ||
218 | @@ -1324,6 +1328,9 @@ | ||
219 | i*86:rdos:*:*) | ||
220 | echo ${UNAME_MACHINE}-pc-rdos | ||
221 | exit ;; | ||
222 | + i*86:AROS:*:*) | ||
223 | + echo ${UNAME_MACHINE}-pc-aros | ||
224 | + exit ;; | ||
225 | esac | ||
226 | |||
227 | #echo '(No uname command or uname output not recognized.)' 1>&2 | ||
228 | Index: b/config.sub | ||
229 | =================================================================== | ||
230 | --- a/config.sub | ||
231 | +++ b/config.sub | ||
232 | @@ -1,10 +1,10 @@ | ||
233 | #! /bin/sh | ||
234 | # Configuration validation subroutine script. | ||
235 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | ||
236 | -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 | ||
237 | +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | ||
238 | # Free Software Foundation, Inc. | ||
239 | |||
240 | -timestamp='2008-06-16' | ||
241 | +timestamp='2009-06-11' | ||
242 | |||
243 | # This file is (in principle) common to ALL GNU software. | ||
244 | # The presence of a machine in this file suggests that SOME GNU software | ||
245 | @@ -122,6 +122,7 @@ | ||
246 | case $maybe_os in | ||
247 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ | ||
248 | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ | ||
249 | + kopensolaris*-gnu* | \ | ||
250 | storm-chaos* | os2-emx* | rtmk-nova*) | ||
251 | os=-$maybe_os | ||
252 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | ||
253 | @@ -152,6 +153,9 @@ | ||
254 | os= | ||
255 | basic_machine=$1 | ||
256 | ;; | ||
257 | + -bluegene*) | ||
258 | + os=-cnk | ||
259 | + ;; | ||
260 | -sim | -cisco | -oki | -wec | -winbond) | ||
261 | os= | ||
262 | basic_machine=$1 | ||
263 | @@ -249,6 +253,7 @@ | ||
264 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | ||
265 | | i370 | i860 | i960 | ia64 \ | ||
266 | | ip2k | iq2000 \ | ||
267 | + | lm32 \ | ||
268 | | m32c | m32r | m32rle | m68000 | m68k | m88k \ | ||
269 | | maxq | mb | microblaze | mcore | mep | metag \ | ||
270 | | mips | mipsbe | mipseb | mipsel | mipsle \ | ||
271 | @@ -270,6 +275,7 @@ | ||
272 | | mipsisa64sr71k | mipsisa64sr71kel \ | ||
273 | | mipstx39 | mipstx39el \ | ||
274 | | mn10200 | mn10300 \ | ||
275 | + | moxie \ | ||
276 | | mt \ | ||
277 | | msp430 \ | ||
278 | | nios | nios2 \ | ||
279 | @@ -279,7 +285,7 @@ | ||
280 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | ||
281 | | pyramid \ | ||
282 | | score \ | ||
283 | - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | ||
284 | + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | ||
285 | | sh64 | sh64le \ | ||
286 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | ||
287 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | ||
288 | @@ -288,7 +294,7 @@ | ||
289 | | v850 | v850e \ | ||
290 | | we32k \ | ||
291 | | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | ||
292 | - | z8k) | ||
293 | + | z8k | z80) | ||
294 | basic_machine=$basic_machine-unknown | ||
295 | ;; | ||
296 | m6811 | m68hc11 | m6812 | m68hc12) | ||
297 | @@ -331,6 +337,7 @@ | ||
298 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | ||
299 | | i*86-* | i860-* | i960-* | ia64-* \ | ||
300 | | ip2k-* | iq2000-* \ | ||
301 | + | lm32-* \ | ||
302 | | m32c-* | m32r-* | m32rle-* \ | ||
303 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | ||
304 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | ||
305 | @@ -362,7 +369,7 @@ | ||
306 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | ||
307 | | pyramid-* \ | ||
308 | | romp-* | rs6000-* \ | ||
309 | - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | ||
310 | + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | ||
311 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | ||
312 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | ||
313 | | sparclite-* \ | ||
314 | @@ -375,7 +382,7 @@ | ||
315 | | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | ||
316 | | xstormy16-* | xtensa*-* \ | ||
317 | | ymp-* \ | ||
318 | - | z8k-*) | ||
319 | + | z8k-* | z80-*) | ||
320 | ;; | ||
321 | # Recognize the basic CPU types without company name, with glob match. | ||
322 | xtensa*) | ||
323 | @@ -443,6 +450,10 @@ | ||
324 | basic_machine=m68k-apollo | ||
325 | os=-bsd | ||
326 | ;; | ||
327 | + aros) | ||
328 | + basic_machine=i386-pc | ||
329 | + os=-aros | ||
330 | + ;; | ||
331 | aux) | ||
332 | basic_machine=m68k-apple | ||
333 | os=-aux | ||
334 | @@ -459,6 +470,10 @@ | ||
335 | basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
336 | os=-linux | ||
337 | ;; | ||
338 | + bluegene*) | ||
339 | + basic_machine=powerpc-ibm | ||
340 | + os=-cnk | ||
341 | + ;; | ||
342 | c90) | ||
343 | basic_machine=c90-cray | ||
344 | os=-unicos | ||
345 | @@ -1140,6 +1155,10 @@ | ||
346 | basic_machine=z8k-unknown | ||
347 | os=-sim | ||
348 | ;; | ||
349 | + z80-*-coff) | ||
350 | + basic_machine=z80-unknown | ||
351 | + os=-sim | ||
352 | + ;; | ||
353 | none) | ||
354 | basic_machine=none-none | ||
355 | os=-none | ||
356 | @@ -1178,7 +1197,7 @@ | ||
357 | we32k) | ||
358 | basic_machine=we32k-att | ||
359 | ;; | ||
360 | - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) | ||
361 | + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) | ||
362 | basic_machine=sh-unknown | ||
363 | ;; | ||
364 | sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) | ||
365 | @@ -1248,10 +1267,11 @@ | ||
366 | # Each alternative MUST END IN A *, to match a version number. | ||
367 | # -sysv* is not here because it comes later, after sysvr4. | ||
368 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | ||
369 | - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | ||
370 | + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | ||
371 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | ||
372 | + | -kopensolaris* \ | ||
373 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | ||
374 | - | -aos* \ | ||
375 | + | -aos* | -aros* \ | ||
376 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | ||
377 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | ||
378 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | ||
379 | @@ -1600,7 +1620,7 @@ | ||
380 | -sunos*) | ||
381 | vendor=sun | ||
382 | ;; | ||
383 | - -aix*) | ||
384 | + -cnk*|-aix*) | ||
385 | vendor=ibm | ||
386 | ;; | ||
387 | -beos*) | ||
diff --git a/debian/patches/debian-banner.patch b/debian/patches/debian-banner.patch index a9b38e281..c0567f264 100644 --- a/debian/patches/debian-banner.patch +++ b/debian/patches/debian-banner.patch | |||
@@ -10,15 +10,15 @@ Index: b/servconf.c | |||
10 | =================================================================== | 10 | =================================================================== |
11 | --- a/servconf.c | 11 | --- a/servconf.c |
12 | +++ b/servconf.c | 12 | +++ b/servconf.c |
13 | @@ -132,6 +132,7 @@ | 13 | @@ -135,6 +135,7 @@ |
14 | options->adm_forced_command = NULL; | ||
15 | options->chroot_directory = NULL; | ||
16 | options->zero_knowledge_password_authentication = -1; | 14 | options->zero_knowledge_password_authentication = -1; |
15 | options->revoked_keys_file = NULL; | ||
16 | options->trusted_user_ca_keys = NULL; | ||
17 | + options->debian_banner = -1; | 17 | + options->debian_banner = -1; |
18 | } | 18 | } |
19 | 19 | ||
20 | void | 20 | void |
21 | @@ -273,6 +274,8 @@ | 21 | @@ -277,6 +278,8 @@ |
22 | options->permit_tun = SSH_TUNMODE_NO; | 22 | options->permit_tun = SSH_TUNMODE_NO; |
23 | if (options->zero_knowledge_password_authentication == -1) | 23 | if (options->zero_knowledge_password_authentication == -1) |
24 | options->zero_knowledge_password_authentication = 0; | 24 | options->zero_knowledge_password_authentication = 0; |
@@ -27,25 +27,25 @@ Index: b/servconf.c | |||
27 | 27 | ||
28 | /* Turn privilege separation on by default */ | 28 | /* Turn privilege separation on by default */ |
29 | if (use_privsep == -1) | 29 | if (use_privsep == -1) |
30 | @@ -320,6 +323,7 @@ | 30 | @@ -325,6 +328,7 @@ |
31 | sMatch, sPermitOpen, sForceCommand, sChrootDirectory, | ||
32 | sUsePrivilegeSeparation, sAllowAgentForwarding, | 31 | sUsePrivilegeSeparation, sAllowAgentForwarding, |
33 | sZeroKnowledgePasswordAuthentication, | 32 | sZeroKnowledgePasswordAuthentication, sHostCertificate, |
33 | sRevokedKeys, sTrustedUserCAKeys, | ||
34 | + sDebianBanner, | 34 | + sDebianBanner, |
35 | sDeprecated, sUnsupported | 35 | sDeprecated, sUnsupported |
36 | } ServerOpCodes; | 36 | } ServerOpCodes; |
37 | 37 | ||
38 | @@ -449,6 +453,7 @@ | 38 | @@ -457,6 +461,7 @@ |
39 | { "permitopen", sPermitOpen, SSHCFG_ALL }, | 39 | { "hostcertificate", sHostCertificate, SSHCFG_GLOBAL }, |
40 | { "forcecommand", sForceCommand, SSHCFG_ALL }, | 40 | { "revokedkeys", sRevokedKeys, SSHCFG_ALL }, |
41 | { "chrootdirectory", sChrootDirectory, SSHCFG_ALL }, | 41 | { "trustedusercakeys", sTrustedUserCAKeys, SSHCFG_ALL }, |
42 | + { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, | 42 | + { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, |
43 | { NULL, sBadOption, 0 } | 43 | { NULL, sBadOption, 0 } |
44 | }; | 44 | }; |
45 | 45 | ||
46 | @@ -1335,6 +1340,10 @@ | 46 | @@ -1377,6 +1382,10 @@ |
47 | *charptr = xstrdup(arg); | 47 | charptr = &options->revoked_keys_file; |
48 | break; | 48 | goto parse_filename; |
49 | 49 | ||
50 | + case sDebianBanner: | 50 | + case sDebianBanner: |
51 | + intptr = &options->debian_banner; | 51 | + intptr = &options->debian_banner; |
@@ -58,20 +58,20 @@ Index: b/servconf.h | |||
58 | =================================================================== | 58 | =================================================================== |
59 | --- a/servconf.h | 59 | --- a/servconf.h |
60 | +++ b/servconf.h | 60 | +++ b/servconf.h |
61 | @@ -154,6 +154,8 @@ | 61 | @@ -157,6 +157,8 @@ |
62 | 62 | ||
63 | int num_permitted_opens; | 63 | int num_permitted_opens; |
64 | 64 | ||
65 | + int debian_banner; | 65 | + int debian_banner; |
66 | + | 66 | + |
67 | char *chroot_directory; | 67 | char *chroot_directory; |
68 | } ServerOptions; | 68 | char *revoked_keys_file; |
69 | 69 | char *trusted_user_ca_keys; | |
70 | Index: b/sshd.c | 70 | Index: b/sshd.c |
71 | =================================================================== | 71 | =================================================================== |
72 | --- a/sshd.c | 72 | --- a/sshd.c |
73 | +++ b/sshd.c | 73 | +++ b/sshd.c |
74 | @@ -426,7 +426,8 @@ | 74 | @@ -422,7 +422,8 @@ |
75 | minor = PROTOCOL_MINOR_1; | 75 | minor = PROTOCOL_MINOR_1; |
76 | } | 76 | } |
77 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, | 77 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, |
diff --git a/debian/patches/debian-config.patch b/debian/patches/debian-config.patch index 3c8bbb0a4..a395d43a0 100644 --- a/debian/patches/debian-config.patch +++ b/debian/patches/debian-config.patch | |||
@@ -24,7 +24,7 @@ Index: b/readconf.c | |||
24 | =================================================================== | 24 | =================================================================== |
25 | --- a/readconf.c | 25 | --- a/readconf.c |
26 | +++ b/readconf.c | 26 | +++ b/readconf.c |
27 | @@ -1150,7 +1150,7 @@ | 27 | @@ -1152,7 +1152,7 @@ |
28 | if (options->forward_x11 == -1) | 28 | if (options->forward_x11 == -1) |
29 | options->forward_x11 = 0; | 29 | options->forward_x11 = 0; |
30 | if (options->forward_x11_trusted == -1) | 30 | if (options->forward_x11_trusted == -1) |
@@ -49,10 +49,10 @@ Index: b/ssh_config | |||
49 | # RhostsRSAAuthentication no | 49 | # RhostsRSAAuthentication no |
50 | # RSAAuthentication yes | 50 | # RSAAuthentication yes |
51 | # PasswordAuthentication yes | 51 | # PasswordAuthentication yes |
52 | @@ -46,3 +47,7 @@ | 52 | @@ -47,3 +48,7 @@ |
53 | # TunnelDevice any:any | ||
54 | # PermitLocalCommand no | 53 | # PermitLocalCommand no |
55 | # VisualHostKey no | 54 | # VisualHostKey no |
55 | # ProxyCommand ssh -q -W %h:%p gateway.example.com | ||
56 | + SendEnv LANG LC_* | 56 | + SendEnv LANG LC_* |
57 | + HashKnownHosts yes | 57 | + HashKnownHosts yes |
58 | + GSSAPIAuthentication yes | 58 | + GSSAPIAuthentication yes |
@@ -98,7 +98,7 @@ Index: b/sshd_config | |||
98 | =================================================================== | 98 | =================================================================== |
99 | --- a/sshd_config | 99 | --- a/sshd_config |
100 | +++ b/sshd_config | 100 | +++ b/sshd_config |
101 | @@ -38,6 +38,7 @@ | 101 | @@ -36,6 +36,7 @@ |
102 | # Authentication: | 102 | # Authentication: |
103 | 103 | ||
104 | #LoginGraceTime 2m | 104 | #LoginGraceTime 2m |
diff --git a/debian/patches/doc-connection-sharing.patch b/debian/patches/doc-connection-sharing.patch index b53e95d34..759f86b30 100644 --- a/debian/patches/doc-connection-sharing.patch +++ b/debian/patches/doc-connection-sharing.patch | |||
@@ -9,7 +9,7 @@ Index: b/ssh.1 | |||
9 | =================================================================== | 9 | =================================================================== |
10 | --- a/ssh.1 | 10 | --- a/ssh.1 |
11 | +++ b/ssh.1 | 11 | +++ b/ssh.1 |
12 | @@ -559,7 +559,10 @@ | 12 | @@ -563,7 +563,10 @@ |
13 | the listen port will be dynamically allocated on the server and reported | 13 | the listen port will be dynamically allocated on the server and reported |
14 | to the client at run time. | 14 | to the client at run time. |
15 | .It Fl S Ar ctl_path | 15 | .It Fl S Ar ctl_path |
diff --git a/debian/patches/gnome-ssh-askpass2-icon.patch b/debian/patches/gnome-ssh-askpass2-icon.patch index 400415511..96bbf3a09 100644 --- a/debian/patches/gnome-ssh-askpass2-icon.patch +++ b/debian/patches/gnome-ssh-askpass2-icon.patch | |||
@@ -7,7 +7,7 @@ Index: b/contrib/gnome-ssh-askpass2.c | |||
7 | =================================================================== | 7 | =================================================================== |
8 | --- a/contrib/gnome-ssh-askpass2.c | 8 | --- a/contrib/gnome-ssh-askpass2.c |
9 | +++ b/contrib/gnome-ssh-askpass2.c | 9 | +++ b/contrib/gnome-ssh-askpass2.c |
10 | @@ -207,6 +207,8 @@ | 10 | @@ -209,6 +209,8 @@ |
11 | 11 | ||
12 | gtk_init(&argc, &argv); | 12 | gtk_init(&argc, &argv); |
13 | 13 | ||
diff --git a/debian/patches/gssapi-autoconf.patch b/debian/patches/gssapi-autoconf.patch index 0ae7d0129..5ef959de7 100644 --- a/debian/patches/gssapi-autoconf.patch +++ b/debian/patches/gssapi-autoconf.patch | |||
@@ -7,7 +7,7 @@ Index: b/config.h.in | |||
7 | =================================================================== | 7 | =================================================================== |
8 | --- a/config.h.in | 8 | --- a/config.h.in |
9 | +++ b/config.h.in | 9 | +++ b/config.h.in |
10 | @@ -1372,6 +1372,9 @@ | 10 | @@ -1378,6 +1378,9 @@ |
11 | /* Use btmp to log bad logins */ | 11 | /* Use btmp to log bad logins */ |
12 | #undef USE_BTMP | 12 | #undef USE_BTMP |
13 | 13 | ||
@@ -18,8 +18,8 @@ Index: b/config.h.in | |||
18 | #undef USE_LIBEDIT | 18 | #undef USE_LIBEDIT |
19 | 19 | ||
20 | @@ -1390,6 +1393,9 @@ | 20 | @@ -1390,6 +1393,9 @@ |
21 | /* Define if you want smartcard support using sectok */ | 21 | /* Use PIPES instead of a socketpair() */ |
22 | #undef USE_SECTOK | 22 | #undef USE_PIPES |
23 | 23 | ||
24 | +/* platform has the Security Authorization Session API */ | 24 | +/* platform has the Security Authorization Session API */ |
25 | +#undef USE_SECURITY_SESSION_API | 25 | +#undef USE_SECURITY_SESSION_API |
diff --git a/debian/patches/gssapi-compat.patch b/debian/patches/gssapi-compat.patch index b97ce9afd..369a23360 100644 --- a/debian/patches/gssapi-compat.patch +++ b/debian/patches/gssapi-compat.patch | |||
@@ -10,7 +10,7 @@ Index: b/servconf.c | |||
10 | =================================================================== | 10 | =================================================================== |
11 | --- a/servconf.c | 11 | --- a/servconf.c |
12 | +++ b/servconf.c | 12 | +++ b/servconf.c |
13 | @@ -375,16 +375,20 @@ | 13 | @@ -380,16 +380,20 @@ |
14 | #ifdef GSSAPI | 14 | #ifdef GSSAPI |
15 | { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, | 15 | { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, |
16 | { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, | 16 | { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, |
diff --git a/debian/patches/gssapi-dump.patch b/debian/patches/gssapi-dump.patch index 14856e544..9ed033359 100644 --- a/debian/patches/gssapi-dump.patch +++ b/debian/patches/gssapi-dump.patch | |||
@@ -11,7 +11,7 @@ Index: b/servconf.c | |||
11 | =================================================================== | 11 | =================================================================== |
12 | --- a/servconf.c | 12 | --- a/servconf.c |
13 | +++ b/servconf.c | 13 | +++ b/servconf.c |
14 | @@ -1624,7 +1624,10 @@ | 14 | @@ -1668,7 +1668,10 @@ |
15 | #endif | 15 | #endif |
16 | #ifdef GSSAPI | 16 | #ifdef GSSAPI |
17 | dump_cfg_fmtint(sGssAuthentication, o->gss_authentication); | 17 | dump_cfg_fmtint(sGssAuthentication, o->gss_authentication); |
diff --git a/debian/patches/gssapi.patch b/debian/patches/gssapi.patch index 6550ba60b..5c1b83415 100644 --- a/debian/patches/gssapi.patch +++ b/debian/patches/gssapi.patch | |||
@@ -127,17 +127,16 @@ Index: b/Makefile.in | |||
127 | =================================================================== | 127 | =================================================================== |
128 | --- a/Makefile.in | 128 | --- a/Makefile.in |
129 | +++ b/Makefile.in | 129 | +++ b/Makefile.in |
130 | @@ -71,7 +71,8 @@ | 130 | @@ -74,7 +74,7 @@ |
131 | atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \ | ||
132 | monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \ | 131 | monitor_fdpass.o rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o \ |
133 | kexgex.o kexdhc.o kexgexc.o scard.o msg.o progressmeter.o dns.o \ | 132 | kexgex.o kexdhc.o kexgexc.o msg.o progressmeter.o dns.o \ |
134 | - entropy.o scard-opensc.o gss-genr.o umac.o jpake.o schnorr.o | 133 | entropy.o gss-genr.o umac.o jpake.o schnorr.o \ |
135 | + entropy.o scard-opensc.o gss-genr.o umac.o jpake.o schnorr.o \ | 134 | - ssh-pkcs11.o |
136 | + kexgssc.o | 135 | + ssh-pkcs11.o kexgssc.o |
137 | 136 | ||
138 | SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ | 137 | SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ |
139 | sshconnect.o sshconnect1.o sshconnect2.o mux.o \ | 138 | sshconnect.o sshconnect1.o sshconnect2.o mux.o \ |
140 | @@ -85,7 +86,7 @@ | 139 | @@ -88,7 +88,7 @@ |
141 | auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \ | 140 | auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \ |
142 | monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o \ | 141 | monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o \ |
143 | auth-krb5.o \ | 142 | auth-krb5.o \ |
@@ -145,12 +144,12 @@ Index: b/Makefile.in | |||
145 | + auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ | 144 | + auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ |
146 | loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ | 145 | loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ |
147 | audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ | 146 | audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ |
148 | roaming_common.o | 147 | roaming_common.o roaming_serv.o |
149 | Index: b/auth-krb5.c | 148 | Index: b/auth-krb5.c |
150 | =================================================================== | 149 | =================================================================== |
151 | --- a/auth-krb5.c | 150 | --- a/auth-krb5.c |
152 | +++ b/auth-krb5.c | 151 | +++ b/auth-krb5.c |
153 | @@ -166,8 +166,13 @@ | 152 | @@ -170,8 +170,13 @@ |
154 | 153 | ||
155 | len = strlen(authctxt->krb5_ticket_file) + 6; | 154 | len = strlen(authctxt->krb5_ticket_file) + 6; |
156 | authctxt->krb5_ccname = xmalloc(len); | 155 | authctxt->krb5_ccname = xmalloc(len); |
@@ -164,7 +163,7 @@ Index: b/auth-krb5.c | |||
164 | 163 | ||
165 | #ifdef USE_PAM | 164 | #ifdef USE_PAM |
166 | if (options.use_pam) | 165 | if (options.use_pam) |
167 | @@ -219,15 +224,22 @@ | 166 | @@ -226,15 +231,22 @@ |
168 | #ifndef HEIMDAL | 167 | #ifndef HEIMDAL |
169 | krb5_error_code | 168 | krb5_error_code |
170 | ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) { | 169 | ssh_krb5_cc_gen(krb5_context ctx, krb5_ccache *ccache) { |
@@ -189,7 +188,7 @@ Index: b/auth-krb5.c | |||
189 | old_umask = umask(0177); | 188 | old_umask = umask(0177); |
190 | tmpfd = mkstemp(ccname + strlen("FILE:")); | 189 | tmpfd = mkstemp(ccname + strlen("FILE:")); |
191 | umask(old_umask); | 190 | umask(old_umask); |
192 | @@ -242,6 +254,7 @@ | 191 | @@ -249,6 +261,7 @@ |
193 | return errno; | 192 | return errno; |
194 | } | 193 | } |
195 | close(tmpfd); | 194 | close(tmpfd); |
@@ -365,7 +364,7 @@ Index: b/clientloop.c | |||
365 | /* import options */ | 364 | /* import options */ |
366 | extern Options options; | 365 | extern Options options; |
367 | 366 | ||
368 | @@ -1430,6 +1434,15 @@ | 367 | @@ -1431,6 +1435,15 @@ |
369 | /* Do channel operations unless rekeying in progress. */ | 368 | /* Do channel operations unless rekeying in progress. */ |
370 | if (!rekeying) { | 369 | if (!rekeying) { |
371 | channel_after_select(readset, writeset); | 370 | channel_after_select(readset, writeset); |
@@ -1212,9 +1211,9 @@ Index: b/kex.c | |||
1212 | =================================================================== | 1211 | =================================================================== |
1213 | --- a/kex.c | 1212 | --- a/kex.c |
1214 | +++ b/kex.c | 1213 | +++ b/kex.c |
1215 | @@ -49,6 +49,10 @@ | 1214 | @@ -50,6 +50,10 @@ |
1216 | #include "dispatch.h" | ||
1217 | #include "monitor.h" | 1215 | #include "monitor.h" |
1216 | #include "roaming.h" | ||
1218 | 1217 | ||
1219 | +#ifdef GSSAPI | 1218 | +#ifdef GSSAPI |
1220 | +#include "ssh-gss.h" | 1219 | +#include "ssh-gss.h" |
@@ -1223,7 +1222,7 @@ Index: b/kex.c | |||
1223 | #if OPENSSL_VERSION_NUMBER >= 0x00907000L | 1222 | #if OPENSSL_VERSION_NUMBER >= 0x00907000L |
1224 | # if defined(HAVE_EVP_SHA256) | 1223 | # if defined(HAVE_EVP_SHA256) |
1225 | # define evp_ssh_sha256 EVP_sha256 | 1224 | # define evp_ssh_sha256 EVP_sha256 |
1226 | @@ -325,6 +329,20 @@ | 1225 | @@ -326,6 +330,20 @@ |
1227 | k->kex_type = KEX_DH_GEX_SHA256; | 1226 | k->kex_type = KEX_DH_GEX_SHA256; |
1228 | k->evp_md = evp_ssh_sha256(); | 1227 | k->evp_md = evp_ssh_sha256(); |
1229 | #endif | 1228 | #endif |
@@ -1248,7 +1247,7 @@ Index: b/kex.h | |||
1248 | =================================================================== | 1247 | =================================================================== |
1249 | --- a/kex.h | 1248 | --- a/kex.h |
1250 | +++ b/kex.h | 1249 | +++ b/kex.h |
1251 | @@ -66,6 +66,9 @@ | 1250 | @@ -67,6 +67,9 @@ |
1252 | KEX_DH_GRP14_SHA1, | 1251 | KEX_DH_GRP14_SHA1, |
1253 | KEX_DH_GEX_SHA1, | 1252 | KEX_DH_GEX_SHA1, |
1254 | KEX_DH_GEX_SHA256, | 1253 | KEX_DH_GEX_SHA256, |
@@ -1258,7 +1257,7 @@ Index: b/kex.h | |||
1258 | KEX_MAX | 1257 | KEX_MAX |
1259 | }; | 1258 | }; |
1260 | 1259 | ||
1261 | @@ -121,6 +124,12 @@ | 1260 | @@ -123,6 +126,12 @@ |
1262 | sig_atomic_t done; | 1261 | sig_atomic_t done; |
1263 | int flags; | 1262 | int flags; |
1264 | const EVP_MD *evp_md; | 1263 | const EVP_MD *evp_md; |
@@ -1271,7 +1270,7 @@ Index: b/kex.h | |||
1271 | char *client_version_string; | 1270 | char *client_version_string; |
1272 | char *server_version_string; | 1271 | char *server_version_string; |
1273 | int (*verify_host_key)(Key *); | 1272 | int (*verify_host_key)(Key *); |
1274 | @@ -143,6 +152,11 @@ | 1273 | @@ -146,6 +155,11 @@ |
1275 | void kexgex_client(Kex *); | 1274 | void kexgex_client(Kex *); |
1276 | void kexgex_server(Kex *); | 1275 | void kexgex_server(Kex *); |
1277 | 1276 | ||
@@ -1919,10 +1918,10 @@ Index: b/key.c | |||
1919 | =================================================================== | 1918 | =================================================================== |
1920 | --- a/key.c | 1919 | --- a/key.c |
1921 | +++ b/key.c | 1920 | +++ b/key.c |
1922 | @@ -764,6 +764,8 @@ | 1921 | @@ -969,6 +969,8 @@ |
1923 | return KEY_RSA; | 1922 | return KEY_RSA_CERT; |
1924 | } else if (strcmp(name, "ssh-dss") == 0) { | 1923 | } else if (strcmp(name, "ssh-dss-cert-v00@openssh.com") == 0) { |
1925 | return KEY_DSA; | 1924 | return KEY_DSA_CERT; |
1926 | + } else if (strcmp(name, "null") == 0) { | 1925 | + } else if (strcmp(name, "null") == 0) { |
1927 | + return KEY_NULL; | 1926 | + return KEY_NULL; |
1928 | } | 1927 | } |
@@ -1932,10 +1931,10 @@ Index: b/key.h | |||
1932 | =================================================================== | 1931 | =================================================================== |
1933 | --- a/key.h | 1932 | --- a/key.h |
1934 | +++ b/key.h | 1933 | +++ b/key.h |
1935 | @@ -34,6 +34,7 @@ | 1934 | @@ -37,6 +37,7 @@ |
1936 | KEY_RSA1, | ||
1937 | KEY_RSA, | ||
1938 | KEY_DSA, | 1935 | KEY_DSA, |
1936 | KEY_RSA_CERT, | ||
1937 | KEY_DSA_CERT, | ||
1939 | + KEY_NULL, | 1938 | + KEY_NULL, |
1940 | KEY_UNSPEC | 1939 | KEY_UNSPEC |
1941 | }; | 1940 | }; |
@@ -1996,7 +1995,7 @@ Index: b/monitor.c | |||
1996 | } else { | 1995 | } else { |
1997 | mon_dispatch = mon_dispatch_postauth15; | 1996 | mon_dispatch = mon_dispatch_postauth15; |
1998 | monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); | 1997 | monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); |
1999 | @@ -1706,6 +1723,13 @@ | 1998 | @@ -1691,6 +1708,13 @@ |
2000 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; | 1999 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; |
2001 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; | 2000 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; |
2002 | kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; | 2001 | kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; |
@@ -2010,7 +2009,7 @@ Index: b/monitor.c | |||
2010 | kex->server = 1; | 2009 | kex->server = 1; |
2011 | kex->hostkey_type = buffer_get_int(m); | 2010 | kex->hostkey_type = buffer_get_int(m); |
2012 | kex->kex_type = buffer_get_int(m); | 2011 | kex->kex_type = buffer_get_int(m); |
2013 | @@ -1911,6 +1935,9 @@ | 2012 | @@ -1897,6 +1921,9 @@ |
2014 | OM_uint32 major; | 2013 | OM_uint32 major; |
2015 | u_int len; | 2014 | u_int len; |
2016 | 2015 | ||
@@ -2020,7 +2019,7 @@ Index: b/monitor.c | |||
2020 | goid.elements = buffer_get_string(m, &len); | 2019 | goid.elements = buffer_get_string(m, &len); |
2021 | goid.length = len; | 2020 | goid.length = len; |
2022 | 2021 | ||
2023 | @@ -1938,6 +1965,9 @@ | 2022 | @@ -1924,6 +1951,9 @@ |
2024 | OM_uint32 flags = 0; /* GSI needs this */ | 2023 | OM_uint32 flags = 0; /* GSI needs this */ |
2025 | u_int len; | 2024 | u_int len; |
2026 | 2025 | ||
@@ -2030,7 +2029,7 @@ Index: b/monitor.c | |||
2030 | in.value = buffer_get_string(m, &len); | 2029 | in.value = buffer_get_string(m, &len); |
2031 | in.length = len; | 2030 | in.length = len; |
2032 | major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags); | 2031 | major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags); |
2033 | @@ -1955,6 +1985,7 @@ | 2032 | @@ -1941,6 +1971,7 @@ |
2034 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0); | 2033 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0); |
2035 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); | 2034 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); |
2036 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1); | 2035 | monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1); |
@@ -2038,7 +2037,7 @@ Index: b/monitor.c | |||
2038 | } | 2037 | } |
2039 | return (0); | 2038 | return (0); |
2040 | } | 2039 | } |
2041 | @@ -1966,6 +1997,9 @@ | 2040 | @@ -1952,6 +1983,9 @@ |
2042 | OM_uint32 ret; | 2041 | OM_uint32 ret; |
2043 | u_int len; | 2042 | u_int len; |
2044 | 2043 | ||
@@ -2048,7 +2047,7 @@ Index: b/monitor.c | |||
2048 | gssbuf.value = buffer_get_string(m, &len); | 2047 | gssbuf.value = buffer_get_string(m, &len); |
2049 | gssbuf.length = len; | 2048 | gssbuf.length = len; |
2050 | mic.value = buffer_get_string(m, &len); | 2049 | mic.value = buffer_get_string(m, &len); |
2051 | @@ -1992,7 +2026,11 @@ | 2050 | @@ -1978,7 +2012,11 @@ |
2052 | { | 2051 | { |
2053 | int authenticated; | 2052 | int authenticated; |
2054 | 2053 | ||
@@ -2061,7 +2060,7 @@ Index: b/monitor.c | |||
2061 | 2060 | ||
2062 | buffer_clear(m); | 2061 | buffer_clear(m); |
2063 | buffer_put_int(m, authenticated); | 2062 | buffer_put_int(m, authenticated); |
2064 | @@ -2005,6 +2043,74 @@ | 2063 | @@ -1991,6 +2029,74 @@ |
2065 | /* Monitor loop will terminate if authenticated */ | 2064 | /* Monitor loop will terminate if authenticated */ |
2066 | return (authenticated); | 2065 | return (authenticated); |
2067 | } | 2066 | } |
@@ -2153,7 +2152,7 @@ Index: b/monitor_wrap.c | |||
2153 | =================================================================== | 2152 | =================================================================== |
2154 | --- a/monitor_wrap.c | 2153 | --- a/monitor_wrap.c |
2155 | +++ b/monitor_wrap.c | 2154 | +++ b/monitor_wrap.c |
2156 | @@ -1248,7 +1248,7 @@ | 2155 | @@ -1231,7 +1231,7 @@ |
2157 | } | 2156 | } |
2158 | 2157 | ||
2159 | int | 2158 | int |
@@ -2162,7 +2161,7 @@ Index: b/monitor_wrap.c | |||
2162 | { | 2161 | { |
2163 | Buffer m; | 2162 | Buffer m; |
2164 | int authenticated = 0; | 2163 | int authenticated = 0; |
2165 | @@ -1265,6 +1265,51 @@ | 2164 | @@ -1248,6 +1248,51 @@ |
2166 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); | 2165 | debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); |
2167 | return (authenticated); | 2166 | return (authenticated); |
2168 | } | 2167 | } |
@@ -2261,7 +2260,7 @@ Index: b/readconf.c | |||
2261 | #endif | 2260 | #endif |
2262 | { "fallbacktorsh", oDeprecated }, | 2261 | { "fallbacktorsh", oDeprecated }, |
2263 | { "usersh", oDeprecated }, | 2262 | { "usersh", oDeprecated }, |
2264 | @@ -454,10 +463,26 @@ | 2263 | @@ -456,10 +465,26 @@ |
2265 | intptr = &options->gss_authentication; | 2264 | intptr = &options->gss_authentication; |
2266 | goto parse_flag; | 2265 | goto parse_flag; |
2267 | 2266 | ||
@@ -2288,7 +2287,7 @@ Index: b/readconf.c | |||
2288 | case oBatchMode: | 2287 | case oBatchMode: |
2289 | intptr = &options->batch_mode; | 2288 | intptr = &options->batch_mode; |
2290 | goto parse_flag; | 2289 | goto parse_flag; |
2291 | @@ -1013,7 +1038,11 @@ | 2290 | @@ -1015,7 +1040,11 @@ |
2292 | options->pubkey_authentication = -1; | 2291 | options->pubkey_authentication = -1; |
2293 | options->challenge_response_authentication = -1; | 2292 | options->challenge_response_authentication = -1; |
2294 | options->gss_authentication = -1; | 2293 | options->gss_authentication = -1; |
@@ -2300,7 +2299,7 @@ Index: b/readconf.c | |||
2300 | options->password_authentication = -1; | 2299 | options->password_authentication = -1; |
2301 | options->kbd_interactive_authentication = -1; | 2300 | options->kbd_interactive_authentication = -1; |
2302 | options->kbd_interactive_devices = NULL; | 2301 | options->kbd_interactive_devices = NULL; |
2303 | @@ -1105,8 +1134,14 @@ | 2302 | @@ -1107,8 +1136,14 @@ |
2304 | options->challenge_response_authentication = 1; | 2303 | options->challenge_response_authentication = 1; |
2305 | if (options->gss_authentication == -1) | 2304 | if (options->gss_authentication == -1) |
2306 | options->gss_authentication = 0; | 2305 | options->gss_authentication = 0; |
@@ -2335,7 +2334,7 @@ Index: b/servconf.c | |||
2335 | =================================================================== | 2334 | =================================================================== |
2336 | --- a/servconf.c | 2335 | --- a/servconf.c |
2337 | +++ b/servconf.c | 2336 | +++ b/servconf.c |
2338 | @@ -92,7 +92,10 @@ | 2337 | @@ -93,7 +93,10 @@ |
2339 | options->kerberos_ticket_cleanup = -1; | 2338 | options->kerberos_ticket_cleanup = -1; |
2340 | options->kerberos_get_afs_token = -1; | 2339 | options->kerberos_get_afs_token = -1; |
2341 | options->gss_authentication=-1; | 2340 | options->gss_authentication=-1; |
@@ -2346,7 +2345,7 @@ Index: b/servconf.c | |||
2346 | options->password_authentication = -1; | 2345 | options->password_authentication = -1; |
2347 | options->kbd_interactive_authentication = -1; | 2346 | options->kbd_interactive_authentication = -1; |
2348 | options->challenge_response_authentication = -1; | 2347 | options->challenge_response_authentication = -1; |
2349 | @@ -210,8 +213,14 @@ | 2348 | @@ -214,8 +217,14 @@ |
2350 | options->kerberos_get_afs_token = 0; | 2349 | options->kerberos_get_afs_token = 0; |
2351 | if (options->gss_authentication == -1) | 2350 | if (options->gss_authentication == -1) |
2352 | options->gss_authentication = 0; | 2351 | options->gss_authentication = 0; |
@@ -2361,7 +2360,7 @@ Index: b/servconf.c | |||
2361 | if (options->password_authentication == -1) | 2360 | if (options->password_authentication == -1) |
2362 | options->password_authentication = 1; | 2361 | options->password_authentication = 1; |
2363 | if (options->kbd_interactive_authentication == -1) | 2362 | if (options->kbd_interactive_authentication == -1) |
2364 | @@ -302,7 +311,9 @@ | 2363 | @@ -306,7 +315,9 @@ |
2365 | sBanner, sUseDNS, sHostbasedAuthentication, | 2364 | sBanner, sUseDNS, sHostbasedAuthentication, |
2366 | sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, | 2365 | sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, |
2367 | sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, | 2366 | sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, |
@@ -2371,8 +2370,8 @@ Index: b/servconf.c | |||
2371 | + sAcceptEnv, sPermitTunnel, | 2370 | + sAcceptEnv, sPermitTunnel, |
2372 | sMatch, sPermitOpen, sForceCommand, sChrootDirectory, | 2371 | sMatch, sPermitOpen, sForceCommand, sChrootDirectory, |
2373 | sUsePrivilegeSeparation, sAllowAgentForwarding, | 2372 | sUsePrivilegeSeparation, sAllowAgentForwarding, |
2374 | sZeroKnowledgePasswordAuthentication, | 2373 | sZeroKnowledgePasswordAuthentication, sHostCertificate, |
2375 | @@ -364,9 +375,15 @@ | 2374 | @@ -369,9 +380,15 @@ |
2376 | #ifdef GSSAPI | 2375 | #ifdef GSSAPI |
2377 | { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, | 2376 | { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, |
2378 | { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, | 2377 | { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, |
@@ -2388,7 +2387,7 @@ Index: b/servconf.c | |||
2388 | #endif | 2387 | #endif |
2389 | { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, | 2388 | { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, |
2390 | { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, | 2389 | { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, |
2391 | @@ -891,10 +908,22 @@ | 2390 | @@ -925,10 +942,22 @@ |
2392 | intptr = &options->gss_authentication; | 2391 | intptr = &options->gss_authentication; |
2393 | goto parse_flag; | 2392 | goto parse_flag; |
2394 | 2393 | ||
@@ -2415,7 +2414,7 @@ Index: b/servconf.h | |||
2415 | =================================================================== | 2414 | =================================================================== |
2416 | --- a/servconf.h | 2415 | --- a/servconf.h |
2417 | +++ b/servconf.h | 2416 | +++ b/servconf.h |
2418 | @@ -91,7 +91,10 @@ | 2417 | @@ -94,7 +94,10 @@ |
2419 | int kerberos_get_afs_token; /* If true, try to get AFS token if | 2418 | int kerberos_get_afs_token; /* If true, try to get AFS token if |
2420 | * authenticated with Kerberos. */ | 2419 | * authenticated with Kerberos. */ |
2421 | int gss_authentication; /* If true, permit GSSAPI authentication */ | 2420 | int gss_authentication; /* If true, permit GSSAPI authentication */ |
@@ -2588,7 +2587,7 @@ Index: b/sshconnect2.c | |||
2588 | =================================================================== | 2587 | =================================================================== |
2589 | --- a/sshconnect2.c | 2588 | --- a/sshconnect2.c |
2590 | +++ b/sshconnect2.c | 2589 | +++ b/sshconnect2.c |
2591 | @@ -105,9 +105,34 @@ | 2590 | @@ -106,9 +106,34 @@ |
2592 | { | 2591 | { |
2593 | Kex *kex; | 2592 | Kex *kex; |
2594 | 2593 | ||
@@ -2623,7 +2622,7 @@ Index: b/sshconnect2.c | |||
2623 | if (options.ciphers == (char *)-1) { | 2622 | if (options.ciphers == (char *)-1) { |
2624 | logit("No valid ciphers for protocol version 2 given, using defaults."); | 2623 | logit("No valid ciphers for protocol version 2 given, using defaults."); |
2625 | options.ciphers = NULL; | 2624 | options.ciphers = NULL; |
2626 | @@ -135,6 +160,17 @@ | 2625 | @@ -136,6 +161,17 @@ |
2627 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = | 2626 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = |
2628 | options.hostkeyalgorithms; | 2627 | options.hostkeyalgorithms; |
2629 | 2628 | ||
@@ -2641,7 +2640,7 @@ Index: b/sshconnect2.c | |||
2641 | if (options.rekey_limit) | 2640 | if (options.rekey_limit) |
2642 | packet_set_rekey_limit((u_int32_t)options.rekey_limit); | 2641 | packet_set_rekey_limit((u_int32_t)options.rekey_limit); |
2643 | 2642 | ||
2644 | @@ -144,10 +180,26 @@ | 2643 | @@ -145,10 +181,26 @@ |
2645 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; | 2644 | kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; |
2646 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; | 2645 | kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; |
2647 | kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; | 2646 | kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; |
@@ -2668,7 +2667,7 @@ Index: b/sshconnect2.c | |||
2668 | xxx_kex = kex; | 2667 | xxx_kex = kex; |
2669 | 2668 | ||
2670 | dispatch_run(DISPATCH_BLOCK, &kex->done, kex); | 2669 | dispatch_run(DISPATCH_BLOCK, &kex->done, kex); |
2671 | @@ -236,6 +288,7 @@ | 2670 | @@ -243,6 +295,7 @@ |
2672 | void input_gssapi_hash(int type, u_int32_t, void *); | 2671 | void input_gssapi_hash(int type, u_int32_t, void *); |
2673 | void input_gssapi_error(int, u_int32_t, void *); | 2672 | void input_gssapi_error(int, u_int32_t, void *); |
2674 | void input_gssapi_errtok(int, u_int32_t, void *); | 2673 | void input_gssapi_errtok(int, u_int32_t, void *); |
@@ -2676,7 +2675,7 @@ Index: b/sshconnect2.c | |||
2676 | #endif | 2675 | #endif |
2677 | 2676 | ||
2678 | void userauth(Authctxt *, char *); | 2677 | void userauth(Authctxt *, char *); |
2679 | @@ -251,6 +304,11 @@ | 2678 | @@ -258,6 +311,11 @@ |
2680 | 2679 | ||
2681 | Authmethod authmethods[] = { | 2680 | Authmethod authmethods[] = { |
2682 | #ifdef GSSAPI | 2681 | #ifdef GSSAPI |
@@ -2688,7 +2687,7 @@ Index: b/sshconnect2.c | |||
2688 | {"gssapi-with-mic", | 2687 | {"gssapi-with-mic", |
2689 | userauth_gssapi, | 2688 | userauth_gssapi, |
2690 | NULL, | 2689 | NULL, |
2691 | @@ -542,19 +600,29 @@ | 2690 | @@ -564,19 +622,29 @@ |
2692 | static u_int mech = 0; | 2691 | static u_int mech = 0; |
2693 | OM_uint32 min; | 2692 | OM_uint32 min; |
2694 | int ok = 0; | 2693 | int ok = 0; |
@@ -2720,7 +2719,7 @@ Index: b/sshconnect2.c | |||
2720 | ok = 1; /* Mechanism works */ | 2719 | ok = 1; /* Mechanism works */ |
2721 | } else { | 2720 | } else { |
2722 | mech++; | 2721 | mech++; |
2723 | @@ -651,8 +719,8 @@ | 2722 | @@ -673,8 +741,8 @@ |
2724 | { | 2723 | { |
2725 | Authctxt *authctxt = ctxt; | 2724 | Authctxt *authctxt = ctxt; |
2726 | Gssctxt *gssctxt; | 2725 | Gssctxt *gssctxt; |
@@ -2731,7 +2730,7 @@ Index: b/sshconnect2.c | |||
2731 | 2730 | ||
2732 | if (authctxt == NULL) | 2731 | if (authctxt == NULL) |
2733 | fatal("input_gssapi_response: no authentication context"); | 2732 | fatal("input_gssapi_response: no authentication context"); |
2734 | @@ -762,6 +830,48 @@ | 2733 | @@ -784,6 +852,48 @@ |
2735 | xfree(msg); | 2734 | xfree(msg); |
2736 | xfree(lang); | 2735 | xfree(lang); |
2737 | } | 2736 | } |
@@ -2795,7 +2794,7 @@ Index: b/sshd.c | |||
2795 | #ifdef LIBWRAP | 2794 | #ifdef LIBWRAP |
2796 | #include <tcpd.h> | 2795 | #include <tcpd.h> |
2797 | #include <syslog.h> | 2796 | #include <syslog.h> |
2798 | @@ -1531,10 +1535,13 @@ | 2797 | @@ -1577,10 +1581,13 @@ |
2799 | logit("Disabling protocol version 1. Could not load host key"); | 2798 | logit("Disabling protocol version 1. Could not load host key"); |
2800 | options.protocol &= ~SSH_PROTO_1; | 2799 | options.protocol &= ~SSH_PROTO_1; |
2801 | } | 2800 | } |
@@ -2809,7 +2808,7 @@ Index: b/sshd.c | |||
2809 | if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) { | 2808 | if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) { |
2810 | logit("sshd: no hostkeys available -- exiting."); | 2809 | logit("sshd: no hostkeys available -- exiting."); |
2811 | exit(1); | 2810 | exit(1); |
2812 | @@ -1818,6 +1825,60 @@ | 2811 | @@ -1909,6 +1916,60 @@ |
2813 | /* Log the connection. */ | 2812 | /* Log the connection. */ |
2814 | verbose("Connection from %.500s port %d", remote_ip, remote_port); | 2813 | verbose("Connection from %.500s port %d", remote_ip, remote_port); |
2815 | 2814 | ||
@@ -2870,7 +2869,7 @@ Index: b/sshd.c | |||
2870 | /* | 2869 | /* |
2871 | * We don't want to listen forever unless the other side | 2870 | * We don't want to listen forever unless the other side |
2872 | * successfully authenticates itself. So we set up an alarm which is | 2871 | * successfully authenticates itself. So we set up an alarm which is |
2873 | @@ -2195,12 +2256,61 @@ | 2872 | @@ -2287,12 +2348,61 @@ |
2874 | 2873 | ||
2875 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); | 2874 | myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); |
2876 | 2875 | ||
@@ -2936,7 +2935,7 @@ Index: b/sshd_config | |||
2936 | =================================================================== | 2935 | =================================================================== |
2937 | --- a/sshd_config | 2936 | --- a/sshd_config |
2938 | +++ b/sshd_config | 2937 | +++ b/sshd_config |
2939 | @@ -73,6 +73,8 @@ | 2938 | @@ -71,6 +71,8 @@ |
2940 | # GSSAPI options | 2939 | # GSSAPI options |
2941 | #GSSAPIAuthentication no | 2940 | #GSSAPIAuthentication no |
2942 | #GSSAPICleanupCredentials yes | 2941 | #GSSAPICleanupCredentials yes |
diff --git a/debian/patches/hurd-epfnosupport.patch b/debian/patches/hurd-epfnosupport.patch index b8ae070f7..e06b46309 100644 --- a/debian/patches/hurd-epfnosupport.patch +++ b/debian/patches/hurd-epfnosupport.patch | |||
@@ -9,7 +9,7 @@ Index: b/channels.c | |||
9 | =================================================================== | 9 | =================================================================== |
10 | --- a/channels.c | 10 | --- a/channels.c |
11 | +++ b/channels.c | 11 | +++ b/channels.c |
12 | @@ -3098,7 +3098,11 @@ | 12 | @@ -3252,7 +3252,11 @@ |
13 | sock = socket(ai->ai_family, ai->ai_socktype, | 13 | sock = socket(ai->ai_family, ai->ai_socktype, |
14 | ai->ai_protocol); | 14 | ai->ai_protocol); |
15 | if (sock < 0) { | 15 | if (sock < 0) { |
diff --git a/debian/patches/keepalive-extensions.patch b/debian/patches/keepalive-extensions.patch index 1bfc9c798..55d07e0d6 100644 --- a/debian/patches/keepalive-extensions.patch +++ b/debian/patches/keepalive-extensions.patch | |||
@@ -26,7 +26,7 @@ Index: b/readconf.c | |||
26 | oDeprecated, oUnsupported | 26 | oDeprecated, oUnsupported |
27 | } OpCodes; | 27 | } OpCodes; |
28 | 28 | ||
29 | @@ -246,6 +247,8 @@ | 29 | @@ -248,6 +249,8 @@ |
30 | #else | 30 | #else |
31 | { "zeroknowledgepasswordauthentication", oUnsupported }, | 31 | { "zeroknowledgepasswordauthentication", oUnsupported }, |
32 | #endif | 32 | #endif |
@@ -35,7 +35,7 @@ Index: b/readconf.c | |||
35 | 35 | ||
36 | { NULL, oBadOption } | 36 | { NULL, oBadOption } |
37 | }; | 37 | }; |
38 | @@ -845,6 +848,8 @@ | 38 | @@ -847,6 +850,8 @@ |
39 | goto parse_flag; | 39 | goto parse_flag; |
40 | 40 | ||
41 | case oServerAliveInterval: | 41 | case oServerAliveInterval: |
@@ -44,7 +44,7 @@ Index: b/readconf.c | |||
44 | intptr = &options->server_alive_interval; | 44 | intptr = &options->server_alive_interval; |
45 | goto parse_time; | 45 | goto parse_time; |
46 | 46 | ||
47 | @@ -1233,8 +1238,13 @@ | 47 | @@ -1235,8 +1240,13 @@ |
48 | options->rekey_limit = 0; | 48 | options->rekey_limit = 0; |
49 | if (options->verify_host_key_dns == -1) | 49 | if (options->verify_host_key_dns == -1) |
50 | options->verify_host_key_dns = 0; | 50 | options->verify_host_key_dns = 0; |
@@ -78,7 +78,7 @@ Index: b/ssh_config.5 | |||
78 | The argument must be | 78 | The argument must be |
79 | .Dq yes | 79 | .Dq yes |
80 | or | 80 | or |
81 | @@ -946,8 +950,15 @@ | 81 | @@ -967,8 +971,15 @@ |
82 | will send a message through the encrypted | 82 | will send a message through the encrypted |
83 | channel to request a response from the server. | 83 | channel to request a response from the server. |
84 | The default | 84 | The default |
@@ -92,10 +92,10 @@ Index: b/ssh_config.5 | |||
92 | +and | 92 | +and |
93 | +.Cm SetupTimeOut | 93 | +.Cm SetupTimeOut |
94 | +are Debian-specific compatibility aliases for this option. | 94 | +are Debian-specific compatibility aliases for this option. |
95 | .It Cm SmartcardDevice | 95 | .It Cm StrictHostKeyChecking |
96 | Specifies which smartcard device to use. | 96 | If this flag is set to |
97 | The argument to this keyword is the device | 97 | .Dq yes , |
98 | @@ -993,6 +1004,12 @@ | 98 | @@ -1007,6 +1018,12 @@ |
99 | other side. | 99 | other side. |
100 | If they are sent, death of the connection or crash of one | 100 | If they are sent, death of the connection or crash of one |
101 | of the machines will be properly noticed. | 101 | of the machines will be properly noticed. |
@@ -112,13 +112,13 @@ Index: b/sshd_config.5 | |||
112 | =================================================================== | 112 | =================================================================== |
113 | --- a/sshd_config.5 | 113 | --- a/sshd_config.5 |
114 | +++ b/sshd_config.5 | 114 | +++ b/sshd_config.5 |
115 | @@ -919,6 +919,9 @@ | 115 | @@ -936,6 +936,9 @@ |
116 | .Pp | 116 | .Pp |
117 | To disable TCP keepalive messages, the value should be set to | 117 | To disable TCP keepalive messages, the value should be set to |
118 | .Dq no . | 118 | .Dq no . |
119 | +.Pp | 119 | +.Pp |
120 | +This option was formerly called | 120 | +This option was formerly called |
121 | +.Cm KeepAlive . | 121 | +.Cm KeepAlive . |
122 | .It Cm UseDNS | 122 | .It Cm TrustedUserCAKeys |
123 | Specifies whether | 123 | Specifies a file containing public keys of certificate authorities that are |
124 | .Xr sshd 8 | 124 | trusted to sign user certificates for authentication. |
diff --git a/debian/patches/keyfile-debug.patch b/debian/patches/keyfile-debug.patch deleted file mode 100644 index 2e5f209f3..000000000 --- a/debian/patches/keyfile-debug.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | Description: Output a debug if we can't open an existing keyfile | ||
2 | Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/openssh/main/revision/5873 | ||
3 | Author: Darren Tucker <dtucker@zip.com.au> | ||
4 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1694 | ||
5 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/505301 | ||
6 | Last-Update: 2010-02-27 | ||
7 | |||
8 | Index: b/auth.c | ||
9 | =================================================================== | ||
10 | --- a/auth.c | ||
11 | +++ b/auth.c | ||
12 | @@ -516,8 +516,12 @@ | ||
13 | * Open the file containing the authorized keys | ||
14 | * Fail quietly if file does not exist | ||
15 | */ | ||
16 | - if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) | ||
17 | + if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) { | ||
18 | + if (errno != ENOENT) | ||
19 | + debug("Could not open keyfile '%s': %s", file, | ||
20 | + strerror(errno)); | ||
21 | return NULL; | ||
22 | + } | ||
23 | |||
24 | if (fstat(fd, &st) < 0) { | ||
25 | close(fd); | ||
diff --git a/debian/patches/lintian-symlink-pickiness.patch b/debian/patches/lintian-symlink-pickiness.patch index abfad4509..3afddb70e 100644 --- a/debian/patches/lintian-symlink-pickiness.patch +++ b/debian/patches/lintian-symlink-pickiness.patch | |||
@@ -7,8 +7,8 @@ Index: b/Makefile.in | |||
7 | =================================================================== | 7 | =================================================================== |
8 | --- a/Makefile.in | 8 | --- a/Makefile.in |
9 | +++ b/Makefile.in | 9 | +++ b/Makefile.in |
10 | @@ -293,9 +293,9 @@ | 10 | @@ -295,9 +295,9 @@ |
11 | $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 | 11 | $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 |
12 | $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 | 12 | $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 |
13 | -rm -f $(DESTDIR)$(bindir)/slogin | 13 | -rm -f $(DESTDIR)$(bindir)/slogin |
14 | - ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin | 14 | - ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin |
diff --git a/debian/patches/no-constraint-fallback.patch b/debian/patches/no-constraint-fallback.patch deleted file mode 100644 index dc01085cb..000000000 --- a/debian/patches/no-constraint-fallback.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | Description: ssh-add: Don't discard constraints when agent refuses request | ||
2 | This was a useful migration measure back in 2002 when constraints were new, | ||
3 | but just adds risk now. | ||
4 | Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/openssh/main/revision/5777 | ||
5 | Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net> | ||
6 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1612 | ||
7 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/209447 | ||
8 | Last-Update: 2010-02-28 | ||
9 | |||
10 | Index: b/authfd.c | ||
11 | =================================================================== | ||
12 | --- a/authfd.c | ||
13 | +++ b/authfd.c | ||
14 | @@ -545,12 +545,6 @@ | ||
15 | return decode_reply(type); | ||
16 | } | ||
17 | |||
18 | -int | ||
19 | -ssh_add_identity(AuthenticationConnection *auth, Key *key, const char *comment) | ||
20 | -{ | ||
21 | - return ssh_add_identity_constrained(auth, key, comment, 0, 0); | ||
22 | -} | ||
23 | - | ||
24 | /* | ||
25 | * Removes an identity from the authentication server. This call is not | ||
26 | * meant to be used by normal applications. | ||
27 | Index: b/authfd.h | ||
28 | =================================================================== | ||
29 | --- a/authfd.h | ||
30 | +++ b/authfd.h | ||
31 | @@ -75,7 +75,6 @@ | ||
32 | int ssh_get_num_identities(AuthenticationConnection *, int); | ||
33 | Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); | ||
34 | Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); | ||
35 | -int ssh_add_identity(AuthenticationConnection *, Key *, const char *); | ||
36 | int ssh_add_identity_constrained(AuthenticationConnection *, Key *, | ||
37 | const char *, u_int, u_int); | ||
38 | int ssh_remove_identity(AuthenticationConnection *, Key *); | ||
39 | Index: b/ssh-add.c | ||
40 | =================================================================== | ||
41 | --- a/ssh-add.c | ||
42 | +++ b/ssh-add.c | ||
43 | @@ -203,9 +203,6 @@ | ||
44 | if (confirm != 0) | ||
45 | fprintf(stderr, | ||
46 | "The user has to confirm each use of the key\n"); | ||
47 | - } else if (ssh_add_identity(ac, private, comment)) { | ||
48 | - fprintf(stderr, "Identity added: %s (%s)\n", filename, comment); | ||
49 | - ret = 0; | ||
50 | } else { | ||
51 | fprintf(stderr, "Could not add identity: %s\n", filename); | ||
52 | } | ||
diff --git a/debian/patches/oom-adjust.patch b/debian/patches/oom-adjust.patch deleted file mode 100644 index ce79053f7..000000000 --- a/debian/patches/oom-adjust.patch +++ /dev/null | |||
@@ -1,219 +0,0 @@ | |||
1 | Description: Disable the Linux kernel's OOM-killer for the sshd parent | ||
2 | Author: Vaclav Ovsik <vaclav.ovsik@i.cz> | ||
3 | Author: Colin Watson <cjwatson@debian.org> | ||
4 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1470 | ||
5 | Bug-Debian: http://bugs.debian.org/480020 | ||
6 | Last-Update: 2010-02-27 | ||
7 | |||
8 | Index: b/config.h.in | ||
9 | =================================================================== | ||
10 | --- a/config.h.in | ||
11 | +++ b/config.h.in | ||
12 | @@ -1238,6 +1238,9 @@ | ||
13 | /* Define if X11 doesn't support AF_UNIX sockets on that system */ | ||
14 | #undef NO_X11_UNIX_SOCKETS | ||
15 | |||
16 | +/* Adjust Linux out-of-memory killer */ | ||
17 | +#undef OOM_ADJUST | ||
18 | + | ||
19 | /* Define if EVP_DigestUpdate returns void */ | ||
20 | #undef OPENSSL_EVP_DIGESTUPDATE_VOID | ||
21 | |||
22 | Index: b/configure | ||
23 | =================================================================== | ||
24 | --- a/configure | ||
25 | +++ b/configure | ||
26 | @@ -8369,6 +8369,11 @@ | ||
27 | _ACEOF | ||
28 | |||
29 | fi | ||
30 | + | ||
31 | +cat >>confdefs.h <<\_ACEOF | ||
32 | +#define OOM_ADJUST 1 | ||
33 | +_ACEOF | ||
34 | + | ||
35 | ;; | ||
36 | mips-sony-bsd|mips-sony-newsos4) | ||
37 | |||
38 | Index: b/configure.ac | ||
39 | =================================================================== | ||
40 | --- a/configure.ac | ||
41 | +++ b/configure.ac | ||
42 | @@ -630,6 +630,7 @@ | ||
43 | AC_DEFINE(SSH_TUN_PREPEND_AF, 1, | ||
44 | [Prepend the address family to IP tunnel traffic]) | ||
45 | fi | ||
46 | + AC_DEFINE(OOM_ADJUST, 1, [Adjust Linux out-of-memory killer]) | ||
47 | ;; | ||
48 | mips-sony-bsd|mips-sony-newsos4) | ||
49 | AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty]) | ||
50 | Index: b/openbsd-compat/port-linux.c | ||
51 | =================================================================== | ||
52 | --- a/openbsd-compat/port-linux.c | ||
53 | +++ b/openbsd-compat/port-linux.c | ||
54 | @@ -18,7 +18,7 @@ | ||
55 | */ | ||
56 | |||
57 | /* | ||
58 | - * Linux-specific portability code - just SELinux support at present | ||
59 | + * Linux-specific portability code | ||
60 | */ | ||
61 | |||
62 | #include "includes.h" | ||
63 | @@ -27,6 +27,15 @@ | ||
64 | #include <stdarg.h> | ||
65 | #include <string.h> | ||
66 | |||
67 | +#ifdef OOM_ADJUST | ||
68 | +#include <sys/types.h> | ||
69 | +#include <sys/stat.h> | ||
70 | +#include <fcntl.h> | ||
71 | +#include <unistd.h> | ||
72 | +#endif | ||
73 | + | ||
74 | +#include "log.h" | ||
75 | + | ||
76 | #ifdef WITH_SELINUX | ||
77 | #include "key.h" | ||
78 | #include "hostfile.h" | ||
79 | @@ -34,7 +43,6 @@ | ||
80 | #ifdef HAVE_GETSEUSERBYNAME | ||
81 | #include "xmalloc.h" | ||
82 | #endif | ||
83 | -#include "log.h" | ||
84 | #include "port-linux.h" | ||
85 | |||
86 | #include <selinux/selinux.h> | ||
87 | @@ -186,3 +194,47 @@ | ||
88 | debug3("%s: done", __func__); | ||
89 | } | ||
90 | #endif /* WITH_SELINUX */ | ||
91 | + | ||
92 | +#ifdef OOM_ADJUST | ||
93 | +/* Get the out-of-memory adjustment file for the current process */ | ||
94 | +static int | ||
95 | +oom_adj_open(int oflag) | ||
96 | +{ | ||
97 | + int fd = open("/proc/self/oom_adj", oflag); | ||
98 | + if (fd < 0) | ||
99 | + logit("error opening /proc/self/oom_adj: %s", strerror(errno)); | ||
100 | + return fd; | ||
101 | +} | ||
102 | + | ||
103 | +/* Get the current OOM adjustment */ | ||
104 | +int | ||
105 | +oom_adj_get(char *buf, size_t maxlen) | ||
106 | +{ | ||
107 | + ssize_t n; | ||
108 | + int fd = oom_adj_open(O_RDONLY); | ||
109 | + if (fd < 0) | ||
110 | + return -1; | ||
111 | + n = read(fd, buf, maxlen); | ||
112 | + if (n < 0) | ||
113 | + logit("error reading /proc/self/oom_adj: %s", strerror(errno)); | ||
114 | + else | ||
115 | + buf[n] = '\0'; | ||
116 | + close(fd); | ||
117 | + return n < 0 ? -1 : 0; | ||
118 | +} | ||
119 | + | ||
120 | +/* Set the current OOM adjustment */ | ||
121 | +int | ||
122 | +oom_adj_set(const char *buf) | ||
123 | +{ | ||
124 | + ssize_t n; | ||
125 | + int fd = oom_adj_open(O_WRONLY); | ||
126 | + if (fd < 0) | ||
127 | + return -1; | ||
128 | + n = write(fd, buf, strlen(buf)); | ||
129 | + if (n < 0) | ||
130 | + logit("error writing /proc/self/oom_adj: %s", strerror(errno)); | ||
131 | + close(fd); | ||
132 | + return n < 0 ? -1 : 0; | ||
133 | +} | ||
134 | +#endif | ||
135 | Index: b/openbsd-compat/port-linux.h | ||
136 | =================================================================== | ||
137 | --- a/openbsd-compat/port-linux.h | ||
138 | +++ b/openbsd-compat/port-linux.h | ||
139 | @@ -25,4 +25,9 @@ | ||
140 | void ssh_selinux_setup_exec_context(char *); | ||
141 | #endif | ||
142 | |||
143 | +#ifdef OOM_ADJUST | ||
144 | +int oom_adj_get(char *buf, size_t maxlen); | ||
145 | +int oom_adj_set(const char *buf); | ||
146 | +#endif | ||
147 | + | ||
148 | #endif /* ! _PORT_LINUX_H */ | ||
149 | Index: b/sshd.c | ||
150 | =================================================================== | ||
151 | --- a/sshd.c | ||
152 | +++ b/sshd.c | ||
153 | @@ -254,6 +254,11 @@ | ||
154 | /* Unprivileged user */ | ||
155 | struct passwd *privsep_pw = NULL; | ||
156 | |||
157 | +#ifdef OOM_ADJUST | ||
158 | +/* Linux out-of-memory killer adjustment */ | ||
159 | +static char oom_adj_save[8]; | ||
160 | +#endif | ||
161 | + | ||
162 | /* Prototypes for various functions defined later in this file. */ | ||
163 | void destroy_sensitive_data(void); | ||
164 | void demote_sensitive_data(void); | ||
165 | @@ -908,6 +913,31 @@ | ||
166 | debug3("%s: done", __func__); | ||
167 | } | ||
168 | |||
169 | +#ifdef OOM_ADJUST | ||
170 | +/* | ||
171 | + * If requested in the environment, tell the Linux kernel's out-of-memory | ||
172 | + * killer to avoid sshd. The old state will be restored when forking child | ||
173 | + * processes. | ||
174 | + */ | ||
175 | +static void | ||
176 | +oom_adjust_startup(void) | ||
177 | +{ | ||
178 | + const char *oom_adj = getenv("SSHD_OOM_ADJUST"); | ||
179 | + | ||
180 | + if (!oom_adj || !*oom_adj) | ||
181 | + return; | ||
182 | + oom_adj_get(oom_adj_save, sizeof(oom_adj_save)); | ||
183 | + oom_adj_set(oom_adj); | ||
184 | +} | ||
185 | + | ||
186 | +static void | ||
187 | +oom_restore(void) | ||
188 | +{ | ||
189 | + if (oom_adj_save[0]) | ||
190 | + oom_adj_set(oom_adj_save); | ||
191 | +} | ||
192 | +#endif | ||
193 | + | ||
194 | /* Accept a connection from inetd */ | ||
195 | static void | ||
196 | server_accept_inetd(int *sock_in, int *sock_out) | ||
197 | @@ -1670,6 +1700,11 @@ | ||
198 | /* ignore SIGPIPE */ | ||
199 | signal(SIGPIPE, SIG_IGN); | ||
200 | |||
201 | +#ifdef OOM_ADJUST | ||
202 | + /* Adjust out-of-memory killer */ | ||
203 | + oom_adjust_startup(); | ||
204 | +#endif | ||
205 | + | ||
206 | /* Get a connection, either from inetd or a listening TCP socket */ | ||
207 | if (inetd_flag) { | ||
208 | server_accept_inetd(&sock_in, &sock_out); | ||
209 | @@ -1708,6 +1743,10 @@ | ||
210 | /* This is the child processing a new connection. */ | ||
211 | setproctitle("%s", "[accepted]"); | ||
212 | |||
213 | +#ifdef OOM_ADJUST | ||
214 | + oom_restore(); | ||
215 | +#endif | ||
216 | + | ||
217 | /* | ||
218 | * Create a new session and process group since the 4.4BSD | ||
219 | * setlogin() affects the entire process group. We don't | ||
diff --git a/debian/patches/openbsd-docs.patch b/debian/patches/openbsd-docs.patch index f34a7f7e2..e98938c15 100644 --- a/debian/patches/openbsd-docs.patch +++ b/debian/patches/openbsd-docs.patch | |||
@@ -34,7 +34,7 @@ Index: b/ssh-keygen.1 | |||
34 | =================================================================== | 34 | =================================================================== |
35 | --- a/ssh-keygen.1 | 35 | --- a/ssh-keygen.1 |
36 | +++ b/ssh-keygen.1 | 36 | +++ b/ssh-keygen.1 |
37 | @@ -137,9 +137,7 @@ | 37 | @@ -145,9 +145,7 @@ |
38 | .Pa ~/.ssh/id_dsa | 38 | .Pa ~/.ssh/id_dsa |
39 | or | 39 | or |
40 | .Pa ~/.ssh/id_rsa . | 40 | .Pa ~/.ssh/id_rsa . |
@@ -45,7 +45,7 @@ Index: b/ssh-keygen.1 | |||
45 | .Pp | 45 | .Pp |
46 | Normally this program generates the key and asks for a file in which | 46 | Normally this program generates the key and asks for a file in which |
47 | to store the private key. | 47 | to store the private key. |
48 | @@ -282,9 +280,7 @@ | 48 | @@ -368,9 +366,7 @@ |
49 | .It Fl q | 49 | .It Fl q |
50 | Silence | 50 | Silence |
51 | .Nm ssh-keygen . | 51 | .Nm ssh-keygen . |
@@ -60,7 +60,7 @@ Index: b/ssh.1 | |||
60 | =================================================================== | 60 | =================================================================== |
61 | --- a/ssh.1 | 61 | --- a/ssh.1 |
62 | +++ b/ssh.1 | 62 | +++ b/ssh.1 |
63 | @@ -749,6 +749,10 @@ | 63 | @@ -764,6 +764,10 @@ |
64 | .Sx HISTORY | 64 | .Sx HISTORY |
65 | section of | 65 | section of |
66 | .Xr ssl 8 | 66 | .Xr ssl 8 |
@@ -75,7 +75,7 @@ Index: b/sshd.8 | |||
75 | =================================================================== | 75 | =================================================================== |
76 | --- a/sshd.8 | 76 | --- a/sshd.8 |
77 | +++ b/sshd.8 | 77 | +++ b/sshd.8 |
78 | @@ -69,7 +69,7 @@ | 78 | @@ -70,7 +70,7 @@ |
79 | .Nm | 79 | .Nm |
80 | listens for connections from clients. | 80 | listens for connections from clients. |
81 | It is normally started at boot from | 81 | It is normally started at boot from |
@@ -84,7 +84,7 @@ Index: b/sshd.8 | |||
84 | It forks a new | 84 | It forks a new |
85 | daemon for each incoming connection. | 85 | daemon for each incoming connection. |
86 | The forked daemons handle | 86 | The forked daemons handle |
87 | @@ -781,7 +781,7 @@ | 87 | @@ -838,7 +838,7 @@ |
88 | .Xr ssh 1 ) . | 88 | .Xr ssh 1 ) . |
89 | It should only be writable by root. | 89 | It should only be writable by root. |
90 | .Pp | 90 | .Pp |
@@ -93,7 +93,7 @@ Index: b/sshd.8 | |||
93 | Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange". | 93 | Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange". |
94 | The file format is described in | 94 | The file format is described in |
95 | .Xr moduli 5 . | 95 | .Xr moduli 5 . |
96 | @@ -877,7 +877,6 @@ | 96 | @@ -934,7 +934,6 @@ |
97 | .Xr ssh-vulnkey 1 , | 97 | .Xr ssh-vulnkey 1 , |
98 | .Xr chroot 2 , | 98 | .Xr chroot 2 , |
99 | .Xr hosts_access 5 , | 99 | .Xr hosts_access 5 , |
diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch index 939b9adca..b1162bfec 100644 --- a/debian/patches/package-versioning.patch +++ b/debian/patches/package-versioning.patch | |||
@@ -11,7 +11,7 @@ Index: b/sshconnect.c | |||
11 | =================================================================== | 11 | =================================================================== |
12 | --- a/sshconnect.c | 12 | --- a/sshconnect.c |
13 | +++ b/sshconnect.c | 13 | +++ b/sshconnect.c |
14 | @@ -537,7 +537,7 @@ | 14 | @@ -542,7 +542,7 @@ |
15 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", | 15 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", |
16 | compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, | 16 | compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, |
17 | compat20 ? PROTOCOL_MINOR_2 : minor1, | 17 | compat20 ? PROTOCOL_MINOR_2 : minor1, |
@@ -24,7 +24,7 @@ Index: b/sshd.c | |||
24 | =================================================================== | 24 | =================================================================== |
25 | --- a/sshd.c | 25 | --- a/sshd.c |
26 | +++ b/sshd.c | 26 | +++ b/sshd.c |
27 | @@ -426,7 +426,7 @@ | 27 | @@ -422,7 +422,7 @@ |
28 | minor = PROTOCOL_MINOR_1; | 28 | minor = PROTOCOL_MINOR_1; |
29 | } | 29 | } |
30 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, | 30 | snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, |
@@ -38,7 +38,7 @@ Index: b/version.h | |||
38 | --- a/version.h | 38 | --- a/version.h |
39 | +++ b/version.h | 39 | +++ b/version.h |
40 | @@ -3,4 +3,9 @@ | 40 | @@ -3,4 +3,9 @@ |
41 | #define SSH_VERSION "OpenSSH_5.3" | 41 | #define SSH_VERSION "OpenSSH_5.4" |
42 | 42 | ||
43 | #define SSH_PORTABLE "p1" | 43 | #define SSH_PORTABLE "p1" |
44 | -#define SSH_RELEASE SSH_VERSION SSH_PORTABLE | 44 | -#define SSH_RELEASE SSH_VERSION SSH_PORTABLE |
diff --git a/debian/patches/quieter-signals.patch b/debian/patches/quieter-signals.patch index 79bbfe7a9..572a6e67c 100644 --- a/debian/patches/quieter-signals.patch +++ b/debian/patches/quieter-signals.patch | |||
@@ -16,7 +16,7 @@ Index: b/clientloop.c | |||
16 | =================================================================== | 16 | =================================================================== |
17 | --- a/clientloop.c | 17 | --- a/clientloop.c |
18 | +++ b/clientloop.c | 18 | +++ b/clientloop.c |
19 | @@ -1526,8 +1526,10 @@ | 19 | @@ -1529,8 +1529,10 @@ |
20 | exit_status = 0; | 20 | exit_status = 0; |
21 | } | 21 | } |
22 | 22 | ||
diff --git a/debian/patches/selinux-autoconf.patch b/debian/patches/selinux-autoconf.patch deleted file mode 100644 index 9ac4cd435..000000000 --- a/debian/patches/selinux-autoconf.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | Description: Fix seusers detection at configure time | ||
2 | configure didn't add -lselinux to LIBS before it checked for the existence | ||
3 | of getseuserbyname and get_default_context_with_level. This resulted in | ||
4 | seusers configuration not being handled correctly. Most policies use the | ||
5 | seusers feature, and without it login security contexts will not be | ||
6 | correct. | ||
7 | Author: Caleb Case <calebcase@gmail.com> | ||
8 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1713 | ||
9 | Bug-Debian: http://bugs.debian.org/465614 | ||
10 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/188136 | ||
11 | Reviewed-by: Colin Watson <cjwatson@debian.org> | ||
12 | Last-Update: 2010-02-27 | ||
13 | |||
14 | Index: b/configure | ||
15 | =================================================================== | ||
16 | --- a/configure | ||
17 | +++ b/configure | ||
18 | @@ -28011,6 +28011,8 @@ | ||
19 | $as_echo "$ac_cv_lib_selinux_setexeccon" >&6; } | ||
20 | if test $ac_cv_lib_selinux_setexeccon = yes; then | ||
21 | LIBSELINUX="-lselinux" | ||
22 | + LIBS="$LIBS -lselinux" | ||
23 | + | ||
24 | else | ||
25 | { { $as_echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5 | ||
26 | $as_echo "$as_me: error: SELinux support requires libselinux library" >&2;} | ||
27 | Index: b/configure.ac | ||
28 | =================================================================== | ||
29 | --- a/configure.ac | ||
30 | +++ b/configure.ac | ||
31 | @@ -3422,9 +3422,12 @@ | ||
32 | AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) | ||
33 | SELINUX_MSG="yes" | ||
34 | AC_CHECK_HEADER([selinux/selinux.h], , | ||
35 | - AC_MSG_ERROR(SELinux support requires selinux.h header)) | ||
36 | - AC_CHECK_LIB(selinux, setexeccon, [ LIBSELINUX="-lselinux" ], | ||
37 | - AC_MSG_ERROR(SELinux support requires libselinux library)) | ||
38 | + AC_MSG_ERROR(SELinux support requires selinux.h header)) | ||
39 | + AC_CHECK_LIB(selinux, setexeccon, | ||
40 | + [ LIBSELINUX="-lselinux" | ||
41 | + LIBS="$LIBS -lselinux" | ||
42 | + ], | ||
43 | + AC_MSG_ERROR(SELinux support requires libselinux library)) | ||
44 | SSHDLIBS="$SSHDLIBS $LIBSELINUX" | ||
45 | AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) | ||
46 | LIBS="$save_LIBS" | ||
diff --git a/debian/patches/selinux-fix-chroot-directory.patch b/debian/patches/selinux-fix-chroot-directory.patch index 7b3fdac1a..03942392b 100644 --- a/debian/patches/selinux-fix-chroot-directory.patch +++ b/debian/patches/selinux-fix-chroot-directory.patch | |||
@@ -12,9 +12,9 @@ Index: b/session.c | |||
12 | =================================================================== | 12 | =================================================================== |
13 | --- a/session.c | 13 | --- a/session.c |
14 | +++ b/session.c | 14 | +++ b/session.c |
15 | @@ -1522,6 +1522,10 @@ | 15 | @@ -1551,6 +1551,10 @@ |
16 | # endif /* USE_LIBIAF */ | 16 | } |
17 | #endif | 17 | #endif /* HAVE_SETPCRED */ |
18 | 18 | ||
19 | +#ifdef WITH_SELINUX | 19 | +#ifdef WITH_SELINUX |
20 | + ssh_selinux_setup_exec_context(pw->pw_name); | 20 | + ssh_selinux_setup_exec_context(pw->pw_name); |
@@ -23,7 +23,7 @@ Index: b/session.c | |||
23 | if (options.chroot_directory != NULL && | 23 | if (options.chroot_directory != NULL && |
24 | strcasecmp(options.chroot_directory, "none") != 0) { | 24 | strcasecmp(options.chroot_directory, "none") != 0) { |
25 | tmp = tilde_expand_filename(options.chroot_directory, | 25 | tmp = tilde_expand_filename(options.chroot_directory, |
26 | @@ -1550,10 +1554,6 @@ | 26 | @@ -1575,10 +1579,6 @@ |
27 | 27 | ||
28 | if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) | 28 | if (getuid() != pw->pw_uid || geteuid() != pw->pw_uid) |
29 | fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); | 29 | fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); |
diff --git a/debian/patches/selinux-role.patch b/debian/patches/selinux-role.patch index ab343b083..8a7e7c687 100644 --- a/debian/patches/selinux-role.patch +++ b/debian/patches/selinux-role.patch | |||
@@ -186,7 +186,7 @@ Index: b/monitor_wrap.c | |||
186 | { | 186 | { |
187 | Buffer m; | 187 | Buffer m; |
188 | 188 | ||
189 | @@ -291,11 +291,29 @@ | 189 | @@ -291,12 +291,30 @@ |
190 | buffer_init(&m); | 190 | buffer_init(&m); |
191 | buffer_put_cstring(&m, service); | 191 | buffer_put_cstring(&m, service); |
192 | buffer_put_cstring(&m, style ? style : ""); | 192 | buffer_put_cstring(&m, style ? style : ""); |
@@ -196,7 +196,7 @@ Index: b/monitor_wrap.c | |||
196 | 196 | ||
197 | buffer_free(&m); | 197 | buffer_free(&m); |
198 | } | 198 | } |
199 | + | 199 | |
200 | +/* Inform the privileged process about role */ | 200 | +/* Inform the privileged process about role */ |
201 | + | 201 | + |
202 | +void | 202 | +void |
@@ -213,9 +213,10 @@ Index: b/monitor_wrap.c | |||
213 | + | 213 | + |
214 | + buffer_free(&m); | 214 | + buffer_free(&m); |
215 | +} | 215 | +} |
216 | 216 | + | |
217 | /* Do the password authentication */ | 217 | /* Do the password authentication */ |
218 | int | 218 | int |
219 | mm_auth_password(Authctxt *authctxt, char *password) | ||
219 | Index: b/monitor_wrap.h | 220 | Index: b/monitor_wrap.h |
220 | =================================================================== | 221 | =================================================================== |
221 | --- a/monitor_wrap.h | 222 | --- a/monitor_wrap.h |
@@ -234,20 +235,20 @@ Index: b/openbsd-compat/port-linux.c | |||
234 | =================================================================== | 235 | =================================================================== |
235 | --- a/openbsd-compat/port-linux.c | 236 | --- a/openbsd-compat/port-linux.c |
236 | +++ b/openbsd-compat/port-linux.c | 237 | +++ b/openbsd-compat/port-linux.c |
237 | @@ -28,6 +28,12 @@ | 238 | @@ -29,6 +29,12 @@ |
238 | #include <string.h> | 239 | #include <string.h> |
240 | #include <stdio.h> | ||
239 | 241 | ||
240 | #ifdef WITH_SELINUX | 242 | +#ifdef WITH_SELINUX |
241 | +#include "key.h" | 243 | +#include "key.h" |
242 | +#include "hostfile.h" | 244 | +#include "hostfile.h" |
243 | +#include "auth.h" | 245 | +#include "auth.h" |
244 | +#ifdef HAVE_GETSEUSERBYNAME | ||
245 | +#include "xmalloc.h" | ||
246 | +#endif | 246 | +#endif |
247 | + | ||
247 | #include "log.h" | 248 | #include "log.h" |
249 | #include "xmalloc.h" | ||
248 | #include "port-linux.h" | 250 | #include "port-linux.h" |
249 | 251 | @@ -38,6 +44,8 @@ | |
250 | @@ -35,6 +41,8 @@ | ||
251 | #include <selinux/flask.h> | 252 | #include <selinux/flask.h> |
252 | #include <selinux/get_context_list.h> | 253 | #include <selinux/get_context_list.h> |
253 | 254 | ||
@@ -256,7 +257,7 @@ Index: b/openbsd-compat/port-linux.c | |||
256 | /* Wrapper around is_selinux_enabled() to log its return value once only */ | 257 | /* Wrapper around is_selinux_enabled() to log its return value once only */ |
257 | int | 258 | int |
258 | ssh_selinux_enabled(void) | 259 | ssh_selinux_enabled(void) |
259 | @@ -53,8 +61,8 @@ | 260 | @@ -56,8 +64,8 @@ |
260 | static security_context_t | 261 | static security_context_t |
261 | ssh_selinux_getctxbyname(char *pwname) | 262 | ssh_selinux_getctxbyname(char *pwname) |
262 | { | 263 | { |
@@ -267,7 +268,7 @@ Index: b/openbsd-compat/port-linux.c | |||
267 | int r; | 268 | int r; |
268 | 269 | ||
269 | #ifdef HAVE_GETSEUSERBYNAME | 270 | #ifdef HAVE_GETSEUSERBYNAME |
270 | @@ -64,11 +72,20 @@ | 271 | @@ -67,11 +75,20 @@ |
271 | sename = pwname; | 272 | sename = pwname; |
272 | lvl = NULL; | 273 | lvl = NULL; |
273 | #endif | 274 | #endif |
diff --git a/debian/patches/series b/debian/patches/series index 7f410e363..aaee184ee 100644 --- a/debian/patches/series +++ b/debian/patches/series | |||
@@ -4,12 +4,8 @@ gssapi-autoconf.patch | |||
4 | gssapi-compat.patch | 4 | gssapi-compat.patch |
5 | gssapi-dump.patch | 5 | gssapi-dump.patch |
6 | 6 | ||
7 | # Autotools | ||
8 | config-guess-sub.patch | ||
9 | |||
10 | # SELinux | 7 | # SELinux |
11 | selinux-role.patch | 8 | selinux-role.patch |
12 | selinux-autoconf.patch | ||
13 | selinux-fix-chroot-directory.patch | 9 | selinux-fix-chroot-directory.patch |
14 | 10 | ||
15 | # Key blacklisting | 11 | # Key blacklisting |
@@ -19,15 +15,10 @@ ssh-vulnkey.patch | |||
19 | ssh1-keepalive.patch | 15 | ssh1-keepalive.patch |
20 | keepalive-extensions.patch | 16 | keepalive-extensions.patch |
21 | 17 | ||
22 | # Linux OOM handling | ||
23 | oom-adjust.patch | ||
24 | |||
25 | # Message adjustments | 18 | # Message adjustments |
26 | syslog-level-silent.patch | 19 | syslog-level-silent.patch |
27 | quieter-signals.patch | 20 | quieter-signals.patch |
28 | helpful-wait-terminate.patch | 21 | helpful-wait-terminate.patch |
29 | banner-noslash.patch | ||
30 | keyfile-debug.patch | ||
31 | 22 | ||
32 | # Miscellaneous bug fixes | 23 | # Miscellaneous bug fixes |
33 | gnome-ssh-askpass2-link.patch | 24 | gnome-ssh-askpass2-link.patch |
@@ -37,8 +28,6 @@ scp-quoting.patch | |||
37 | shell-path.patch | 28 | shell-path.patch |
38 | ssh-copy-id-status-check.patch | 29 | ssh-copy-id-status-check.patch |
39 | ssh-copy-id-trailing-colons.patch | 30 | ssh-copy-id-trailing-colons.patch |
40 | no-constraint-fallback.patch | ||
41 | sshd-ignore-sighup.patch | ||
42 | 31 | ||
43 | # Versioning | 32 | # Versioning |
44 | package-versioning.patch | 33 | package-versioning.patch |
diff --git a/debian/patches/shell-path.patch b/debian/patches/shell-path.patch index cd1bafe83..ddae43a45 100644 --- a/debian/patches/shell-path.patch +++ b/debian/patches/shell-path.patch | |||
@@ -10,7 +10,7 @@ Index: b/sshconnect.c | |||
10 | =================================================================== | 10 | =================================================================== |
11 | --- a/sshconnect.c | 11 | --- a/sshconnect.c |
12 | +++ b/sshconnect.c | 12 | +++ b/sshconnect.c |
13 | @@ -139,7 +139,7 @@ | 13 | @@ -141,7 +141,7 @@ |
14 | 14 | ||
15 | /* Execute the proxy command. Note that we gave up any | 15 | /* Execute the proxy command. Note that we gave up any |
16 | extra privileges above. */ | 16 | extra privileges above. */ |
@@ -19,7 +19,7 @@ Index: b/sshconnect.c | |||
19 | perror(argv[0]); | 19 | perror(argv[0]); |
20 | exit(1); | 20 | exit(1); |
21 | } | 21 | } |
22 | @@ -1167,7 +1167,7 @@ | 22 | @@ -1243,7 +1243,7 @@ |
23 | pid = fork(); | 23 | pid = fork(); |
24 | if (pid == 0) { | 24 | if (pid == 0) { |
25 | debug3("Executing %s -c \"%s\"", shell, args); | 25 | debug3("Executing %s -c \"%s\"", shell, args); |
diff --git a/debian/patches/ssh-argv0.patch b/debian/patches/ssh-argv0.patch index 4fd544b3f..c0b747e84 100644 --- a/debian/patches/ssh-argv0.patch +++ b/debian/patches/ssh-argv0.patch | |||
@@ -11,7 +11,7 @@ Index: b/ssh.1 | |||
11 | =================================================================== | 11 | =================================================================== |
12 | --- a/ssh.1 | 12 | --- a/ssh.1 |
13 | +++ b/ssh.1 | 13 | +++ b/ssh.1 |
14 | @@ -1405,6 +1405,7 @@ | 14 | @@ -1432,6 +1432,7 @@ |
15 | .Xr sftp 1 , | 15 | .Xr sftp 1 , |
16 | .Xr ssh-add 1 , | 16 | .Xr ssh-add 1 , |
17 | .Xr ssh-agent 1 , | 17 | .Xr ssh-agent 1 , |
diff --git a/debian/patches/ssh-vulnkey.patch b/debian/patches/ssh-vulnkey.patch index a0396a6eb..c2842a4cf 100644 --- a/debian/patches/ssh-vulnkey.patch +++ b/debian/patches/ssh-vulnkey.patch | |||
@@ -14,16 +14,16 @@ Index: b/Makefile.in | |||
14 | =================================================================== | 14 | =================================================================== |
15 | --- a/Makefile.in | 15 | --- a/Makefile.in |
16 | +++ b/Makefile.in | 16 | +++ b/Makefile.in |
17 | @@ -26,6 +26,7 @@ | 17 | @@ -27,6 +27,7 @@ |
18 | SFTP_SERVER=$(libexecdir)/sftp-server | ||
19 | SSH_KEYSIGN=$(libexecdir)/ssh-keysign | 18 | SSH_KEYSIGN=$(libexecdir)/ssh-keysign |
19 | SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper | ||
20 | RAND_HELPER=$(libexecdir)/ssh-rand-helper | 20 | RAND_HELPER=$(libexecdir)/ssh-rand-helper |
21 | +SSH_DATADIR=$(datadir)/ssh | 21 | +SSH_DATADIR=$(datadir)/ssh |
22 | PRIVSEP_PATH=@PRIVSEP_PATH@ | 22 | PRIVSEP_PATH=@PRIVSEP_PATH@ |
23 | SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ | 23 | SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ |
24 | STRIP_OPT=@STRIP_OPT@ | 24 | STRIP_OPT=@STRIP_OPT@ |
25 | @@ -37,7 +38,8 @@ | 25 | @@ -39,7 +40,8 @@ |
26 | -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ | 26 | -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \ |
27 | -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ | 27 | -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ |
28 | -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ | 28 | -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ |
29 | - -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" | 29 | - -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" |
@@ -32,27 +32,27 @@ Index: b/Makefile.in | |||
32 | 32 | ||
33 | CC=@CC@ | 33 | CC=@CC@ |
34 | LD=@LD@ | 34 | LD=@LD@ |
35 | @@ -60,7 +62,7 @@ | 35 | @@ -62,7 +64,7 @@ |
36 | INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ | 36 | INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ |
37 | INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ | 37 | INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ |
38 | 38 | ||
39 | -TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) | 39 | -TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) |
40 | +TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT) | 40 | +TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT) |
41 | 41 | ||
42 | LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \ | 42 | LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \ |
43 | canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ | 43 | canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ |
44 | @@ -91,8 +93,8 @@ | 44 | @@ -93,8 +95,8 @@ |
45 | audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ | 45 | audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \ |
46 | roaming_common.o | 46 | roaming_common.o roaming_serv.o |
47 | 47 | ||
48 | -MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out sshd_config.5.out ssh_config.5.out | 48 | -MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out |
49 | -MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 sshd_config.5 ssh_config.5 | 49 | -MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5 |
50 | +MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out | 50 | +MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out ssh-pkcs11-helper.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out |
51 | +MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5 | 51 | +MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 ssh-pkcs11-helper.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5 |
52 | MANTYPE = @MANTYPE@ | 52 | MANTYPE = @MANTYPE@ |
53 | 53 | ||
54 | CONFIGFILES=sshd_config.out ssh_config.out moduli.out | 54 | CONFIGFILES=sshd_config.out ssh_config.out moduli.out |
55 | @@ -169,6 +171,9 @@ | 55 | @@ -174,6 +176,9 @@ |
56 | ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o | 56 | ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o |
57 | $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | 57 | $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) |
58 | 58 | ||
@@ -62,23 +62,23 @@ Index: b/Makefile.in | |||
62 | # test driver for the loginrec code - not built by default | 62 | # test driver for the loginrec code - not built by default |
63 | logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o | 63 | logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o |
64 | $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) | 64 | $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) |
65 | @@ -268,6 +273,7 @@ | 65 | @@ -269,6 +274,7 @@ |
66 | $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN) | 66 | $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper $(DESTDIR)$(SSH_PKCS11_HELPER) |
67 | $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp | 67 | $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp |
68 | $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER) | 68 | $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER) |
69 | + $(INSTALL) -m 0755 $(STRIP_OPT) ssh-vulnkey $(DESTDIR)$(bindir)/ssh-vulnkey | 69 | + $(INSTALL) -m 0755 $(STRIP_OPT) ssh-vulnkey $(DESTDIR)$(bindir)/ssh-vulnkey |
70 | $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 | 70 | $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 |
71 | $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 | 71 | $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 |
72 | $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 | 72 | $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 |
73 | @@ -284,6 +290,7 @@ | 73 | @@ -286,6 +292,7 @@ |
74 | $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 | ||
75 | $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 | 74 | $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 |
76 | $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 | 75 | $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 |
76 | $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 | ||
77 | + $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 | 77 | + $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 |
78 | -rm -f $(DESTDIR)$(bindir)/slogin | 78 | -rm -f $(DESTDIR)$(bindir)/slogin |
79 | ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin | 79 | ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin |
80 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 | 80 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 |
81 | @@ -365,6 +372,7 @@ | 81 | @@ -367,6 +374,7 @@ |
82 | -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) | 82 | -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) |
83 | -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) | 83 | -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) |
84 | -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) | 84 | -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) |
@@ -86,7 +86,7 @@ Index: b/Makefile.in | |||
86 | -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT) | 86 | -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT) |
87 | -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) | 87 | -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) |
88 | -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) | 88 | -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) |
89 | @@ -377,6 +385,7 @@ | 89 | @@ -380,6 +388,7 @@ |
90 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 | 90 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 |
91 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 | 91 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 |
92 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 | 92 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 |
@@ -98,30 +98,28 @@ Index: b/auth-rh-rsa.c | |||
98 | =================================================================== | 98 | =================================================================== |
99 | --- a/auth-rh-rsa.c | 99 | --- a/auth-rh-rsa.c |
100 | +++ b/auth-rh-rsa.c | 100 | +++ b/auth-rh-rsa.c |
101 | @@ -44,6 +44,9 @@ | 101 | @@ -44,7 +44,7 @@ |
102 | { | 102 | { |
103 | HostStatus host_status; | 103 | HostStatus host_status; |
104 | 104 | ||
105 | + if (reject_blacklisted_key(client_host_key, 0) == 1) | 105 | - if (auth_key_is_revoked(client_host_key)) |
106 | + return 0; | 106 | + if (auth_key_is_revoked(client_host_key, 0)) |
107 | + | ||
108 | /* Check if we would accept it using rhosts authentication. */ | ||
109 | if (!auth_rhosts(pw, cuser)) | ||
110 | return 0; | 107 | return 0; |
108 | |||
109 | /* Check if we would accept it using rhosts authentication. */ | ||
111 | Index: b/auth-rsa.c | 110 | Index: b/auth-rsa.c |
112 | =================================================================== | 111 | =================================================================== |
113 | --- a/auth-rsa.c | 112 | --- a/auth-rsa.c |
114 | +++ b/auth-rsa.c | 113 | +++ b/auth-rsa.c |
115 | @@ -246,6 +246,9 @@ | 114 | @@ -94,7 +94,7 @@ |
116 | "actual %d vs. announced %d.", | 115 | MD5_CTX md; |
117 | file, linenum, BN_num_bits(key->rsa->n), bits); | 116 | int len; |
118 | 117 | ||
119 | + if (reject_blacklisted_key(key, 0) == 1) | 118 | - if (auth_key_is_revoked(key)) |
120 | + continue; | 119 | + if (auth_key_is_revoked(key, 0)) |
121 | + | 120 | return 0; |
122 | /* We have found the desired key. */ | 121 | |
123 | /* | 122 | /* don't allow short keys */ |
124 | * If our options do not allow this key to be used, | ||
125 | Index: b/auth.c | 123 | Index: b/auth.c |
126 | =================================================================== | 124 | =================================================================== |
127 | --- a/auth.c | 125 | --- a/auth.c |
@@ -134,91 +132,86 @@ Index: b/auth.c | |||
134 | #include "auth.h" | 132 | #include "auth.h" |
135 | #include "auth-options.h" | 133 | #include "auth-options.h" |
136 | #include "canohost.h" | 134 | #include "canohost.h" |
137 | @@ -398,6 +399,38 @@ | 135 | @@ -593,10 +594,34 @@ |
138 | return host_status; | ||
139 | } | ||
140 | 136 | ||
141 | +int | 137 | /* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */ |
142 | +reject_blacklisted_key(Key *key, int hostkey) | 138 | int |
143 | +{ | 139 | -auth_key_is_revoked(Key *key) |
144 | + char *fp; | 140 | +auth_key_is_revoked(Key *key, int hostkey) |
145 | + | 141 | { |
146 | + if (blacklisted_key(key, &fp) != 1) | 142 | char *key_fp; |
147 | + return 0; | 143 | |
148 | + | 144 | + if (blacklisted_key(key, &key_fp) == 1) { |
149 | + if (options.permit_blacklisted_keys) { | 145 | + if (options.permit_blacklisted_keys) { |
150 | + if (hostkey) | 146 | + if (hostkey) |
151 | + error("Host key %s blacklisted (see " | 147 | + error("Host key %s blacklisted (see " |
152 | + "ssh-vulnkey(1)); continuing anyway", fp); | 148 | + "ssh-vulnkey(1)); continuing anyway", |
153 | + else | 149 | + key_fp); |
154 | + logit("Public key %s from %s blacklisted (see " | 150 | + else |
155 | + "ssh-vulnkey(1)); continuing anyway", | 151 | + logit("Public key %s from %s blacklisted (see " |
156 | + fp, get_remote_ipaddr()); | 152 | + "ssh-vulnkey(1)); continuing anyway", |
157 | + xfree(fp); | 153 | + key_fp, get_remote_ipaddr()); |
158 | + } else { | 154 | + xfree(key_fp); |
159 | + if (hostkey) | 155 | + } else { |
160 | + error("Host key %s blacklisted (see " | 156 | + if (hostkey) |
161 | + "ssh-vulnkey(1))", fp); | 157 | + error("Host key %s blacklisted (see " |
162 | + else | 158 | + "ssh-vulnkey(1))", key_fp); |
163 | + logit("Public key %s from %s blacklisted (see " | 159 | + else |
164 | + "ssh-vulnkey(1))", | 160 | + logit("Public key %s from %s blacklisted (see " |
165 | + fp, get_remote_ipaddr()); | 161 | + "ssh-vulnkey(1))", |
166 | + xfree(fp); | 162 | + key_fp, get_remote_ipaddr()); |
167 | + return 1; | 163 | + xfree(key_fp); |
164 | + return 1; | ||
165 | + } | ||
168 | + } | 166 | + } |
169 | + | 167 | + |
170 | + return 0; | 168 | if (options.revoked_keys_file == NULL) |
171 | +} | 169 | return 0; |
172 | + | ||
173 | 170 | ||
174 | /* | ||
175 | * Check a given file for security. This is defined as all components | ||
176 | Index: b/auth.h | 171 | Index: b/auth.h |
177 | =================================================================== | 172 | =================================================================== |
178 | --- a/auth.h | 173 | --- a/auth.h |
179 | +++ b/auth.h | 174 | +++ b/auth.h |
180 | @@ -178,6 +178,8 @@ | 175 | @@ -173,7 +173,7 @@ |
181 | check_key_in_hostfiles(struct passwd *, Key *, const char *, | 176 | char *authorized_keys_file2(struct passwd *); |
182 | const char *, const char *); | ||
183 | 177 | ||
184 | +int reject_blacklisted_key(Key *, int); | 178 | FILE *auth_openkeyfile(const char *, struct passwd *, int); |
185 | + | 179 | -int auth_key_is_revoked(Key *); |
186 | /* hostkey handling */ | 180 | +int auth_key_is_revoked(Key *, int); |
187 | Key *get_hostkey_by_index(int); | 181 | |
188 | Key *get_hostkey_by_type(int); | 182 | HostStatus |
183 | check_key_in_hostfiles(struct passwd *, Key *, const char *, | ||
189 | Index: b/auth2-hostbased.c | 184 | Index: b/auth2-hostbased.c |
190 | =================================================================== | 185 | =================================================================== |
191 | --- a/auth2-hostbased.c | 186 | --- a/auth2-hostbased.c |
192 | +++ b/auth2-hostbased.c | 187 | +++ b/auth2-hostbased.c |
193 | @@ -145,6 +145,9 @@ | 188 | @@ -145,7 +145,7 @@ |
194 | HostStatus host_status; | 189 | HostStatus host_status; |
195 | int len; | 190 | int len; |
196 | 191 | ||
197 | + if (reject_blacklisted_key(key, 0) == 1) | 192 | - if (auth_key_is_revoked(key)) |
198 | + return 0; | 193 | + if (auth_key_is_revoked(key, 0)) |
199 | + | 194 | return 0; |
200 | resolvedname = get_canonical_hostname(options.use_dns); | ||
201 | ipaddr = get_remote_ipaddr(); | ||
202 | 195 | ||
196 | resolvedname = get_canonical_hostname(options.use_dns); | ||
203 | Index: b/auth2-pubkey.c | 197 | Index: b/auth2-pubkey.c |
204 | =================================================================== | 198 | =================================================================== |
205 | --- a/auth2-pubkey.c | 199 | --- a/auth2-pubkey.c |
206 | +++ b/auth2-pubkey.c | 200 | +++ b/auth2-pubkey.c |
207 | @@ -254,6 +254,9 @@ | 201 | @@ -325,7 +325,7 @@ |
208 | int success; | 202 | int success; |
209 | char *file; | 203 | char *file; |
210 | 204 | ||
211 | + if (reject_blacklisted_key(key, 0) == 1) | 205 | - if (auth_key_is_revoked(key)) |
212 | + return 0; | 206 | + if (auth_key_is_revoked(key, 0)) |
213 | + | 207 | return 0; |
214 | file = authorized_keys_file(pw); | 208 | if (key_is_cert(key) && auth_key_is_revoked(key->cert->signature_key)) |
215 | success = user_key_allowed2(pw, key, file); | 209 | return 0; |
216 | xfree(file); | ||
217 | Index: b/authfile.c | 210 | Index: b/authfile.c |
218 | =================================================================== | 211 | =================================================================== |
219 | --- a/authfile.c | 212 | --- a/authfile.c |
220 | +++ b/authfile.c | 213 | +++ b/authfile.c |
221 | @@ -65,6 +65,7 @@ | 214 | @@ -68,6 +68,7 @@ |
222 | #include "rsa.h" | 215 | #include "rsa.h" |
223 | #include "misc.h" | 216 | #include "misc.h" |
224 | #include "atomicio.h" | 217 | #include "atomicio.h" |
@@ -226,11 +219,10 @@ Index: b/authfile.c | |||
226 | 219 | ||
227 | /* Version identification string for SSH v1 identity files. */ | 220 | /* Version identification string for SSH v1 identity files. */ |
228 | static const char authfile_id_string[] = | 221 | static const char authfile_id_string[] = |
229 | @@ -677,3 +678,140 @@ | 222 | @@ -754,3 +755,140 @@ |
230 | key_free(pub); | 223 | return ret; |
231 | return NULL; | ||
232 | } | 224 | } |
233 | + | 225 | |
234 | +/* Scan a blacklist of known-vulnerable keys in blacklist_file. */ | 226 | +/* Scan a blacklist of known-vulnerable keys in blacklist_file. */ |
235 | +static int | 227 | +static int |
236 | +blacklisted_key_in_file(const Key *key, const char *blacklist_file, char **fp) | 228 | +blacklisted_key_in_file(const Key *key, const char *blacklist_file, char **fp) |
@@ -367,13 +359,14 @@ Index: b/authfile.c | |||
367 | + key_free(public); | 359 | + key_free(public); |
368 | + return ret; | 360 | + return ret; |
369 | +} | 361 | +} |
362 | + | ||
370 | Index: b/authfile.h | 363 | Index: b/authfile.h |
371 | =================================================================== | 364 | =================================================================== |
372 | --- a/authfile.h | 365 | --- a/authfile.h |
373 | +++ b/authfile.h | 366 | +++ b/authfile.h |
374 | @@ -23,4 +23,6 @@ | 367 | @@ -24,4 +24,6 @@ |
375 | Key *key_load_private_pem(int, int, const char *, char **); | ||
376 | int key_perm_ok(int, const char *); | 368 | int key_perm_ok(int, const char *); |
369 | int key_in_file(Key *, const char *, int); | ||
377 | 370 | ||
378 | +int blacklisted_key(const Key *key, char **fp); | 371 | +int blacklisted_key(const Key *key, char **fp); |
379 | + | 372 | + |
@@ -412,7 +405,7 @@ Index: b/readconf.c | |||
412 | oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, | 405 | oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
413 | oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, | 406 | oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, |
414 | + oUseBlacklistedKeys, | 407 | + oUseBlacklistedKeys, |
415 | oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, | 408 | oHostKeyAlgorithms, oBindAddress, oPKCS11Provider, |
416 | oClearAllForwardings, oNoHostAuthenticationForLocalhost, | 409 | oClearAllForwardings, oNoHostAuthenticationForLocalhost, |
417 | oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, | 410 | oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, |
418 | @@ -152,6 +153,7 @@ | 411 | @@ -152,6 +153,7 @@ |
@@ -423,7 +416,7 @@ Index: b/readconf.c | |||
423 | { "rsaauthentication", oRSAAuthentication }, | 416 | { "rsaauthentication", oRSAAuthentication }, |
424 | { "pubkeyauthentication", oPubkeyAuthentication }, | 417 | { "pubkeyauthentication", oPubkeyAuthentication }, |
425 | { "dsaauthentication", oPubkeyAuthentication }, /* alias */ | 418 | { "dsaauthentication", oPubkeyAuthentication }, /* alias */ |
426 | @@ -459,6 +461,10 @@ | 419 | @@ -461,6 +463,10 @@ |
427 | intptr = &options->challenge_response_authentication; | 420 | intptr = &options->challenge_response_authentication; |
428 | goto parse_flag; | 421 | goto parse_flag; |
429 | 422 | ||
@@ -434,7 +427,7 @@ Index: b/readconf.c | |||
434 | case oGssAuthentication: | 427 | case oGssAuthentication: |
435 | intptr = &options->gss_authentication; | 428 | intptr = &options->gss_authentication; |
436 | goto parse_flag; | 429 | goto parse_flag; |
437 | @@ -1048,6 +1054,7 @@ | 430 | @@ -1050,6 +1056,7 @@ |
438 | options->kbd_interactive_devices = NULL; | 431 | options->kbd_interactive_devices = NULL; |
439 | options->rhosts_rsa_authentication = -1; | 432 | options->rhosts_rsa_authentication = -1; |
440 | options->hostbased_authentication = -1; | 433 | options->hostbased_authentication = -1; |
@@ -442,7 +435,7 @@ Index: b/readconf.c | |||
442 | options->batch_mode = -1; | 435 | options->batch_mode = -1; |
443 | options->check_host_ip = -1; | 436 | options->check_host_ip = -1; |
444 | options->strict_host_key_checking = -1; | 437 | options->strict_host_key_checking = -1; |
445 | @@ -1150,6 +1157,8 @@ | 438 | @@ -1152,6 +1159,8 @@ |
446 | options->rhosts_rsa_authentication = 0; | 439 | options->rhosts_rsa_authentication = 0; |
447 | if (options->hostbased_authentication == -1) | 440 | if (options->hostbased_authentication == -1) |
448 | options->hostbased_authentication = 0; | 441 | options->hostbased_authentication = 0; |
@@ -467,7 +460,7 @@ Index: b/servconf.c | |||
467 | =================================================================== | 460 | =================================================================== |
468 | --- a/servconf.c | 461 | --- a/servconf.c |
469 | +++ b/servconf.c | 462 | +++ b/servconf.c |
470 | @@ -99,6 +99,7 @@ | 463 | @@ -100,6 +100,7 @@ |
471 | options->password_authentication = -1; | 464 | options->password_authentication = -1; |
472 | options->kbd_interactive_authentication = -1; | 465 | options->kbd_interactive_authentication = -1; |
473 | options->challenge_response_authentication = -1; | 466 | options->challenge_response_authentication = -1; |
@@ -475,7 +468,7 @@ Index: b/servconf.c | |||
475 | options->permit_empty_passwd = -1; | 468 | options->permit_empty_passwd = -1; |
476 | options->permit_user_env = -1; | 469 | options->permit_user_env = -1; |
477 | options->use_login = -1; | 470 | options->use_login = -1; |
478 | @@ -227,6 +228,8 @@ | 471 | @@ -231,6 +232,8 @@ |
479 | options->kbd_interactive_authentication = 0; | 472 | options->kbd_interactive_authentication = 0; |
480 | if (options->challenge_response_authentication == -1) | 473 | if (options->challenge_response_authentication == -1) |
481 | options->challenge_response_authentication = 1; | 474 | options->challenge_response_authentication = 1; |
@@ -484,7 +477,7 @@ Index: b/servconf.c | |||
484 | if (options->permit_empty_passwd == -1) | 477 | if (options->permit_empty_passwd == -1) |
485 | options->permit_empty_passwd = 0; | 478 | options->permit_empty_passwd = 0; |
486 | if (options->permit_user_env == -1) | 479 | if (options->permit_user_env == -1) |
487 | @@ -302,7 +305,7 @@ | 480 | @@ -306,7 +309,7 @@ |
488 | sListenAddress, sAddressFamily, | 481 | sListenAddress, sAddressFamily, |
489 | sPrintMotd, sPrintLastLog, sIgnoreRhosts, | 482 | sPrintMotd, sPrintLastLog, sIgnoreRhosts, |
490 | sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, | 483 | sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, |
@@ -493,7 +486,7 @@ Index: b/servconf.c | |||
493 | sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, | 486 | sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, |
494 | sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, | 487 | sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, |
495 | sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, | 488 | sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, |
496 | @@ -410,6 +413,7 @@ | 489 | @@ -415,6 +418,7 @@ |
497 | { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, | 490 | { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, |
498 | { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, | 491 | { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, |
499 | { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, | 492 | { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, |
@@ -501,7 +494,7 @@ Index: b/servconf.c | |||
501 | { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL }, | 494 | { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL }, |
502 | { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, | 495 | { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, |
503 | { "uselogin", sUseLogin, SSHCFG_GLOBAL }, | 496 | { "uselogin", sUseLogin, SSHCFG_GLOBAL }, |
504 | @@ -976,6 +980,10 @@ | 497 | @@ -1010,6 +1014,10 @@ |
505 | intptr = &options->tcp_keep_alive; | 498 | intptr = &options->tcp_keep_alive; |
506 | goto parse_flag; | 499 | goto parse_flag; |
507 | 500 | ||
@@ -512,7 +505,7 @@ Index: b/servconf.c | |||
512 | case sEmptyPasswd: | 505 | case sEmptyPasswd: |
513 | intptr = &options->permit_empty_passwd; | 506 | intptr = &options->permit_empty_passwd; |
514 | goto parse_flag; | 507 | goto parse_flag; |
515 | @@ -1644,6 +1652,7 @@ | 508 | @@ -1688,6 +1696,7 @@ |
516 | dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); | 509 | dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); |
517 | dump_cfg_fmtint(sStrictModes, o->strict_modes); | 510 | dump_cfg_fmtint(sStrictModes, o->strict_modes); |
518 | dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); | 511 | dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); |
@@ -524,7 +517,7 @@ Index: b/servconf.h | |||
524 | =================================================================== | 517 | =================================================================== |
525 | --- a/servconf.h | 518 | --- a/servconf.h |
526 | +++ b/servconf.h | 519 | +++ b/servconf.h |
527 | @@ -101,6 +101,7 @@ | 520 | @@ -104,6 +104,7 @@ |
528 | int challenge_response_authentication; | 521 | int challenge_response_authentication; |
529 | int zero_knowledge_password_authentication; | 522 | int zero_knowledge_password_authentication; |
530 | /* If true, permit jpake auth */ | 523 | /* If true, permit jpake auth */ |
@@ -536,7 +529,7 @@ Index: b/ssh-add.1 | |||
536 | =================================================================== | 529 | =================================================================== |
537 | --- a/ssh-add.1 | 530 | --- a/ssh-add.1 |
538 | +++ b/ssh-add.1 | 531 | +++ b/ssh-add.1 |
539 | @@ -75,6 +75,10 @@ | 532 | @@ -82,6 +82,10 @@ |
540 | .Nm | 533 | .Nm |
541 | to work. | 534 | to work. |
542 | .Pp | 535 | .Pp |
@@ -547,7 +540,7 @@ Index: b/ssh-add.1 | |||
547 | The options are as follows: | 540 | The options are as follows: |
548 | .Bl -tag -width Ds | 541 | .Bl -tag -width Ds |
549 | .It Fl c | 542 | .It Fl c |
550 | @@ -174,6 +178,7 @@ | 543 | @@ -182,6 +186,7 @@ |
551 | .Xr ssh 1 , | 544 | .Xr ssh 1 , |
552 | .Xr ssh-agent 1 , | 545 | .Xr ssh-agent 1 , |
553 | .Xr ssh-keygen 1 , | 546 | .Xr ssh-keygen 1 , |
@@ -562,10 +555,10 @@ Index: b/ssh-add.c | |||
562 | @@ -139,7 +139,7 @@ | 555 | @@ -139,7 +139,7 @@ |
563 | add_file(AuthenticationConnection *ac, const char *filename) | 556 | add_file(AuthenticationConnection *ac, const char *filename) |
564 | { | 557 | { |
565 | Key *private; | 558 | Key *private, *cert; |
566 | - char *comment = NULL; | 559 | - char *comment = NULL; |
567 | + char *comment = NULL, *fp; | 560 | + char *comment = NULL, *fp; |
568 | char msg[1024]; | 561 | char msg[1024], *certpath; |
569 | int fd, perms_ok, ret = -1; | 562 | int fd, perms_ok, ret = -1; |
570 | 563 | ||
571 | @@ -184,6 +184,14 @@ | 564 | @@ -184,6 +184,14 @@ |
@@ -587,7 +580,7 @@ Index: b/ssh-keygen.1 | |||
587 | =================================================================== | 580 | =================================================================== |
588 | --- a/ssh-keygen.1 | 581 | --- a/ssh-keygen.1 |
589 | +++ b/ssh-keygen.1 | 582 | +++ b/ssh-keygen.1 |
590 | @@ -451,6 +451,7 @@ | 583 | @@ -629,6 +629,7 @@ |
591 | .Xr ssh 1 , | 584 | .Xr ssh 1 , |
592 | .Xr ssh-add 1 , | 585 | .Xr ssh-add 1 , |
593 | .Xr ssh-agent 1 , | 586 | .Xr ssh-agent 1 , |
@@ -1239,7 +1232,7 @@ Index: b/ssh.1 | |||
1239 | =================================================================== | 1232 | =================================================================== |
1240 | --- a/ssh.1 | 1233 | --- a/ssh.1 |
1241 | +++ b/ssh.1 | 1234 | +++ b/ssh.1 |
1242 | @@ -1396,6 +1396,7 @@ | 1235 | @@ -1423,6 +1423,7 @@ |
1243 | .Xr ssh-agent 1 , | 1236 | .Xr ssh-agent 1 , |
1244 | .Xr ssh-keygen 1 , | 1237 | .Xr ssh-keygen 1 , |
1245 | .Xr ssh-keyscan 1 , | 1238 | .Xr ssh-keyscan 1 , |
@@ -1251,7 +1244,7 @@ Index: b/ssh.c | |||
1251 | =================================================================== | 1244 | =================================================================== |
1252 | --- a/ssh.c | 1245 | --- a/ssh.c |
1253 | +++ b/ssh.c | 1246 | +++ b/ssh.c |
1254 | @@ -1229,7 +1229,7 @@ | 1247 | @@ -1301,7 +1301,7 @@ |
1255 | static void | 1248 | static void |
1256 | load_public_identity_files(void) | 1249 | load_public_identity_files(void) |
1257 | { | 1250 | { |
@@ -1260,7 +1253,7 @@ Index: b/ssh.c | |||
1260 | char *pwdir = NULL, *pwname = NULL; | 1253 | char *pwdir = NULL, *pwname = NULL; |
1261 | int i = 0; | 1254 | int i = 0; |
1262 | Key *public; | 1255 | Key *public; |
1263 | @@ -1276,6 +1276,22 @@ | 1256 | @@ -1358,6 +1358,22 @@ |
1264 | public = key_load_public(filename, NULL); | 1257 | public = key_load_public(filename, NULL); |
1265 | debug("identity file %s type %d", filename, | 1258 | debug("identity file %s type %d", filename, |
1266 | public ? public->type : -1); | 1259 | public ? public->type : -1); |
@@ -1281,13 +1274,13 @@ Index: b/ssh.c | |||
1281 | + } | 1274 | + } |
1282 | + } | 1275 | + } |
1283 | xfree(options.identity_files[i]); | 1276 | xfree(options.identity_files[i]); |
1284 | options.identity_files[i] = filename; | 1277 | identity_files[n_ids] = filename; |
1285 | options.identity_keys[i] = public; | 1278 | identity_keys[n_ids] = public; |
1286 | Index: b/ssh_config.5 | 1279 | Index: b/ssh_config.5 |
1287 | =================================================================== | 1280 | =================================================================== |
1288 | --- a/ssh_config.5 | 1281 | --- a/ssh_config.5 |
1289 | +++ b/ssh_config.5 | 1282 | +++ b/ssh_config.5 |
1290 | @@ -1041,6 +1041,23 @@ | 1283 | @@ -1055,6 +1055,23 @@ |
1291 | .Dq any . | 1284 | .Dq any . |
1292 | The default is | 1285 | The default is |
1293 | .Dq any:any . | 1286 | .Dq any:any . |
@@ -1315,7 +1308,7 @@ Index: b/sshconnect2.c | |||
1315 | =================================================================== | 1308 | =================================================================== |
1316 | --- a/sshconnect2.c | 1309 | --- a/sshconnect2.c |
1317 | +++ b/sshconnect2.c | 1310 | +++ b/sshconnect2.c |
1318 | @@ -1392,6 +1392,8 @@ | 1311 | @@ -1418,6 +1418,8 @@ |
1319 | 1312 | ||
1320 | /* list of keys stored in the filesystem */ | 1313 | /* list of keys stored in the filesystem */ |
1321 | for (i = 0; i < options.num_identity_files; i++) { | 1314 | for (i = 0; i < options.num_identity_files; i++) { |
@@ -1324,7 +1317,7 @@ Index: b/sshconnect2.c | |||
1324 | key = options.identity_keys[i]; | 1317 | key = options.identity_keys[i]; |
1325 | if (key && key->type == KEY_RSA1) | 1318 | if (key && key->type == KEY_RSA1) |
1326 | continue; | 1319 | continue; |
1327 | @@ -1482,7 +1484,7 @@ | 1320 | @@ -1510,7 +1512,7 @@ |
1328 | if (id->key && id->key->type != KEY_RSA1) { | 1321 | if (id->key && id->key->type != KEY_RSA1) { |
1329 | debug("Offering public key: %s", id->filename); | 1322 | debug("Offering public key: %s", id->filename); |
1330 | sent = send_pubkey_test(authctxt, id); | 1323 | sent = send_pubkey_test(authctxt, id); |
@@ -1337,7 +1330,7 @@ Index: b/sshd.8 | |||
1337 | =================================================================== | 1330 | =================================================================== |
1338 | --- a/sshd.8 | 1331 | --- a/sshd.8 |
1339 | +++ b/sshd.8 | 1332 | +++ b/sshd.8 |
1340 | @@ -871,6 +871,7 @@ | 1333 | @@ -928,6 +928,7 @@ |
1341 | .Xr ssh-agent 1 , | 1334 | .Xr ssh-agent 1 , |
1342 | .Xr ssh-keygen 1 , | 1335 | .Xr ssh-keygen 1 , |
1343 | .Xr ssh-keyscan 1 , | 1336 | .Xr ssh-keyscan 1 , |
@@ -1349,11 +1342,11 @@ Index: b/sshd.c | |||
1349 | =================================================================== | 1342 | =================================================================== |
1350 | --- a/sshd.c | 1343 | --- a/sshd.c |
1351 | +++ b/sshd.c | 1344 | +++ b/sshd.c |
1352 | @@ -1518,6 +1518,11 @@ | 1345 | @@ -1564,6 +1564,11 @@ |
1353 | sensitive_data.host_keys[i] = NULL; | 1346 | sensitive_data.host_keys[i] = NULL; |
1354 | continue; | 1347 | continue; |
1355 | } | 1348 | } |
1356 | + if (reject_blacklisted_key(key, 1) == 1) { | 1349 | + if (auth_key_is_revoked(key, 1)) { |
1357 | + key_free(key); | 1350 | + key_free(key); |
1358 | + sensitive_data.host_keys[i] = NULL; | 1351 | + sensitive_data.host_keys[i] = NULL; |
1359 | + continue; | 1352 | + continue; |
@@ -1365,7 +1358,7 @@ Index: b/sshd_config.5 | |||
1365 | =================================================================== | 1358 | =================================================================== |
1366 | --- a/sshd_config.5 | 1359 | --- a/sshd_config.5 |
1367 | +++ b/sshd_config.5 | 1360 | +++ b/sshd_config.5 |
1368 | @@ -685,6 +685,20 @@ | 1361 | @@ -694,6 +694,20 @@ |
1369 | Specifies whether password authentication is allowed. | 1362 | Specifies whether password authentication is allowed. |
1370 | The default is | 1363 | The default is |
1371 | .Dq yes . | 1364 | .Dq yes . |
diff --git a/debian/patches/ssh1-keepalive.patch b/debian/patches/ssh1-keepalive.patch index c82563033..ccd9a668e 100644 --- a/debian/patches/ssh1-keepalive.patch +++ b/debian/patches/ssh1-keepalive.patch | |||
@@ -7,13 +7,20 @@ Index: b/clientloop.c | |||
7 | =================================================================== | 7 | =================================================================== |
8 | --- a/clientloop.c | 8 | --- a/clientloop.c |
9 | +++ b/clientloop.c | 9 | +++ b/clientloop.c |
10 | @@ -502,16 +502,21 @@ | 10 | @@ -507,16 +507,21 @@ |
11 | static void | 11 | static void |
12 | server_alive_check(void) | 12 | server_alive_check(void) |
13 | { | 13 | { |
14 | - if (packet_inc_alive_timeouts() > options.server_alive_count_max) { | 14 | - if (packet_inc_alive_timeouts() > options.server_alive_count_max) { |
15 | - logit("Timeout, server not responding."); | 15 | - logit("Timeout, server not responding."); |
16 | - cleanup_exit(255); | 16 | - cleanup_exit(255); |
17 | - } | ||
18 | - packet_start(SSH2_MSG_GLOBAL_REQUEST); | ||
19 | - packet_put_cstring("keepalive@openssh.com"); | ||
20 | - packet_put_char(1); /* boolean: want reply */ | ||
21 | - packet_send(); | ||
22 | - /* Insert an empty placeholder to maintain ordering */ | ||
23 | - client_register_global_confirm(NULL, NULL); | ||
17 | + if (compat20) { | 24 | + if (compat20) { |
18 | + if (packet_inc_alive_timeouts() > options.server_alive_count_max) { | 25 | + if (packet_inc_alive_timeouts() > options.server_alive_count_max) { |
19 | + logit("Timeout, server not responding."); | 26 | + logit("Timeout, server not responding."); |
@@ -28,17 +35,11 @@ Index: b/clientloop.c | |||
28 | + } else { | 35 | + } else { |
29 | + packet_send_ignore(0); | 36 | + packet_send_ignore(0); |
30 | + packet_send(); | 37 | + packet_send(); |
31 | } | 38 | + } |
32 | - packet_start(SSH2_MSG_GLOBAL_REQUEST); | ||
33 | - packet_put_cstring("keepalive@openssh.com"); | ||
34 | - packet_put_char(1); /* boolean: want reply */ | ||
35 | - packet_send(); | ||
36 | - /* Insert an empty placeholder to maintain ordering */ | ||
37 | - client_register_global_confirm(NULL, NULL); | ||
38 | } | 39 | } |
39 | 40 | ||
40 | /* | 41 | /* |
41 | @@ -572,7 +577,7 @@ | 42 | @@ -574,7 +579,7 @@ |
42 | * event pending. | 43 | * event pending. |
43 | */ | 44 | */ |
44 | 45 | ||
@@ -51,7 +52,7 @@ Index: b/ssh_config.5 | |||
51 | =================================================================== | 52 | =================================================================== |
52 | --- a/ssh_config.5 | 53 | --- a/ssh_config.5 |
53 | +++ b/ssh_config.5 | 54 | +++ b/ssh_config.5 |
54 | @@ -935,7 +935,10 @@ | 55 | @@ -956,7 +956,10 @@ |
55 | .Cm ServerAliveCountMax | 56 | .Cm ServerAliveCountMax |
56 | is left at the default, if the server becomes unresponsive, | 57 | is left at the default, if the server becomes unresponsive, |
57 | ssh will disconnect after approximately 45 seconds. | 58 | ssh will disconnect after approximately 45 seconds. |
diff --git a/debian/patches/sshd-ignore-sighup.patch b/debian/patches/sshd-ignore-sighup.patch deleted file mode 100644 index ded8bc247..000000000 --- a/debian/patches/sshd-ignore-sighup.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | Description: sshd: Ignore subsequent SIGHUPs during re-exec | ||
2 | Prevents two HUPs in quick succession from resulting in sshd dying. | ||
3 | Author: Colin Watson <cjwatson@debian.org> | ||
4 | Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1692 | ||
5 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/497781 | ||
6 | Last-Update: 2010-02-28 | ||
7 | |||
8 | Index: b/sshd.c | ||
9 | =================================================================== | ||
10 | --- a/sshd.c | ||
11 | +++ b/sshd.c | ||
12 | @@ -318,6 +318,7 @@ | ||
13 | close_listen_socks(); | ||
14 | close_startup_pipes(); | ||
15 | alarm(0); /* alarm timer persists across exec */ | ||
16 | + signal(SIGHUP, SIG_IGN); /* will be restored after exec */ | ||
17 | execv(saved_argv[0], saved_argv); | ||
18 | logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], | ||
19 | strerror(errno)); | ||
diff --git a/debian/patches/syslog-level-silent.patch b/debian/patches/syslog-level-silent.patch index 04ea64d34..3ed46c8f8 100644 --- a/debian/patches/syslog-level-silent.patch +++ b/debian/patches/syslog-level-silent.patch | |||
@@ -18,7 +18,7 @@ Index: b/clientloop.c | |||
18 | =================================================================== | 18 | =================================================================== |
19 | --- a/clientloop.c | 19 | --- a/clientloop.c |
20 | +++ b/clientloop.c | 20 | +++ b/clientloop.c |
21 | @@ -1533,7 +1533,7 @@ | 21 | @@ -1536,7 +1536,7 @@ |
22 | * In interactive mode (with pseudo tty) display a message indicating | 22 | * In interactive mode (with pseudo tty) display a message indicating |
23 | * that the connection has been closed. | 23 | * that the connection has been closed. |
24 | */ | 24 | */ |
@@ -63,20 +63,20 @@ Index: b/mux.c | |||
63 | =================================================================== | 63 | =================================================================== |
64 | --- a/mux.c | 64 | --- a/mux.c |
65 | +++ b/mux.c | 65 | +++ b/mux.c |
66 | @@ -721,7 +721,7 @@ | 66 | @@ -1553,7 +1553,7 @@ |
67 | } else | 67 | } else |
68 | debug2("Received exit status from master %d", exitval[0]); | 68 | debug2("Received exit status from master %d", exitval); |
69 | 69 | ||
70 | - if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) | 70 | - if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) |
71 | + if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) | 71 | + if (tty_flag && options.log_level > SYSLOG_LEVEL_QUIET) |
72 | fprintf(stderr, "Shared connection to %s closed.\r\n", host); | 72 | fprintf(stderr, "Shared connection to %s closed.\r\n", host); |
73 | 73 | ||
74 | exit(exitval[0]); | 74 | exit(exitval); |
75 | Index: b/sftp-server.8 | 75 | Index: b/sftp-server.8 |
76 | =================================================================== | 76 | =================================================================== |
77 | --- a/sftp-server.8 | 77 | --- a/sftp-server.8 |
78 | +++ b/sftp-server.8 | 78 | +++ b/sftp-server.8 |
79 | @@ -64,7 +64,7 @@ | 79 | @@ -74,7 +74,7 @@ |
80 | Specifies which messages will be logged by | 80 | Specifies which messages will be logged by |
81 | .Nm . | 81 | .Nm . |
82 | The possible values are: | 82 | The possible values are: |
@@ -89,7 +89,7 @@ Index: b/ssh.1 | |||
89 | =================================================================== | 89 | =================================================================== |
90 | --- a/ssh.1 | 90 | --- a/ssh.1 |
91 | +++ b/ssh.1 | 91 | +++ b/ssh.1 |
92 | @@ -500,6 +500,11 @@ | 92 | @@ -504,6 +504,11 @@ |
93 | .It Fl q | 93 | .It Fl q |
94 | Quiet mode. | 94 | Quiet mode. |
95 | Causes most warning and diagnostic messages to be suppressed. | 95 | Causes most warning and diagnostic messages to be suppressed. |
@@ -105,8 +105,8 @@ Index: b/ssh.c | |||
105 | =================================================================== | 105 | =================================================================== |
106 | --- a/ssh.c | 106 | --- a/ssh.c |
107 | +++ b/ssh.c | 107 | +++ b/ssh.c |
108 | @@ -389,7 +389,12 @@ | 108 | @@ -421,7 +421,12 @@ |
109 | } | 109 | options.exit_on_forward_failure = 1; |
110 | break; | 110 | break; |
111 | case 'q': | 111 | case 'q': |
112 | - options.log_level = SYSLOG_LEVEL_QUIET; | 112 | - options.log_level = SYSLOG_LEVEL_QUIET; |
@@ -119,7 +119,7 @@ Index: b/ssh.c | |||
119 | break; | 119 | break; |
120 | case 'e': | 120 | case 'e': |
121 | if (optarg[0] == '^' && optarg[2] == 0 && | 121 | if (optarg[0] == '^' && optarg[2] == 0 && |
122 | @@ -592,7 +597,7 @@ | 122 | @@ -624,7 +629,7 @@ |
123 | tty_flag = 0; | 123 | tty_flag = 0; |
124 | /* Do not allocate a tty if stdin is not a tty. */ | 124 | /* Do not allocate a tty if stdin is not a tty. */ |
125 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { | 125 | if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { |
@@ -132,7 +132,7 @@ Index: b/ssh_config.5 | |||
132 | =================================================================== | 132 | =================================================================== |
133 | --- a/ssh_config.5 | 133 | --- a/ssh_config.5 |
134 | +++ b/ssh_config.5 | 134 | +++ b/ssh_config.5 |
135 | @@ -685,7 +685,7 @@ | 135 | @@ -698,7 +698,7 @@ |
136 | Gives the verbosity level that is used when logging messages from | 136 | Gives the verbosity level that is used when logging messages from |
137 | .Xr ssh 1 . | 137 | .Xr ssh 1 . |
138 | The possible values are: | 138 | The possible values are: |
@@ -145,7 +145,7 @@ Index: b/sshd.8 | |||
145 | =================================================================== | 145 | =================================================================== |
146 | --- a/sshd.8 | 146 | --- a/sshd.8 |
147 | +++ b/sshd.8 | 147 | +++ b/sshd.8 |
148 | @@ -207,9 +207,12 @@ | 148 | @@ -217,9 +217,12 @@ |
149 | option override command-line ports. | 149 | option override command-line ports. |
150 | .It Fl q | 150 | .It Fl q |
151 | Quiet mode. | 151 | Quiet mode. |
@@ -163,7 +163,7 @@ Index: b/sshd.c | |||
163 | =================================================================== | 163 | =================================================================== |
164 | --- a/sshd.c | 164 | --- a/sshd.c |
165 | +++ b/sshd.c | 165 | +++ b/sshd.c |
166 | @@ -1355,7 +1355,12 @@ | 166 | @@ -1370,7 +1370,12 @@ |
167 | /* ignored */ | 167 | /* ignored */ |
168 | break; | 168 | break; |
169 | case 'q': | 169 | case 'q': |
@@ -181,7 +181,7 @@ Index: b/sshd_config.5 | |||
181 | =================================================================== | 181 | =================================================================== |
182 | --- a/sshd_config.5 | 182 | --- a/sshd_config.5 |
183 | +++ b/sshd_config.5 | 183 | +++ b/sshd_config.5 |
184 | @@ -567,7 +567,7 @@ | 184 | @@ -575,7 +575,7 @@ |
185 | Gives the verbosity level that is used when logging messages from | 185 | Gives the verbosity level that is used when logging messages from |
186 | .Xr sshd 8 . | 186 | .Xr sshd 8 . |
187 | The possible values are: | 187 | The possible values are: |
diff --git a/debian/patches/user-group-modes.patch b/debian/patches/user-group-modes.patch index c99c796f3..375a098f9 100644 --- a/debian/patches/user-group-modes.patch +++ b/debian/patches/user-group-modes.patch | |||
@@ -23,7 +23,7 @@ Index: b/readconf.c | |||
23 | 23 | ||
24 | #include "xmalloc.h" | 24 | #include "xmalloc.h" |
25 | #include "ssh.h" | 25 | #include "ssh.h" |
26 | @@ -998,11 +1000,30 @@ | 26 | @@ -1000,11 +1002,30 @@ |
27 | 27 | ||
28 | if (checkperm) { | 28 | if (checkperm) { |
29 | struct stat sb; | 29 | struct stat sb; |
@@ -60,7 +60,7 @@ Index: b/ssh.1 | |||
60 | =================================================================== | 60 | =================================================================== |
61 | --- a/ssh.1 | 61 | --- a/ssh.1 |
62 | +++ b/ssh.1 | 62 | +++ b/ssh.1 |
63 | @@ -1299,6 +1299,8 @@ | 63 | @@ -1326,6 +1326,8 @@ |
64 | .Xr ssh_config 5 . | 64 | .Xr ssh_config 5 . |
65 | Because of the potential for abuse, this file must have strict permissions: | 65 | Because of the potential for abuse, this file must have strict permissions: |
66 | read/write for the user, and not accessible by others. | 66 | read/write for the user, and not accessible by others. |
@@ -73,7 +73,7 @@ Index: b/ssh_config.5 | |||
73 | =================================================================== | 73 | =================================================================== |
74 | --- a/ssh_config.5 | 74 | --- a/ssh_config.5 |
75 | +++ b/ssh_config.5 | 75 | +++ b/ssh_config.5 |
76 | @@ -1194,6 +1194,8 @@ | 76 | @@ -1208,6 +1208,8 @@ |
77 | This file is used by the SSH client. | 77 | This file is used by the SSH client. |
78 | Because of the potential for abuse, this file must have strict permissions: | 78 | Because of the potential for abuse, this file must have strict permissions: |
79 | read/write for the user, and not accessible by others. | 79 | read/write for the user, and not accessible by others. |