openssl patches from below0
[openwrt/svn-archive/archive.git] / obsolete-buildroot / sources / openssh.patch
1 --- openssh-3.6.1p1/Makefile.in.orig 2003-03-20 17:34:34.000000000 -0700
2 +++ openssh-3.6.1p1/Makefile.in 2003-04-25 17:09:00.000000000 -0600
3 @@ -27,7 +27,7 @@
4 RAND_HELPER=$(libexecdir)/ssh-rand-helper
5 PRIVSEP_PATH=@PRIVSEP_PATH@
6 SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
7 -STRIP_OPT=@STRIP_OPT@
8 +STRIP_OPT=
9
10 PATHS= -DSSHDIR=\"$(sysconfdir)\" \
11 -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
12 --- openssh-3.8p1/configure.ac.orig 2004-02-23 22:47:04.000000000 -0700
13 +++ openssh-3.8p1/configure.ac 2004-03-19 01:41:47.000000000 -0700
14 @@ -481,6 +481,9 @@
15 [
16 AC_MSG_RESULT(no)
17 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
18 + ],
19 + [AC_MSG_RESULT(yes)
20 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
21 ]
22 )
23
24 @@ -632,6 +635,9 @@
25 else
26 AC_MSG_WARN([zlib version may have security problems])
27 fi
28 + ],
29 + [AC_MSG_RESULT(yes)
30 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
31 ]
32 )
33
34 @@ -696,6 +702,9 @@
35 [
36 AC_MSG_RESULT(no)
37 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME)
38 + ],
39 + [AC_MSG_RESULT(yes)
40 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
41 ]
42 )
43
44 @@ -727,6 +736,9 @@
45 [
46 AC_MSG_RESULT(no)
47 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
48 + ],
49 + [AC_MSG_RESULT(yes)
50 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
51 ])
52 fi
53 ]
54 @@ -840,7 +852,11 @@
55 ],
56 [AC_MSG_RESULT(yes)],
57 [AC_DEFINE(BROKEN_SETRESUID)
58 - AC_MSG_RESULT(not implemented)]
59 + AC_MSG_RESULT(not implemented)
60 + ],
61 + [AC_MSG_RESULT(yes)
62 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
63 + ]
64 )
65 ])
66
67 @@ -854,7 +870,11 @@
68 ],
69 [AC_MSG_RESULT(yes)],
70 [AC_DEFINE(BROKEN_SETRESGID)
71 - AC_MSG_RESULT(not implemented)]
72 + AC_MSG_RESULT(not implemented)
73 + ],
74 + [AC_MSG_RESULT(yes)
75 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
76 + ]
77 )
78 ])
79
80 @@ -890,6 +910,9 @@
81 AC_MSG_RESULT(no)
82 AC_DEFINE(BROKEN_SNPRINTF)
83 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
84 + ],
85 + [AC_MSG_RESULT(yes)
86 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
87 ]
88 )
89 fi
90 @@ -963,7 +986,10 @@
91 [
92 AC_MSG_RESULT(no)
93 AC_DEFINE(SSHD_ACQUIRES_CTTY)
94 - ]
95 + ],
96 + [AC_MSG_RESULT(yes)
97 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
98 + ]
99 )
100 fi
101
102 @@ -1096,6 +1122,10 @@
103 [
104 AC_MSG_RESULT(not found)
105 AC_MSG_ERROR(OpenSSL version header not found.)
106 + ],
107 + [
108 + ssl_header_ver="0x0090704fL (OpenSSL 0.9.7d 17 Mar 2004)"
109 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to $ssl_header_ver])
110 ]
111 )
112
113 @@ -1129,6 +1159,10 @@
114 [
115 AC_MSG_RESULT(not found)
116 AC_MSG_ERROR(OpenSSL library not found.)
117 + ],
118 + [
119 + ssl_header_ver="0x0090704fL (OpenSSL 0.9.7d 17 Mar 2004)"
120 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to $ssl_library_ver])
121 ]
122 )
123
124 @@ -1148,7 +1182,11 @@
125 AC_MSG_ERROR([Your OpenSSL headers do not match your library.
126 Check config.log for details.
127 Also see contrib/findssl.sh for help identifying header/library mismatches.])
128 - ]
129 + ],
130 + [
131 + AC_MSG_RESULT(yes)
132 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
133 + ]
134 )
135
136 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
137 @@ -1183,6 +1221,11 @@
138 # Default to use of the rand helper if OpenSSL doesn't
139 # seed itself
140 USE_RAND_HELPER=yes
141 + ],
142 + [
143 + OPENSSL_SEEDS_ITSELF=yes
144 + AC_MSG_RESULT(yes)
145 + AC_MSG_WARN([Cannot run test when crosscompiling, defaulted to yes.])
146 ]
147 )
148
149 @@ -1773,7 +1816,8 @@
150 #else
151 main() { exit(0); }
152 #endif
153 - ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
154 + ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ],
155 + [ true ]
156 )
157 fi
158
159 @@ -1893,6 +1937,7 @@
160 }
161 ],
162 [ ac_cv_have_accrights_in_msghdr="yes" ],
163 + [ ac_cv_have_accrights_in_msghdr="no" ],
164 [ ac_cv_have_accrights_in_msghdr="no" ]
165 )
166 ])
167 @@ -1917,7 +1962,8 @@
168 }
169 ],
170 [ ac_cv_have_control_in_msghdr="yes" ],
171 - [ ac_cv_have_control_in_msghdr="no" ]
172 + [ ac_cv_have_control_in_msghdr="no" ],
173 + [ ac_cv_have_control_in_msghdr="yes" ]
174 )
175 ])
176 if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
177 @@ -2229,12 +2275,9 @@
178 )
179 fi
180 fi
181 -AC_CHECK_FILE("/dev/ptc",
182 - [
183 - AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
184 - have_dev_ptc=1
185 - ]
186 -)
187 +AC_MSG_CHECKING([for "/dev/ptc"])
188 +AC_MSG_RESULT(no)
189 +have_dev_ptc=0
190
191 # Options from here on. Some of these are preset by platform above
192 AC_ARG_WITH(mantype,
193 @@ -2329,15 +2372,8 @@
194 fi
195
196 # check for /etc/default/login and use it if present.
197 -AC_ARG_ENABLE(etc-default-login,
198 - [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],,
199 -[
200 -AC_CHECK_FILE("/etc/default/login", [ external_path_file=/etc/default/login ])
201 -
202 -if test "x$external_path_file" = "x/etc/default/login"; then
203 - AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN)
204 -fi
205 -])
206 +AC_MSG_CHECKING([for "/etc/default/login"])
207 +AC_MSG_RESULT(no)
208
209 dnl BSD systems use /etc/login.conf so --with-default-path= has no effect
210 if test $ac_cv_func_login_getcapbool = "yes" -a \
211 --- openssh-3.8p1.orig/sshd_config Fri Sep 27 05:21:58 2002
212 +++ openssh-3.8p1/sshd_config Mon Mar 17 14:55:00 2003
213 @@ -89,5 +89,8 @@
214 #Banner /some/path
215 #VerifyReverseMapping no
216
217 +ClientAliveInterval 15
218 +ClientAliveCountMax 4
219 +
220 # override default of no subsystems
221 -Subsystem sftp /usr/libexec/sftp-server
222 +Subsystem sftp /usr/sbin/sftp-server
223 --- openssh-3.6.1p1/S50sshd Fri Sep 27 05:21:58 2002
224 +++ openssh-3.6.1p1/S50sshd Mon Mar 17 14:55:00 2003
225 @@ -0,0 +1,64 @@
226 +#!/bin/sh
227 +#
228 +# sshd Starts sshd.
229 +#
230 +
231 +# Make sure the ssh-keygen progam exists
232 +[ -f /usr/bin/ssh-keygen ] || exit 0
233 +
234 +# Check for the SSH1 RSA key
235 +if [ ! -f /etc/ssh_host_key ] ; then
236 + echo Generating RSA Key...
237 + /usr/bin/ssh-keygen -t rsa1 -f /etc/ssh_host_key -C '' -N ''
238 +fi
239 +
240 +# Check for the SSH2 RSA key
241 +if [ ! -f /etc/ssh_host_rsa_key ] ; then
242 + echo Generating RSA Key...
243 + /usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -C '' -N ''
244 +fi
245 +
246 +# Check for the SSH2 DSA key
247 +if [ ! -f /etc/ssh_host_dsa_key ] ; then
248 + echo Generating DSA Key...
249 + echo THIS CAN TAKE A MINUTE OR TWO DEPENDING ON YOUR PROCESSOR!
250 + echo
251 + /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N ''
252 +fi
253 +
254 +umask 077
255 +
256 +start() {
257 + echo -n "Starting sshd: "
258 + /usr/sbin/sshd
259 + touch /var/lock/sshd
260 + echo "OK"
261 +}
262 +stop() {
263 + echo -n "Stopping sshd: "
264 + killall sshd
265 + rm -f /var/lock/sshd
266 + echo "OK"
267 +}
268 +restart() {
269 + stop
270 + start
271 +}
272 +
273 +case "$1" in
274 + start)
275 + start
276 + ;;
277 + stop)
278 + stop
279 + ;;
280 + restart|reload)
281 + restart
282 + ;;
283 + *)
284 + echo $"Usage: $0 {start|stop|restart}"
285 + exit 1
286 +esac
287 +
288 +exit $?
289 +