upstream commit

Tweak config reparsing with host canonicalisation

Make the second pass through the config files always run when
hostname canonicalisation is enabled.

Add a "Match canonical" criteria that allows ssh_config Match
blocks to trigger only in the second config pass.

Add a -G option to ssh that causes it to parse its configuration
and dump the result to stdout, similar to "sshd -T"

Allow ssh_config Port options set in the second config parse
phase to be applied (they were being ignored).

bz#2267 bz#2286; ok markus
6 files changed
tree: 7c8bc1f0090201400383e51d84a7fda79995e513
  1. .cvsignore
  2. CREDITS
  3. INSTALL
  4. LICENCE
  5. Makefile.in
  6. OVERVIEW
  7. PROTOCOL
  8. PROTOCOL.agent
  9. PROTOCOL.certkeys
  10. PROTOCOL.chacha20poly1305
  11. PROTOCOL.key
  12. PROTOCOL.krl
  13. PROTOCOL.mux
  14. README
  15. README.dns
  16. README.platform
  17. README.privsep
  18. README.tun
  19. TODO
  20. aclocal.m4
  21. addrmatch.c
  22. atomicio.c
  23. atomicio.h
  24. audit-bsm.c
  25. audit-linux.c
  26. audit.c
  27. audit.h
  28. auth-bsdauth.c
  29. auth-chall.c
  30. auth-krb5.c
  31. auth-options.c
  32. auth-options.h
  33. auth-pam.c
  34. auth-pam.h
  35. auth-passwd.c
  36. auth-rh-rsa.c
  37. auth-rhosts.c
  38. auth-rsa.c
  39. auth-shadow.c
  40. auth-sia.c
  41. auth-sia.h
  42. auth-skey.c
  43. auth.c
  44. auth.h
  45. auth1.c
  46. auth2-chall.c
  47. auth2-gss.c
  48. auth2-hostbased.c
  49. auth2-kbdint.c
  50. auth2-none.c
  51. auth2-passwd.c
  52. auth2-pubkey.c
  53. auth2.c
  54. authfd.c
  55. authfd.h
  56. authfile.c
  57. authfile.h
  58. blocks.c
  59. bufaux.c
  60. bufbn.c
  61. bufec.c
  62. buffer.c
  63. buffer.h
  64. buildpkg.sh.in
  65. canohost.c
  66. canohost.h
  67. chacha.c
  68. chacha.h
  69. channels.c
  70. channels.h
  71. cipher-3des1.c
  72. cipher-aes.c
  73. cipher-aesctr.c
  74. cipher-aesctr.h
  75. cipher-bf1.c
  76. cipher-chachapoly.c
  77. cipher-chachapoly.h
  78. cipher-ctr.c
  79. cipher.c
  80. cipher.h
  81. cleanup.c
  82. clientloop.c
  83. clientloop.h
  84. compat.c
  85. compat.h
  86. compress.c
  87. compress.h
  88. config.guess
  89. config.sub
  90. configure.ac
  91. contrib/
  92. crc32.c
  93. crc32.h
  94. crypto_api.h
  95. deattack.c
  96. deattack.h
  97. defines.h
  98. dh.c
  99. dh.h
  100. digest-libc.c
  101. digest-openssl.c
  102. digest.h
  103. dispatch.c
  104. dispatch.h
  105. dns.c
  106. dns.h
  107. ed25519.c
  108. entropy.c
  109. entropy.h
  110. fatal.c
  111. fe25519.c
  112. fe25519.h
  113. fixalgorithms
  114. fixpaths
  115. fixprogs
  116. ge25519.c
  117. ge25519.h
  118. ge25519_base.data
  119. groupaccess.c
  120. groupaccess.h
  121. gss-genr.c
  122. gss-serv-krb5.c
  123. gss-serv.c
  124. hash.c
  125. hmac.c
  126. hmac.h
  127. hostfile.c
  128. hostfile.h
  129. includes.h
  130. install-sh
  131. kex.c
  132. kex.h
  133. kexc25519.c
  134. kexc25519c.c
  135. kexc25519s.c
  136. kexdh.c
  137. kexdhc.c
  138. kexdhs.c
  139. kexecdh.c
  140. kexecdhc.c
  141. kexecdhs.c
  142. kexgex.c
  143. kexgexc.c
  144. kexgexs.c
  145. key.c
  146. key.h
  147. krl.c
  148. krl.h
  149. log.c
  150. log.h
  151. loginrec.c
  152. loginrec.h
  153. logintest.c
  154. mac.c
  155. mac.h
  156. match.c
  157. match.h
  158. md-sha256.c
  159. md5crypt.c
  160. md5crypt.h
  161. mdoc2man.awk
  162. misc.c
  163. misc.h
  164. mkinstalldirs
  165. moduli
  166. moduli.5
  167. moduli.c
  168. monitor.c
  169. monitor.h
  170. monitor_fdpass.c
  171. monitor_fdpass.h
  172. monitor_mm.c
  173. monitor_mm.h
  174. monitor_wrap.c
  175. monitor_wrap.h
  176. msg.c
  177. msg.h
  178. mux.c
  179. myproposal.h
  180. nchan.c
  181. nchan.ms
  182. nchan2.ms
  183. openbsd-compat/
  184. openssh.xml.in
  185. opensshd.init.in
  186. packet.c
  187. packet.h
  188. pathnames.h
  189. pkcs11.h
  190. platform.c
  191. platform.h
  192. poly1305.c
  193. poly1305.h
  194. progressmeter.c
  195. progressmeter.h
  196. readconf.c
  197. readconf.h
  198. readpass.c
  199. regress/
  200. rijndael.c
  201. rijndael.h
  202. roaming.h
  203. roaming_client.c
  204. roaming_common.c
  205. roaming_dummy.c
  206. roaming_serv.c
  207. rsa.c
  208. rsa.h
  209. sandbox-capsicum.c
  210. sandbox-darwin.c
  211. sandbox-null.c
  212. sandbox-rlimit.c
  213. sandbox-seccomp-filter.c
  214. sandbox-systrace.c
  215. sc25519.c
  216. sc25519.h
  217. scard/
  218. scp.1
  219. scp.c
  220. servconf.c
  221. servconf.h
  222. serverloop.c
  223. serverloop.h
  224. session.c
  225. session.h
  226. sftp-client.c
  227. sftp-client.h
  228. sftp-common.c
  229. sftp-common.h
  230. sftp-glob.c
  231. sftp-server-main.c
  232. sftp-server.8
  233. sftp-server.c
  234. sftp.1
  235. sftp.c
  236. sftp.h
  237. smult_curve25519_ref.c
  238. ssh-add.1
  239. ssh-add.c
  240. ssh-agent.1
  241. ssh-agent.c
  242. ssh-dss.c
  243. ssh-ecdsa.c
  244. ssh-ed25519.c
  245. ssh-gss.h
  246. ssh-keygen.1
  247. ssh-keygen.c
  248. ssh-keyscan.1
  249. ssh-keyscan.c
  250. ssh-keysign.8
  251. ssh-keysign.c
  252. ssh-pkcs11-client.c
  253. ssh-pkcs11-helper.8
  254. ssh-pkcs11-helper.c
  255. ssh-pkcs11.c
  256. ssh-pkcs11.h
  257. ssh-rsa.c
  258. ssh-sandbox.h
  259. ssh.1
  260. ssh.c
  261. ssh.h
  262. ssh1.h
  263. ssh2.h
  264. ssh_config
  265. ssh_config.5
  266. sshbuf-getput-basic.c
  267. sshbuf-getput-crypto.c
  268. sshbuf-misc.c
  269. sshbuf.c
  270. sshbuf.h
  271. sshconnect.c
  272. sshconnect.h
  273. sshconnect1.c
  274. sshconnect2.c
  275. sshd.8
  276. sshd.c
  277. sshd_config
  278. sshd_config.5
  279. ssherr.c
  280. ssherr.h
  281. sshkey.c
  282. sshkey.h
  283. sshlogin.c
  284. sshlogin.h
  285. sshpty.c
  286. sshpty.h
  287. sshtty.c
  288. survey.sh.in
  289. ttymodes.c
  290. ttymodes.h
  291. uidswap.c
  292. uidswap.h
  293. umac.c
  294. umac.h
  295. uuencode.c
  296. uuencode.h
  297. verify.c
  298. version.h
  299. xmalloc.c
  300. xmalloc.h