openssh.patch 6.6 KB

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