summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-16 13:29:08 +1100
committerDamien Miller <djm@mindrot.org>2000-09-16 13:29:08 +1100
commite4340be5b3ff16f4d9ba5e3ea7e449dc1b6fa7a8 (patch)
treeaba9e2ae234edeb888b922c6a13b755c1248deea
parentf384c366d33cb435627743f7ea0ed3f966543d40 (diff)
- (djm) Merge OpenBSD changes:
- markus@cvs.openbsd.org 2000/09/05 02:59:57 [session.c] print hostname (not hushlogin) - markus@cvs.openbsd.org 2000/09/05 13:18:48 [authfile.c ssh-add.c] enable ssh-add -d for DSA keys - markus@cvs.openbsd.org 2000/09/05 13:20:49 [sftp-server.c] cleanup - markus@cvs.openbsd.org 2000/09/06 03:46:41 [authfile.h] prototype - deraadt@cvs.openbsd.org 2000/09/07 14:27:56 [ALL] cleanup copyright notices on all files. I have attempted to be accurate with the details. everything is now under Tatu's licence (which I copied from his readme), and/or the core-sdi bsd-ish thing for deattack, or various openbsd developers under a 2-term bsd licence. We're not changing any rules, just being accurate. - markus@cvs.openbsd.org 2000/09/07 14:40:30 [channels.c channels.h clientloop.c serverloop.c ssh.c] cleanup window and packet sizes for ssh2 flow control; ok niels - markus@cvs.openbsd.org 2000/09/07 14:53:00 [scp.c] typo - markus@cvs.openbsd.org 2000/09/07 15:13:37 [auth-options.c auth-options.h auth-rh-rsa.c auth-rsa.c auth.c] [authfile.h canohost.c channels.h compat.c hostfile.h log.c match.h] [pty.c readconf.c] some more Copyright fixes - markus@cvs.openbsd.org 2000/09/08 03:02:51 [README.openssh2] bye bye - deraadt@cvs.openbsd.org 2000/09/11 18:38:33 [LICENCE cipher.c] a few more comments about it being ARC4 not RC4 - markus@cvs.openbsd.org 2000/09/12 14:53:11 [log-client.c log-server.c log.c ssh.1 ssh.c ssh.h sshd.8 sshd.c] multiple debug levels - markus@cvs.openbsd.org 2000/09/14 14:25:15 [clientloop.c] typo - deraadt@cvs.openbsd.org 2000/09/15 01:13:51 [ssh-agent.c] check return value for setenv(3) for failure, and deal appropriately
-rw-r--r--ChangeLog398
-rw-r--r--atomicio.c4
-rw-r--r--auth-krb4.c25
-rw-r--r--auth-options.c17
-rw-r--r--auth-options.h12
-rw-r--r--auth-passwd.c56
-rw-r--r--auth-rh-rsa.c14
-rw-r--r--auth-rhosts.c14
-rw-r--r--auth-rsa.c14
-rw-r--r--auth-skey.c28
-rw-r--r--auth.c31
-rw-r--r--auth.h23
-rw-r--r--auth1.c8
-rw-r--r--auth2.c8
-rw-r--r--authfd.c36
-rw-r--r--authfd.h14
-rw-r--r--authfile.c92
-rw-r--r--authfile.h17
-rw-r--r--bufaux.c36
-rw-r--r--bufaux.h13
-rw-r--r--buffer.c14
-rw-r--r--buffer.h14
-rw-r--r--canohost.c14
-rw-r--r--channels.c47
-rw-r--r--channels.h45
-rw-r--r--cipher.c37
-rw-r--r--cipher.h13
-rw-r--r--clientloop.c64
-rw-r--r--compat.c9
-rw-r--r--compat.h7
-rw-r--r--compress.c14
-rw-r--r--compress.h14
-rw-r--r--crc32.c83
-rw-r--r--crc32.h14
-rw-r--r--deattack.c3
-rw-r--r--dispatch.c7
-rw-r--r--dispatch.h23
-rw-r--r--dsa.c7
-rw-r--r--dsa.h23
-rw-r--r--getput.h14
-rw-r--r--hmac.c7
-rw-r--r--hmac.h23
-rw-r--r--hostfile.c36
-rw-r--r--hostfile.h11
-rw-r--r--includes.h12
-rw-r--r--kex.c7
-rw-r--r--kex.h5
-rw-r--r--key.c21
-rw-r--r--key.h23
-rw-r--r--log-client.c43
-rw-r--r--log-server.c53
-rw-r--r--log.c59
-rw-r--r--login.c37
-rw-r--r--match.c14
-rw-r--r--match.h13
-rw-r--r--mpaux.c16
-rw-r--r--mpaux.h15
-rw-r--r--myproposal.h23
-rw-r--r--nchan.c7
-rw-r--r--nchan.h7
-rw-r--r--nchan.ms5
-rw-r--r--packet.c36
-rw-r--r--packet.h14
-rw-r--r--pty.c14
-rw-r--r--pty.h15
-rw-r--r--radix.c24
-rw-r--r--readconf.c14
-rw-r--r--readconf.h14
-rw-r--r--rsa.c49
-rw-r--r--rsa.h16
-rw-r--r--scp.c42
-rw-r--r--servconf.c14
-rw-r--r--servconf.h14
-rw-r--r--serverloop.c36
-rw-r--r--session.c38
-rw-r--r--session.h23
-rw-r--r--sftp-server.825
-rw-r--r--sftp-server.c36
-rw-r--r--ssh-add.138
-rw-r--r--ssh-add.c37
-rw-r--r--ssh-agent.142
-rw-r--r--ssh-agent.c38
-rw-r--r--ssh-keygen.138
-rw-r--r--ssh-keygen.c9
-rw-r--r--ssh.138
-rw-r--r--ssh.c61
-rw-r--r--ssh.h19
-rw-r--r--ssh2.h26
-rw-r--r--sshconnect.c9
-rw-r--r--sshconnect.h23
-rw-r--r--sshconnect1.c8
-rw-r--r--sshconnect2.c7
-rw-r--r--sshd.838
-rw-r--r--sshd.c61
-rw-r--r--tildexpand.c9
-rw-r--r--ttymodes.c9
-rw-r--r--ttymodes.h13
-rw-r--r--uidswap.c9
-rw-r--r--uidswap.h12
-rw-r--r--util.c28
-rw-r--r--uuencode.c25
-rw-r--r--uuencode.h24
-rw-r--r--xmalloc.c9
-rw-r--r--xmalloc.h12
104 files changed, 2040 insertions, 789 deletions
diff --git a/ChangeLog b/ChangeLog
index fa9b472ce..4b337ebd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,51 @@
120000916
2 - (djm) Merge OpenBSD changes:
3 - markus@cvs.openbsd.org 2000/09/05 02:59:57
4 [session.c]
5 print hostname (not hushlogin)
6 - markus@cvs.openbsd.org 2000/09/05 13:18:48
7 [authfile.c ssh-add.c]
8 enable ssh-add -d for DSA keys
9 - markus@cvs.openbsd.org 2000/09/05 13:20:49
10 [sftp-server.c]
11 cleanup
12 - markus@cvs.openbsd.org 2000/09/06 03:46:41
13 [authfile.h]
14 prototype
15 - deraadt@cvs.openbsd.org 2000/09/07 14:27:56
16 [ALL]
17 cleanup copyright notices on all files. I have attempted to be
18 accurate with the details. everything is now under Tatu's licence
19 (which I copied from his readme), and/or the core-sdi bsd-ish thing
20 for deattack, or various openbsd developers under a 2-term bsd
21 licence. We're not changing any rules, just being accurate.
22 - markus@cvs.openbsd.org 2000/09/07 14:40:30
23 [channels.c channels.h clientloop.c serverloop.c ssh.c]
24 cleanup window and packet sizes for ssh2 flow control; ok niels
25 - markus@cvs.openbsd.org 2000/09/07 14:53:00
26 [scp.c]
27 typo
28 - markus@cvs.openbsd.org 2000/09/07 15:13:37
29 [auth-options.c auth-options.h auth-rh-rsa.c auth-rsa.c auth.c]
30 [authfile.h canohost.c channels.h compat.c hostfile.h log.c match.h]
31 [pty.c readconf.c]
32 some more Copyright fixes
33 - markus@cvs.openbsd.org 2000/09/08 03:02:51
34 [README.openssh2]
35 bye bye
36 - deraadt@cvs.openbsd.org 2000/09/11 18:38:33
37 [LICENCE cipher.c]
38 a few more comments about it being ARC4 not RC4
39 - markus@cvs.openbsd.org 2000/09/12 14:53:11
40 [log-client.c log-server.c log.c ssh.1 ssh.c ssh.h sshd.8 sshd.c]
41 multiple debug levels
42 - markus@cvs.openbsd.org 2000/09/14 14:25:15
43 [clientloop.c]
44 typo
45 - deraadt@cvs.openbsd.org 2000/09/15 01:13:51
46 [ssh-agent.c]
47 check return value for setenv(3) for failure, and deal appropriately
48
120000913 4920000913
2 - (djm) Fix server not exiting with jobs in background. 50 - (djm) Fix server not exiting with jobs in background.
3 51
@@ -51,7 +99,7 @@
51 - (djm) Release 2.2.0p1 99 - (djm) Release 2.2.0p1
52 100
5320000831 10120000831
54 - (djm) Workaround SIGPIPE problems on SCO. Fix from Aran Cox 102 - (djm) Workaround SIGPIPE problems on SCO. Fix from Aran Cox
55 <acox@cv.telegroup.com> 103 <acox@cv.telegroup.com>
56 - (djm) Pick up new version (2.2.0) from OpenBSD CVS 104 - (djm) Pick up new version (2.2.0) from OpenBSD CVS
57 105
@@ -59,7 +107,7 @@
59 - (djm) Compile warning fixes from Mark Miller <markm@swoon.net> 107 - (djm) Compile warning fixes from Mark Miller <markm@swoon.net>
60 - (djm) Periodically rekey arc4random 108 - (djm) Periodically rekey arc4random
61 - (djm) Clean up diff against OpenBSD. 109 - (djm) Clean up diff against OpenBSD.
62 - (djm) HPUX 11 needs USE_PIPES as well: Kevin Steves 110 - (djm) HPUX 11 needs USE_PIPES as well: Kevin Steves
63 <stevesk@sweden.hp.com> 111 <stevesk@sweden.hp.com>
64 - (djm) Quieten the pam delete credentials error message 112 - (djm) Quieten the pam delete credentials error message
65 - (djm) Fix printing of $DISPLAY hack if set by system type. Report from 113 - (djm) Fix printing of $DISPLAY hack if set by system type. Report from
@@ -68,8 +116,8 @@
68 - (djm) Fix doh in bsd-arc4random.c 116 - (djm) Fix doh in bsd-arc4random.c
69 117
7020000829 11820000829
71 - (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert 119 - (djm) Fix ^C ignored issue on Solaris. Diagnosis from Gert
72 Doering <gert@greenie.muc.de>, John Horne <J.Horne@plymouth.ac.uk> and 120 Doering <gert@greenie.muc.de>, John Horne <J.Horne@plymouth.ac.uk> and
73 Garrick James <garrick@james.net> 121 Garrick James <garrick@james.net>
74 - (djm) Check for SCO pty naming style (ptyp%d/ttyp%d). Based on fix from 122 - (djm) Check for SCO pty naming style (ptyp%d/ttyp%d). Based on fix from
75 Bastian Trompetter <btrompetter@firemail.de> 123 Bastian Trompetter <btrompetter@firemail.de>
@@ -108,8 +156,8 @@
108 156
10920000823 15720000823
110 - (djm) Define USE_PIPES to avoid socketpair problems on HPUX 10 and SunOS 4 158 - (djm) Define USE_PIPES to avoid socketpair problems on HPUX 10 and SunOS 4
111 Avoids "scp never exits" problem. Reports from Lutz Jaenicke 159 Avoids "scp never exits" problem. Reports from Lutz Jaenicke
112 <Lutz.Jaenicke@aet.TU-Cottbus.DE> and Tamito KAJIYAMA 160 <Lutz.Jaenicke@aet.TU-Cottbus.DE> and Tamito KAJIYAMA
113 <kajiyama@grad.sccs.chukyo-u.ac.jp> 161 <kajiyama@grad.sccs.chukyo-u.ac.jp>
114 - (djm) Pick up LOGIN_PROGRAM from environment or PATH if not set by headers 162 - (djm) Pick up LOGIN_PROGRAM from environment or PATH if not set by headers
115 - (djm) Add local version to version.h 163 - (djm) Add local version to version.h
@@ -139,8 +187,8 @@
139 [crc32.h] 187 [crc32.h]
140 proper prototype 188 proper prototype
141 - markus@cvs.openbsd.org 2000/08/19 15:34:44 189 - markus@cvs.openbsd.org 2000/08/19 15:34:44
142 [authfd.c authfd.h key.c key.h ssh-add.1 ssh-add.c ssh-agent.1] 190 [authfd.c authfd.h key.c key.h ssh-add.1 ssh-add.c ssh-agent.1]
143 [ssh-agent.c ssh-keygen.c sshconnect1.c sshconnect2.c Makefile] 191 [ssh-agent.c ssh-keygen.c sshconnect1.c sshconnect2.c Makefile]
144 [fingerprint.c fingerprint.h] 192 [fingerprint.c fingerprint.h]
145 add SSH2/DSA support to the agent and some other DSA related cleanups. 193 add SSH2/DSA support to the agent and some other DSA related cleanups.
146 (note that we cannot talk to ssh.com's ssh2 agents) 194 (note that we cannot talk to ssh.com's ssh2 agents)
@@ -214,9 +262,9 @@
214 262
21520000816 26320000816
216 - (djm) Replacement for inet_ntoa for Irix (which breaks on gcc) 264 - (djm) Replacement for inet_ntoa for Irix (which breaks on gcc)
217 - (djm) Fix strerror replacement for old SunOS. Based on patch from 265 - (djm) Fix strerror replacement for old SunOS. Based on patch from
218 Charles Levert <charles@comm.polymtl.ca> 266 Charles Levert <charles@comm.polymtl.ca>
219 - (djm) Seperate arc4random into seperate file and use OpenSSL's RC4 267 - (djm) Seperate arc4random into seperate file and use OpenSSL's RC4
220 implementation. 268 implementation.
221 - (djm) SUN_LEN macro for systems which lack it 269 - (djm) SUN_LEN macro for systems which lack it
222 270
@@ -225,7 +273,7 @@
225 - (djm) Avoid failures on Irix when ssh is not setuid. Fix from 273 - (djm) Avoid failures on Irix when ssh is not setuid. Fix from
226 Michael Stone <mstone@cs.loyola.edu> 274 Michael Stone <mstone@cs.loyola.edu>
227 - (djm) Don't seek in directory based lastlogs 275 - (djm) Don't seek in directory based lastlogs
228 - (djm) Fix --with-ipaddr-display configure option test. Patch from 276 - (djm) Fix --with-ipaddr-display configure option test. Patch from
229 Jarno Huuskonen <jhuuskon@messi.uku.fi> 277 Jarno Huuskonen <jhuuskon@messi.uku.fi>
230 - (djm) Fix AIX limits from Alexandre Oliva <oliva@lsd.ic.unicamp.br> 278 - (djm) Fix AIX limits from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
231 279
@@ -234,9 +282,9 @@
234 Fabrice bacchella <fabrice.bacchella@marchfirst.fr> 282 Fabrice bacchella <fabrice.bacchella@marchfirst.fr>
235 283
23620000809 28420000809
237 - (djm) Define AIX hard limits if headers don't. Report from 285 - (djm) Define AIX hard limits if headers don't. Report from
238 Bill Painter <william.t.painter@lmco.com> 286 Bill Painter <william.t.painter@lmco.com>
239 - (djm) utmp direct write & SunOS 4 patch from Charles Levert 287 - (djm) utmp direct write & SunOS 4 patch from Charles Levert
240 <charles@comm.polymtl.ca> 288 <charles@comm.polymtl.ca>
241 289
24220000808 29020000808
@@ -315,9 +363,9 @@
315 - (djm) Fixup for AIX getuserattr() support from Tom Bertelson 363 - (djm) Fixup for AIX getuserattr() support from Tom Bertelson
316 <tbert@abac.com> 364 <tbert@abac.com>
317 - (djm) ReliantUNIX support from Udo Schweigert <ust@cert.siemens.de> 365 - (djm) ReliantUNIX support from Udo Schweigert <ust@cert.siemens.de>
318 - (djm) NeXT: dirent structures to get scp working from Ben Lindstrom 366 - (djm) NeXT: dirent structures to get scp working from Ben Lindstrom
319 <mouring@pconline.com> 367 <mouring@pconline.com>
320 - (djm) Fix broken inet_ntoa check and ut_user/ut_name confusion, report 368 - (djm) Fix broken inet_ntoa check and ut_user/ut_name confusion, report
321 from Jim Watt <jimw@peisj.pebio.com> 369 from Jim Watt <jimw@peisj.pebio.com>
322 - (djm) Replaced bsd-snprintf.c with one from Mutt source tree, it is known 370 - (djm) Replaced bsd-snprintf.c with one from Mutt source tree, it is known
323 to compile on more platforms (incl NeXT). 371 to compile on more platforms (incl NeXT).
@@ -329,7 +377,7 @@
329 cleanup, less cut&paste 377 cleanup, less cut&paste
330 - markus@cvs.openbsd.org 2000/06/26 15:59:19 378 - markus@cvs.openbsd.org 2000/06/26 15:59:19
331 [servconf.c servconf.h session.c sshd.8 sshd.c] 379 [servconf.c servconf.h session.c sshd.8 sshd.c]
332 MaxStartups: limit number of unauthenticated connections, work by 380 MaxStartups: limit number of unauthenticated connections, work by
333 theo and me 381 theo and me
334 - deraadt@cvs.openbsd.org 2000/07/05 14:18:07 382 - deraadt@cvs.openbsd.org 2000/07/05 14:18:07
335 [session.c] 383 [session.c]
@@ -339,7 +387,7 @@
339 typo 387 typo
340 - aaron@cvs.openbsd.org 2000/07/05 22:06:58 388 - aaron@cvs.openbsd.org 2000/07/05 22:06:58
341 [scp.1 ssh-agent.1 ssh-keygen.1 sshd.8] 389 [scp.1 ssh-agent.1 ssh-keygen.1 sshd.8]
342 Insert more missing .El directives. Our troff really should identify 390 Insert more missing .El directives. Our troff really should identify
343 these and spit out a warning. 391 these and spit out a warning.
344 - todd@cvs.openbsd.org 2000/07/06 21:55:04 392 - todd@cvs.openbsd.org 2000/07/06 21:55:04
345 [auth-rsa.c auth2.c ssh-keygen.c] 393 [auth-rsa.c auth2.c ssh-keygen.c]
@@ -372,7 +420,7 @@
372 Kevin Steves <stevesk@sweden.hp.com> 420 Kevin Steves <stevesk@sweden.hp.com>
373 - (djm) Match prototype and function declaration for rresvport_af. 421 - (djm) Match prototype and function declaration for rresvport_af.
374 Problem report from Niklas Edmundsson <nikke@ing.umu.se> 422 Problem report from Niklas Edmundsson <nikke@ing.umu.se>
375 - (djm) Missing $(DESTDIR) on host-key target causing problems with RPM 423 - (djm) Missing $(DESTDIR) on host-key target causing problems with RPM
376 builds. Problem report from Gregory Leblanc <GLeblanc@cu-portland.edu> 424 builds. Problem report from Gregory Leblanc <GLeblanc@cu-portland.edu>
377 - (djm) Replace ut_name with ut_user. Patch from Jim Watt 425 - (djm) Replace ut_name with ut_user. Patch from Jim Watt
378 <jimw@peisj.pebio.com> 426 <jimw@peisj.pebio.com>
@@ -382,19 +430,19 @@
382 uids. Based on problem report from Jim Watt <jimw@peisj.pebio.com> 430 uids. Based on problem report from Jim Watt <jimw@peisj.pebio.com>
383 - (djm) More NeXT compatibility from Ben Lindstrom <mouring@pconline.com> 431 - (djm) More NeXT compatibility from Ben Lindstrom <mouring@pconline.com>
384 Including sigaction() et al. replacements 432 Including sigaction() et al. replacements
385 - (djm) AIX getuserattr() session initialisation from Tom Bertelson 433 - (djm) AIX getuserattr() session initialisation from Tom Bertelson
386 <tbert@abac.com> 434 <tbert@abac.com>
387 435
38820000708 43620000708
389 - (djm) Fix bad fprintf format handling in auth-pam.c. Patch from 437 - (djm) Fix bad fprintf format handling in auth-pam.c. Patch from
390 Aaron Hopkins <aaron@die.net> 438 Aaron Hopkins <aaron@die.net>
391 - (djm) Fix incorrect configure handling of --with-rsh-path option. Fix from 439 - (djm) Fix incorrect configure handling of --with-rsh-path option. Fix from
392 Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> 440 Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
393 - (djm) Fixed undefined variables for OSF SIA. Report from 441 - (djm) Fixed undefined variables for OSF SIA. Report from
394 Baars, Henk <Hendrik.Baars@nl.origin-it.com> 442 Baars, Henk <Hendrik.Baars@nl.origin-it.com>
395 - (djm) Handle EWOULDBLOCK returns from read() and write() in atomicio.c 443 - (djm) Handle EWOULDBLOCK returns from read() and write() in atomicio.c
396 Fix from Marquess, Steve Mr JMLFDC <Steve.Marquess@DET.AMEDD.ARMY.MIL> 444 Fix from Marquess, Steve Mr JMLFDC <Steve.Marquess@DET.AMEDD.ARMY.MIL>
397 - (djm) Don't use inet_addr. 445 - (djm) Don't use inet_addr.
398 446
39920000702 44720000702
400 - (djm) Fix brace mismatch from Corinna Vinschen <vinschen@cygnus.com> 448 - (djm) Fix brace mismatch from Corinna Vinschen <vinschen@cygnus.com>
@@ -402,7 +450,7 @@
402 on fix from HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp> 450 on fix from HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
403 - (djm) Use standard OpenSSL functions in auth-skey.c. Patch from 451 - (djm) Use standard OpenSSL functions in auth-skey.c. Patch from
404 Chris, the Young One <cky@pobox.com> 452 Chris, the Young One <cky@pobox.com>
405 - (djm) Fix scp progress meter on really wide terminals. Based on patch 453 - (djm) Fix scp progress meter on really wide terminals. Based on patch
406 from James H. Cloos Jr. <cloos@jhcloos.com> 454 from James H. Cloos Jr. <cloos@jhcloos.com>
407 455
40820000701 45620000701
@@ -421,9 +469,9 @@
421 - (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for 469 - (djm) Patch from Michael Stone <mstone@cs.loyola.edu> to add support for
422 Irix 6.x array sessions, project id's, and system audit trail id. 470 Irix 6.x array sessions, project id's, and system audit trail id.
423 - (djm) Added 'distprep' make target to simplify packaging 471 - (djm) Added 'distprep' make target to simplify packaging
424 - (djm) Added patch from Chris Adams <cmadams@hiwaay.net> to add OSF SIA 472 - (djm) Added patch from Chris Adams <cmadams@hiwaay.net> to add OSF SIA
425 support. Enable using "USE_SIA=1 ./configure [options]" 473 support. Enable using "USE_SIA=1 ./configure [options]"
426 474
42720000627 47520000627
428 - (djm) Fixes to login code - not setting li->uid, cleanups 476 - (djm) Fixes to login code - not setting li->uid, cleanups
429 - (djm) Formatting 477 - (djm) Formatting
@@ -441,7 +489,7 @@
441 correct check for bad channel ids; from Wei Dai <weidai@eskimo.com> 489 correct check for bad channel ids; from Wei Dai <weidai@eskimo.com>
442 490
44320000623 49120000623
444 - (djm) Use sa_family_t in prototype for rresvport_af. Patch from 492 - (djm) Use sa_family_t in prototype for rresvport_af. Patch from
445 Svante Signell <svante.signell@telia.com> 493 Svante Signell <svante.signell@telia.com>
446 - (djm) Autoconf logic to define sa_family_t if it is missing 494 - (djm) Autoconf logic to define sa_family_t if it is missing
447 - OpenBSD CVS Updates: 495 - OpenBSD CVS Updates:
@@ -469,11 +517,11 @@
469 - markus@cvs.openbsd.org 2000/06/19 19:39:45 517 - markus@cvs.openbsd.org 2000/06/19 19:39:45
470 [atomicio.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c] 518 [atomicio.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
471 [auth-rsa.c auth-skey.c authfd.c authfd.h authfile.c bufaux.c bufaux.h] 519 [auth-rsa.c auth-skey.c authfd.c authfd.h authfile.c bufaux.c bufaux.h]
472 [buffer.c buffer.h canohost.c channels.c channels.h cipher.c cipher.h] 520 [buffer.c buffer.h canohost.c channels.c channels.h cipher.c cipher.h]
473 [clientloop.c compat.c compat.h compress.c compress.h crc32.c crc32.h] 521 [clientloop.c compat.c compat.h compress.c compress.h crc32.c crc32.h]
474 [deattack.c dispatch.c dsa.c fingerprint.c fingerprint.h getput.h hmac.c] 522 [deattack.c dispatch.c dsa.c fingerprint.c fingerprint.h getput.h hmac.c]
475 [kex.c log-client.c log-server.c login.c match.c mpaux.c mpaux.h nchan.c] 523 [kex.c log-client.c log-server.c login.c match.c mpaux.c mpaux.h nchan.c]
476 [nchan.h packet.c packet.h pty.c pty.h readconf.c readconf.h readpass.c] 524 [nchan.h packet.c packet.h pty.c pty.h readconf.c readconf.h readpass.c]
477 [rsa.c rsa.h scp.c servconf.c servconf.h ssh-add.c ssh-keygen.c ssh.c] 525 [rsa.c rsa.h scp.c servconf.c servconf.h ssh-add.c ssh-keygen.c ssh.c]
478 [ssh.h tildexpand.c ttymodes.c ttymodes.h uidswap.c xmalloc.c xmalloc.h] 526 [ssh.h tildexpand.c ttymodes.c ttymodes.h uidswap.c xmalloc.c xmalloc.h]
479 OpenBSD tag 527 OpenBSD tag
@@ -482,17 +530,17 @@
482 530
48320000620 53120000620
484 - (djm) Replace use of '-o' and '-a' logical operators in configure tests 532 - (djm) Replace use of '-o' and '-a' logical operators in configure tests
485 with '||' and '&&'. As suggested by Jim Knoble <jmknoble@pint-stowp.cx> 533 with '||' and '&&'. As suggested by Jim Knoble <jmknoble@pint-stowp.cx>
486 to fix SCO Unixware problem reported by Gary E. Miller <gem@rellim.com> 534 to fix SCO Unixware problem reported by Gary E. Miller <gem@rellim.com>
487 - (djm) Typo in loginrec.c 535 - (djm) Typo in loginrec.c
488 536
48920000618 53720000618
490 - (djm) Add summary of configure options to end of ./configure run 538 - (djm) Add summary of configure options to end of ./configure run
491 - (djm) Not all systems define RUSAGE_SELF & RUSAGE_CHILDREN. Report from 539 - (djm) Not all systems define RUSAGE_SELF & RUSAGE_CHILDREN. Report from
492 Michael Stone <mstone@cs.loyola.edu> 540 Michael Stone <mstone@cs.loyola.edu>
493 - (djm) rusage is a privileged operation on some Unices (incl. 541 - (djm) rusage is a privileged operation on some Unices (incl.
494 Solaris 2.5.1). Report from Paul D. Smith <pausmith@nortelnetworks.com> 542 Solaris 2.5.1). Report from Paul D. Smith <pausmith@nortelnetworks.com>
495 - (djm) Avoid PAM failures when running without a TTY. Report from 543 - (djm) Avoid PAM failures when running without a TTY. Report from
496 Martin Petrak <petrak@spsknm.schools.sk> 544 Martin Petrak <petrak@spsknm.schools.sk>
497 - (djm) Include sys/types.h when including netinet/in.h in configure tests. 545 - (djm) Include sys/types.h when including netinet/in.h in configure tests.
498 Patch from Jun-ichiro itojun Hagino <itojun@iijlab.net> 546 Patch from Jun-ichiro itojun Hagino <itojun@iijlab.net>
@@ -545,7 +593,7 @@
545 - Don't try to retrieve lastlog from wtmp/wtmpx if DISABLE_LASTLOG is 593 - Don't try to retrieve lastlog from wtmp/wtmpx if DISABLE_LASTLOG is
546 def'd 594 def'd
547 - Set AIX to use preformatted manpages 595 - Set AIX to use preformatted manpages
548 596
54920000610 59720000610
550 - (djm) Minor doc tweaks 598 - (djm) Minor doc tweaks
551 - (djm) Fix for configure on bash2 from Jim Knoble <jmknoble@jmknoble.cx> 599 - (djm) Fix for configure on bash2 from Jim Knoble <jmknoble@jmknoble.cx>
@@ -557,11 +605,11 @@
55720000606 60520000606
558 - (djm) Cleanup of entropy.c. Reorganised code, removed second pass through 606 - (djm) Cleanup of entropy.c. Reorganised code, removed second pass through
559 list of commands (by default). Removed verbose debugging (by default). 607 list of commands (by default). Removed verbose debugging (by default).
560 - (djm) Increased command entropy estimates and default entropy collection 608 - (djm) Increased command entropy estimates and default entropy collection
561 timeout 609 timeout
562 - (djm) Remove duplicate headers from loginrec.c 610 - (djm) Remove duplicate headers from loginrec.c
563 - (djm) Don't add /usr/local/lib to library search path on Irix 611 - (djm) Don't add /usr/local/lib to library search path on Irix
564 - (djm) Fix rsh path in RPMs. Report from Jason L Tibbitts III 612 - (djm) Fix rsh path in RPMs. Report from Jason L Tibbitts III
565 <tibbs@math.uh.edu> 613 <tibbs@math.uh.edu>
566 - (djm) Warn user if grabs fail in GNOME askpass. Patch from Zack Weinberg 614 - (djm) Warn user if grabs fail in GNOME askpass. Patch from Zack Weinberg
567 <zack@wolery.cumb.org> 615 <zack@wolery.cumb.org>
@@ -571,7 +619,7 @@
571 teach protocol v2 to count login failures properly and also enable an 619 teach protocol v2 to count login failures properly and also enable an
572 explanation of why the password prompt comes up again like v1; this is NOT 620 explanation of why the password prompt comes up again like v1; this is NOT
573 crypto 621 crypto
574 - markus@cvs.openbsd.org 622 - markus@cvs.openbsd.org
575 [readconf.c readconf.h servconf.c servconf.h session.c ssh.1 ssh.c sshd.8] 623 [readconf.c readconf.h servconf.c servconf.h session.c ssh.1 ssh.c sshd.8]
576 xauth_location support; pr 1234 624 xauth_location support; pr 1234
577 [readconf.c sshconnect2.c] 625 [readconf.c sshconnect2.c]
@@ -584,14 +632,14 @@
584 [version.h] 632 [version.h]
585 OpenSSH 2.1.1 633 OpenSSH 2.1.1
586 [auth-rsa.c] 634 [auth-rsa.c]
587 fix match_hostname() logic for auth-rsa: deny access if we have a 635 fix match_hostname() logic for auth-rsa: deny access if we have a
588 negative match or no match at all 636 negative match or no match at all
589 [channels.c hostfile.c match.c] 637 [channels.c hostfile.c match.c]
590 don't panic if mkdtemp fails for authfwd; jkb@yahoo-inc.com via 638 don't panic if mkdtemp fails for authfwd; jkb@yahoo-inc.com via
591 kris@FreeBSD.org 639 kris@FreeBSD.org
592 640
59320000606 64120000606
594 - (djm) Added --with-cflags, --with-ldflags and --with-libs options to 642 - (djm) Added --with-cflags, --with-ldflags and --with-libs options to
595 configure. 643 configure.
596 644
59720000604 64520000604
@@ -602,7 +650,7 @@
602 - (andre) New login code 650 - (andre) New login code
603 - Remove bsd-login.[ch] and all the OpenBSD-derived code in login.c 651 - Remove bsd-login.[ch] and all the OpenBSD-derived code in login.c
604 - Add loginrec.[ch], logintest.c and autoconf code 652 - Add loginrec.[ch], logintest.c and autoconf code
605 653
60620000531 65420000531
607 - Cleanup of auth.c, login.c and fake-* 655 - Cleanup of auth.c, login.c and fake-*
608 - Cleanup of auth-pam.c, save and print "account expired" error messages 656 - Cleanup of auth-pam.c, save and print "account expired" error messages
@@ -638,9 +686,9 @@
638 - Don't touch utmp if USE_UTMPX defined 686 - Don't touch utmp if USE_UTMPX defined
639 - SunOS 4.x support from Todd C. Miller <Todd.Miller@courtesan.com> 687 - SunOS 4.x support from Todd C. Miller <Todd.Miller@courtesan.com>
640 - SIGCHLD fix for AIX and HPUX from Tom Bertelson <tbert@abac.com> 688 - SIGCHLD fix for AIX and HPUX from Tom Bertelson <tbert@abac.com>
641 - HPUX and Configure fixes from Lutz Jaenicke 689 - HPUX and Configure fixes from Lutz Jaenicke
642 <Lutz.Jaenicke@aet.TU-Cottbus.DE> 690 <Lutz.Jaenicke@aet.TU-Cottbus.DE>
643 - Use mkinstalldirs script to make directories instead of non-portable 691 - Use mkinstalldirs script to make directories instead of non-portable
644 "install -d". Suggested by Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE> 692 "install -d". Suggested by Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
645 - Doc cleanup 693 - Doc cleanup
646 694
@@ -651,7 +699,7 @@
651 [sshconnect.c] 699 [sshconnect.c]
652 copy only ai_addrlen bytes; misiek@pld.org.pl 700 copy only ai_addrlen bytes; misiek@pld.org.pl
653 [auth.c] 701 [auth.c]
654 accept an empty shell in authentication; bug reported by 702 accept an empty shell in authentication; bug reported by
655 chris@tinker.ucr.edu 703 chris@tinker.ucr.edu
656 [serverloop.c] 704 [serverloop.c]
657 we don't have stderr for interactive terminal sessions (fcntl errors) 705 we don't have stderr for interactive terminal sessions (fcntl errors)
@@ -669,10 +717,10 @@
669 optionally run 'ent' to measure command entropy 717 optionally run 'ent' to measure command entropy
670 - Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix 718 - Applied Tom Bertelson's <tbert@abac.com> AIX authentication fix
671 - Avoid WCOREDUMP complation errors for systems that lack it 719 - Avoid WCOREDUMP complation errors for systems that lack it
672 - Avoid SIGCHLD warnings from entropy commands 720 - Avoid SIGCHLD warnings from entropy commands
673 - Fix HAVE_PAM_GETENVLIST setting from Simon Wilkinson <sxw@dcs.ed.ac.uk> 721 - Fix HAVE_PAM_GETENVLIST setting from Simon Wilkinson <sxw@dcs.ed.ac.uk>
674 - OpenBSD CVS update: 722 - OpenBSD CVS update:
675 - markus@cvs.openbsd.org 723 - markus@cvs.openbsd.org
676 [ssh.c] 724 [ssh.c]
677 fix usage() 725 fix usage()
678 [ssh2.h] 726 [ssh2.h]
@@ -687,19 +735,19 @@
687 - INSTALL typo and URL fix 735 - INSTALL typo and URL fix
688 - Makefile fix 736 - Makefile fix
689 - Solaris fixes 737 - Solaris fixes
690 - Checking for ssize_t and memmove. Based on patch from SAKAI Kiyotaka 738 - Checking for ssize_t and memmove. Based on patch from SAKAI Kiyotaka
691 <ksakai@kso.netwk.ntt-at.co.jp> 739 <ksakai@kso.netwk.ntt-at.co.jp>
692 - RSAless operation patch from kevin_oconnor@standardandpoors.com 740 - RSAless operation patch from kevin_oconnor@standardandpoors.com
693 - Detect OpenSSL seperatly from RSA 741 - Detect OpenSSL seperatly from RSA
694 - Better test for RSA (more compatible with RSAref). Based on work by 742 - Better test for RSA (more compatible with RSAref). Based on work by
695 Ed Eden <ede370@stl.rural.usda.gov> 743 Ed Eden <ede370@stl.rural.usda.gov>
696 744
69720000513 74520000513
698 - Fix for non-recognised DSA keys from Arkadiusz Miskiewicz 746 - Fix for non-recognised DSA keys from Arkadiusz Miskiewicz
699 <misiek@pld.org.pl> 747 <misiek@pld.org.pl>
700 748
70120000511 74920000511
702 - Fix for prng_seed permissions checking from Lutz Jaenicke 750 - Fix for prng_seed permissions checking from Lutz Jaenicke
703 <Lutz.Jaenicke@aet.TU-Cottbus.DE> 751 <Lutz.Jaenicke@aet.TU-Cottbus.DE>
704 - "make host-key" fix for Irix 752 - "make host-key" fix for Irix
705 753
@@ -728,7 +776,7 @@
728 - OpenSSH-2.1 776 - OpenSSH-2.1
729 - Moved all the bsd-* and fake-* stuff into new libopenbsd-compat.a 777 - Moved all the bsd-* and fake-* stuff into new libopenbsd-compat.a
730 - Doc updates 778 - Doc updates
731 - Cleanup of bsd-base64 headers, bugfix definitions of __b64_*. Reported 779 - Cleanup of bsd-base64 headers, bugfix definitions of __b64_*. Reported
732 by Andre Lucas <andre.lucas@dial.pipex.com> 780 by Andre Lucas <andre.lucas@dial.pipex.com>
733 781
73420000508 78220000508
@@ -742,7 +790,7 @@
742 - interop w/ SecureFX 790 - interop w/ SecureFX
743 - Release 2.0.0beta2 791 - Release 2.0.0beta2
744 792
745 - Configure caching and cleanup patch from Andre Lucas' 793 - Configure caching and cleanup patch from Andre Lucas'
746 <andre.lucas@dial.pipex.com> 794 <andre.lucas@dial.pipex.com>
747 795
74820000507 79620000507
@@ -760,7 +808,7 @@
760 - deraadt@cvs.openbsd.org 808 - deraadt@cvs.openbsd.org
761 [scp.c] 809 [scp.c]
762 - more atomicio 810 - more atomicio
763 - markus@cvs.openbsd.org 811 - markus@cvs.openbsd.org
764 [channels.c] 812 [channels.c]
765 - set O_NONBLOCK 813 - set O_NONBLOCK
766 [ssh.1] 814 [ssh.1]
@@ -778,7 +826,7 @@
778 - document -X and -x 826 - document -X and -x
779 [ssh-keygen.c] 827 [ssh-keygen.c]
780 - simplify usage 828 - simplify usage
781 - markus@cvs.openbsd.org 829 - markus@cvs.openbsd.org
782 [sshd.8] 830 [sshd.8]
783 - there is no rhosts_dsa 831 - there is no rhosts_dsa
784 [ssh-keygen.1] 832 [ssh-keygen.1]
@@ -828,7 +876,7 @@
828 - unlink pid file, ok niels@ 876 - unlink pid file, ok niels@
829 [auth2.c] 877 [auth2.c]
830 - Add missing #ifdefs; ok - markus 878 - Add missing #ifdefs; ok - markus
831 - Add Andre Lucas' <andre.lucas@dial.pipex.com> patch to read entropy 879 - Add Andre Lucas' <andre.lucas@dial.pipex.com> patch to read entropy
832 gathering commands from a text file 880 gathering commands from a text file
833 - Release 2.0.0beta1 881 - Release 2.0.0beta1
834 882
@@ -846,9 +894,9 @@
846 - Minor tweaks and typo fixes. 894 - Minor tweaks and typo fixes.
847 [ssh-keygen.c] 895 [ssh-keygen.c]
848 - Put -d into usage and reorder. markus ok. 896 - Put -d into usage and reorder. markus ok.
849 - Include missing headers for OpenSSL tests. Fix from Phil Karn 897 - Include missing headers for OpenSSL tests. Fix from Phil Karn
850 <karn@ka9q.ampr.org> 898 <karn@ka9q.ampr.org>
851 - Fixed __progname symbol collisions reported by Andre Lucas 899 - Fixed __progname symbol collisions reported by Andre Lucas
852 <andre.lucas@dial.pipex.com> 900 <andre.lucas@dial.pipex.com>
853 - Merged bsd-login ttyslot and AIX utmp patch from Gert Doering 901 - Merged bsd-login ttyslot and AIX utmp patch from Gert Doering
854 <gd@hilb1.medat.de> 902 <gd@hilb1.medat.de>
@@ -864,7 +912,7 @@
864 - Adds timeout to entropy collection 912 - Adds timeout to entropy collection
865 - Disables slow entropy sources 913 - Disables slow entropy sources
866 - Load and save seed file 914 - Load and save seed file
867 - Changed entropy seed code to user per-user seeds only (server seed is 915 - Changed entropy seed code to user per-user seeds only (server seed is
868 saved in root's .ssh directory) 916 saved in root's .ssh directory)
869 - Use atexit() and fatal cleanups to save seed on exit 917 - Use atexit() and fatal cleanups to save seed on exit
870 - More OpenBSD updates: 918 - More OpenBSD updates:
@@ -914,7 +962,7 @@
914 [sshconnect2.c] 962 [sshconnect2.c]
915 - less debug, respect .ssh/config 963 - less debug, respect .ssh/config
916 [README.openssh2 channels.c channels.h] 964 [README.openssh2 channels.c channels.h]
917 - clientloop.c session.c ssh.c 965 - clientloop.c session.c ssh.c
918 - support for x11-fwding, client+server 966 - support for x11-fwding, client+server
919 967
92020000421 96820000421
@@ -924,11 +972,11 @@
924 via Debian bug #59926 972 via Debian bug #59926
925 - Define __progname in session.c if libc doesn't 973 - Define __progname in session.c if libc doesn't
926 - Remove indentation on autoconf #include statements to avoid bug in 974 - Remove indentation on autoconf #include statements to avoid bug in
927 DEC Tru64 compiler. Report and fix from David Del Piero 975 DEC Tru64 compiler. Report and fix from David Del Piero
928 <David.DelPiero@qed.qld.gov.au> 976 <David.DelPiero@qed.qld.gov.au>
929 977
93020000420 97820000420
931 - Make fixpaths work with perl4, patch from Andre Lucas 979 - Make fixpaths work with perl4, patch from Andre Lucas
932 <andre.lucas@dial.pipex.com> 980 <andre.lucas@dial.pipex.com>
933 - Sync with OpenBSD CVS: 981 - Sync with OpenBSD CVS:
934 [clientloop.c login.c serverloop.c ssh-agent.c ssh.h sshconnect.c sshd.c] 982 [clientloop.c login.c serverloop.c ssh-agent.c ssh.h sshconnect.c sshd.c]
@@ -948,7 +996,7 @@
948 [channels.c] 996 [channels.c]
949 - fix pr 1196, listen_port and port_to_connect interchanged 997 - fix pr 1196, listen_port and port_to_connect interchanged
950 [scp.c] 998 [scp.c]
951 - after completion, replace the progress bar ETA counter with a final 999 - after completion, replace the progress bar ETA counter with a final
952 elapsed time; my idea, aaron wrote the patch 1000 elapsed time; my idea, aaron wrote the patch
953 [ssh_config sshd_config] 1001 [ssh_config sshd_config]
954 - show 'Protocol' as an example, ok markus@ 1002 - show 'Protocol' as an example, ok markus@
@@ -958,7 +1006,7 @@
958 1006
95920000416 100720000416
960 - Reduce diff against OpenBSD source 1008 - Reduce diff against OpenBSD source
961 - All OpenSSL includes are now unconditionally referenced as 1009 - All OpenSSL includes are now unconditionally referenced as
962 openssl/foo.h 1010 openssl/foo.h
963 - Pick up formatting changes 1011 - Pick up formatting changes
964 - Other minor changed (typecasts, etc) that I missed 1012 - Other minor changed (typecasts, etc) that I missed
@@ -976,7 +1024,7 @@
97620000413 102420000413
977 - INSTALL doc updates 1025 - INSTALL doc updates
978 - Merged OpenBSD updates to include paths. 1026 - Merged OpenBSD updates to include paths.
979 1027
98020000412 102820000412
981 - OpenBSD CVS updates: 1029 - OpenBSD CVS updates:
982 - [channels.c] 1030 - [channels.c]
@@ -1007,7 +1055,7 @@
1007 no adjust after close 1055 no adjust after close
1008 - [sshd.c compat.c ] 1056 - [sshd.c compat.c ]
1009 interop w/ latest ssh.com windows client. 1057 interop w/ latest ssh.com windows client.
1010 1058
101120000406 105920000406
1012 - OpenBSD CVS update: 1060 - OpenBSD CVS update:
1013 - [channels.c] 1061 - [channels.c]
@@ -1075,7 +1123,7 @@
1075 1123
107620000326 112420000326
1077 - Better tests for OpenSSL w/ RSAref 1125 - Better tests for OpenSSL w/ RSAref
1078 - Added replacement setenv() function from OpenBSD libc. Suggested by 1126 - Added replacement setenv() function from OpenBSD libc. Suggested by
1079 Ben Lindstrom <mouring@pconline.com> 1127 Ben Lindstrom <mouring@pconline.com>
1080 - OpenBSD CVS update 1128 - OpenBSD CVS update
1081 - [auth-krb4.c] 1129 - [auth-krb4.c]
@@ -1103,17 +1151,17 @@
1103 - Checks for 64 bit int types. Problem report from Mats Fredholm 1151 - Checks for 64 bit int types. Problem report from Mats Fredholm
1104 <matsf@init.se> 1152 <matsf@init.se>
1105 - OpenBSD CVS updates: 1153 - OpenBSD CVS updates:
1106 - [atomicio.c auth-krb4.c bufaux.c channels.c compress.c fingerprint.c] 1154 - [atomicio.c auth-krb4.c bufaux.c channels.c compress.c fingerprint.c]
1107 [packet.h radix.c rsa.c scp.c ssh-agent.c ssh-keygen.c sshconnect.c] 1155 [packet.h radix.c rsa.c scp.c ssh-agent.c ssh-keygen.c sshconnect.c]
1108 [sshd.c] 1156 [sshd.c]
1109 pedantic: signed vs. unsigned, void*-arithm, etc 1157 pedantic: signed vs. unsigned, void*-arithm, etc
1110 - [ssh.1 sshd.8] 1158 - [ssh.1 sshd.8]
1111 Various cleanups and standardizations. 1159 Various cleanups and standardizations.
1112 - Runtime error fix for HPUX from Otmar Stahl 1160 - Runtime error fix for HPUX from Otmar Stahl
1113 <O.Stahl@lsw.uni-heidelberg.de> 1161 <O.Stahl@lsw.uni-heidelberg.de>
1114 1162
111520000316 116320000316
1116 - Fixed configure not passing LDFLAGS to Solaris. Report from David G. 1164 - Fixed configure not passing LDFLAGS to Solaris. Report from David G.
1117 Hesprich <dghespri@sprintparanet.com> 1165 Hesprich <dghespri@sprintparanet.com>
1118 - Propogate LD through to Makefile 1166 - Propogate LD through to Makefile
1119 - Doc cleanups 1167 - Doc cleanups
@@ -1122,18 +1170,18 @@
112220000315 117020000315
1123 - Fix broken CFLAGS handling during search for OpenSSL. Fixes va_list 1171 - Fix broken CFLAGS handling during search for OpenSSL. Fixes va_list
1124 problems with gcc/Solaris. 1172 problems with gcc/Solaris.
1125 - Don't free argument to putenv() after use (in setenv() replacement). 1173 - Don't free argument to putenv() after use (in setenv() replacement).
1126 Report from Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> 1174 Report from Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp>
1127 - Created contrib/ subdirectory. Included helpers from Phil Hands' 1175 - Created contrib/ subdirectory. Included helpers from Phil Hands'
1128 Debian package, README file and chroot patch from Ricardo Cerqueira 1176 Debian package, README file and chroot patch from Ricardo Cerqueira
1129 <rmcc@clix.pt> 1177 <rmcc@clix.pt>
1130 - Moved gnome-ssh-askpass.c to contrib directory and removed config 1178 - Moved gnome-ssh-askpass.c to contrib directory and removed config
1131 option. 1179 option.
1132 - Slight cleanup to doc files 1180 - Slight cleanup to doc files
1133 - Configure fix from Bratislav ILICH <bilic@zepter.ru> 1181 - Configure fix from Bratislav ILICH <bilic@zepter.ru>
1134 1182
113520000314 118320000314
1136 - Include macro for IN6_IS_ADDR_V4MAPPED. Report from 1184 - Include macro for IN6_IS_ADDR_V4MAPPED. Report from
1137 peter@frontierflying.com 1185 peter@frontierflying.com
1138 - Include /usr/local/include and /usr/local/lib for systems that don't 1186 - Include /usr/local/include and /usr/local/lib for systems that don't
1139 do it themselves 1187 do it themselves
@@ -1168,7 +1216,7 @@
1168 - use getpeername() in packet_connection_is_on_socket(), fixes sshd -i; 1216 - use getpeername() in packet_connection_is_on_socket(), fixes sshd -i;
1169 from Holger.Trapp@Informatik.TU-Chemnitz.DE 1217 from Holger.Trapp@Informatik.TU-Chemnitz.DE
1170 [pty.c pty.h] 1218 [pty.c pty.h]
1171 - register cleanup for pty earlier. move code for pty-owner handling to 1219 - register cleanup for pty earlier. move code for pty-owner handling to
1172 pty.c ok provos@, dugsong@ 1220 pty.c ok provos@, dugsong@
1173 [readconf.c] 1221 [readconf.c]
1174 - turn off x11-fwd for the client, too. 1222 - turn off x11-fwd for the client, too.
@@ -1204,13 +1252,13 @@
1204 - missing xfree() 1252 - missing xfree()
1205 - move XAUTHORITY to subdir. ok dugsong@. fixes debian bug #57907, too. 1253 - move XAUTHORITY to subdir. ok dugsong@. fixes debian bug #57907, too.
1206 (http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=57907) 1254 (http://cgi.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=57907)
1207 - register cleanup for pty earlier. move code for pty-owner handling to 1255 - register cleanup for pty earlier. move code for pty-owner handling to
1208 pty.c ok provos@, dugsong@ 1256 pty.c ok provos@, dugsong@
1209 - create x11 cookie file 1257 - create x11 cookie file
1210 - fix pr 1113, fclose() -> pclose(), todo: remote popen() 1258 - fix pr 1113, fclose() -> pclose(), todo: remote popen()
1211 - version 1.2.3 1259 - version 1.2.3
1212 - Cleaned up 1260 - Cleaned up
1213 - Removed warning workaround for Linux and devpts filesystems (no longer 1261 - Removed warning workaround for Linux and devpts filesystems (no longer
1214 required after OpenBSD updates) 1262 required after OpenBSD updates)
1215 1263
121620000308 126420000308
@@ -1224,13 +1272,13 @@
1224 - Explicitly seed OpenSSL's PRNG before checking rsa_alive() 1272 - Explicitly seed OpenSSL's PRNG before checking rsa_alive()
1225 - Check for getpagesize in libucb.a if not found in libc. Fix for old 1273 - Check for getpagesize in libucb.a if not found in libc. Fix for old
1226 Solaris from Andre Lucas <andre.lucas@dial.pipex.com> 1274 Solaris from Andre Lucas <andre.lucas@dial.pipex.com>
1227 - Check for libwrap if --with-tcp-wrappers option specified. Suggestion 1275 - Check for libwrap if --with-tcp-wrappers option specified. Suggestion
1228 Mate Wierdl <mw@moni.msci.memphis.edu> 1276 Mate Wierdl <mw@moni.msci.memphis.edu>
1229 1277
123020000303 127820000303
1231 - Added "make host-key" target, Suggestion from Dominik Brettnacher 1279 - Added "make host-key" target, Suggestion from Dominik Brettnacher
1232 <domi@saargate.de> 1280 <domi@saargate.de>
1233 - Don't permanently fail on bind() if getaddrinfo has more choices left for 1281 - Don't permanently fail on bind() if getaddrinfo has more choices left for
1234 us. Needed to work around messy IPv6 on Linux. Patch from Arkadiusz 1282 us. Needed to work around messy IPv6 on Linux. Patch from Arkadiusz
1235 Miskiewicz <misiek@pld.org.pl> 1283 Miskiewicz <misiek@pld.org.pl>
1236 - DEC Unix compile fix from David Del Piero <David.DelPiero@qed.qld.gov.au> 1284 - DEC Unix compile fix from David Del Piero <David.DelPiero@qed.qld.gov.au>
@@ -1245,10 +1293,10 @@
1245 RSA support built in (this is a problem with OpenSSL 0.9.5). 1293 RSA support built in (this is a problem with OpenSSL 0.9.5).
1246 - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de 1294 - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de
1247 - Avoid warning message with Unix98 ptys 1295 - Avoid warning message with Unix98 ptys
1248 - Warning was valid - possible race condition on PTYs. Avoided using 1296 - Warning was valid - possible race condition on PTYs. Avoided using
1249 platform-specific code. 1297 platform-specific code.
1250 - Document some common problems 1298 - Document some common problems
1251 - Allow root access to any key. Patch from 1299 - Allow root access to any key. Patch from
1252 markus.friedl@informatik.uni-erlangen.de 1300 markus.friedl@informatik.uni-erlangen.de
1253 1301
125420000207 130220000207
@@ -1259,10 +1307,10 @@
1259 - Add --with-ssl-dir option 1307 - Add --with-ssl-dir option
1260 1308
126120000202 130920000202
1262 - Fix lastlog code for directory based lastlogs. Fix from Josh Durham 1310 - Fix lastlog code for directory based lastlogs. Fix from Josh Durham
1263 <jmd@aoe.vt.edu> 1311 <jmd@aoe.vt.edu>
1264 - Documentation fixes from HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp> 1312 - Documentation fixes from HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
1265 - Added URLs to Japanese translations of documents by HARUYAMA Seigo 1313 - Added URLs to Japanese translations of documents by HARUYAMA Seigo
1266 <haruyama@nt.phys.s.u-tokyo.ac.jp> 1314 <haruyama@nt.phys.s.u-tokyo.ac.jp>
1267 1315
126820000201 131620000201
@@ -1277,24 +1325,24 @@
127720000126 132520000126
1278 - Released 1.2.2 stable 1326 - Released 1.2.2 stable
1279 1327
1280 - NeXT keeps it lastlog in /usr/adm. Report from 1328 - NeXT keeps it lastlog in /usr/adm. Report from
1281 mouring@newton.pconline.com 1329 mouring@newton.pconline.com
1282 - Added note in UPGRADING re interop with commercial SSH using idea. 1330 - Added note in UPGRADING re interop with commercial SSH using idea.
1283 Report from Jim Knoble <jmknoble@pobox.com> 1331 Report from Jim Knoble <jmknoble@pobox.com>
1284 - Fix linking order for Kerberos/AFS. Fix from Holget Trapp 1332 - Fix linking order for Kerberos/AFS. Fix from Holget Trapp
1285 <Holger.Trapp@Informatik.TU-Chemnitz.DE> 1333 <Holger.Trapp@Informatik.TU-Chemnitz.DE>
1286 1334
128720000125 133520000125
1288 - Fix NULL pointer dereference in login.c. Fix from Andre Lucas 1336 - Fix NULL pointer dereference in login.c. Fix from Andre Lucas
1289 <andre.lucas@dial.pipex.com> 1337 <andre.lucas@dial.pipex.com>
1290 - Reorder PAM initialisation so it does not mess up lastlog. Reported 1338 - Reorder PAM initialisation so it does not mess up lastlog. Reported
1291 by Andre Lucas <andre.lucas@dial.pipex.com> 1339 by Andre Lucas <andre.lucas@dial.pipex.com>
1292 - Use preformatted manpages on SCO, report from Gary E. Miller 1340 - Use preformatted manpages on SCO, report from Gary E. Miller
1293 <gem@rellim.com> 1341 <gem@rellim.com>
1294 - New URL for x11-ssh-askpass. 1342 - New URL for x11-ssh-askpass.
1295 - Fixpaths was missing /etc/ssh_known_hosts. Report from Jim Knoble 1343 - Fixpaths was missing /etc/ssh_known_hosts. Report from Jim Knoble
1296 <jmknoble@pobox.com> 1344 <jmknoble@pobox.com>
1297 - Added 'DESTDIR' option to Makefile to ease package building. Patch from 1345 - Added 'DESTDIR' option to Makefile to ease package building. Patch from
1298 Jim Knoble <jmknoble@pobox.com> 1346 Jim Knoble <jmknoble@pobox.com>
1299 - Updated RPM spec files to use DESTDIR 1347 - Updated RPM spec files to use DESTDIR
1300 1348
@@ -1306,7 +1354,7 @@
1306 - OpenBSD CVS: 1354 - OpenBSD CVS:
1307 - [packet.c] 1355 - [packet.c]
1308 getsockname() requires initialized tolen; andy@guildsoftware.com 1356 getsockname() requires initialized tolen; andy@guildsoftware.com
1309 - AIX patch from Matt Richards <v2matt@btv.ibm.com> and David Rankin 1357 - AIX patch from Matt Richards <v2matt@btv.ibm.com> and David Rankin
1310 <drankin@bohemians.lexington.ky.us> 1358 <drankin@bohemians.lexington.ky.us>
1311 - Fix lastlog support, patch from Andre Lucas <andre.lucas@dial.pipex.com> 1359 - Fix lastlog support, patch from Andre Lucas <andre.lucas@dial.pipex.com>
1312 1360
@@ -1326,9 +1374,9 @@
1326 - [sshd.c] 1374 - [sshd.c]
1327 log with level log() not fatal() if peer behaves badly. 1375 log with level log() not fatal() if peer behaves badly.
1328 - [readpass.c] 1376 - [readpass.c]
1329 instead of blocking SIGINT, catch it ourselves, so that we can clean 1377 instead of blocking SIGINT, catch it ourselves, so that we can clean
1330 the tty modes up and kill ourselves -- instead of our process group 1378 the tty modes up and kill ourselves -- instead of our process group
1331 leader (scp, cvs, ...) going away and leaving us in noecho mode. 1379 leader (scp, cvs, ...) going away and leaving us in noecho mode.
1332 people with cbreak shells never even noticed.. 1380 people with cbreak shells never even noticed..
1333 - [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8] 1381 - [ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8]
1334 ie. -> i.e., 1382 ie. -> i.e.,
@@ -1341,12 +1389,12 @@
1341 - [sshconnect.c] 1389 - [sshconnect.c]
1342 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags. 1390 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags.
1343 - destroy keys earlier 1391 - destroy keys earlier
1344 - split key exchange (kex) and user authentication (user-auth), 1392 - split key exchange (kex) and user authentication (user-auth),
1345 ok: provos@ 1393 ok: provos@
1346 - [sshd.c] 1394 - [sshd.c]
1347 - no need for poll.h; from bright@wintelcom.net 1395 - no need for poll.h; from bright@wintelcom.net
1348 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags. 1396 - disable agent fwding for proto 1.3, remove abuse of auth-rsa flags.
1349 - split key exchange (kex) and user authentication (user-auth), 1397 - split key exchange (kex) and user authentication (user-auth),
1350 ok: provos@ 1398 ok: provos@
1351 - Big manpage and config file cleanup from Andre Lucas 1399 - Big manpage and config file cleanup from Andre Lucas
1352 <andre.lucas@dial.pipex.com> 1400 <andre.lucas@dial.pipex.com>
@@ -1365,29 +1413,29 @@
136520000118 141320000118
1366 - Fixed --with-pid-dir option 1414 - Fixed --with-pid-dir option
1367 - Makefile fix from Gary E. Miller <gem@rellim.com> 1415 - Makefile fix from Gary E. Miller <gem@rellim.com>
1368 - Compile fix for HPUX and Solaris from Andre Lucas 1416 - Compile fix for HPUX and Solaris from Andre Lucas
1369 <andre.lucas@dial.pipex.com> 1417 <andre.lucas@dial.pipex.com>
1370 1418
137120000117 141920000117
1372 - Clean up bsd-bindresvport.c. Use arc4random() for picking initial 1420 - Clean up bsd-bindresvport.c. Use arc4random() for picking initial
1373 port, ignore EINVAL errors (Linux) when searching for free port. 1421 port, ignore EINVAL errors (Linux) when searching for free port.
1374 - Revert __snprintf -> snprintf aliasing. Apparently Solaris 1422 - Revert __snprintf -> snprintf aliasing. Apparently Solaris
1375 __snprintf isn't. Report from Theo de Raadt <theo@cvs.openbsd.org> 1423 __snprintf isn't. Report from Theo de Raadt <theo@cvs.openbsd.org>
1376 - Document location of Redhat PAM file in INSTALL. 1424 - Document location of Redhat PAM file in INSTALL.
1377 - Fixed X11 forwarding bug on Linux. libc advertises AF_INET6 1425 - Fixed X11 forwarding bug on Linux. libc advertises AF_INET6
1378 INADDR_ANY_INIT addresses via getaddrinfo, but may not be able to 1426 INADDR_ANY_INIT addresses via getaddrinfo, but may not be able to
1379 deliver (no IPv6 kernel support) 1427 deliver (no IPv6 kernel support)
1380 - Released 1.2.1pre27 1428 - Released 1.2.1pre27
1381 1429
1382 - Fix rresvport_af failure errors (logic error in bsd-bindresvport.c) 1430 - Fix rresvport_af failure errors (logic error in bsd-bindresvport.c)
1383 - Fix --with-ipaddr-display option test. Fix from Jarno Huuskonen 1431 - Fix --with-ipaddr-display option test. Fix from Jarno Huuskonen
1384 <jhuuskon@hytti.uku.fi> 1432 <jhuuskon@hytti.uku.fi>
1385 - Fix hang on logout if processes are still using the pty. Needs 1433 - Fix hang on logout if processes are still using the pty. Needs
1386 further testing. 1434 further testing.
1387 - Patch from Christos Zoulas <christos@zoulas.com> 1435 - Patch from Christos Zoulas <christos@zoulas.com>
1388 - Try $prefix first when looking for OpenSSL. 1436 - Try $prefix first when looking for OpenSSL.
1389 - Include sys/types.h when including sys/socket.h in test programs 1437 - Include sys/types.h when including sys/socket.h in test programs
1390 - Substitute PID directory in sshd.8. Suggestion from Andrew 1438 - Substitute PID directory in sshd.8. Suggestion from Andrew
1391 Stribblehill <a.d.stribblehill@durham.ac.uk> 1439 Stribblehill <a.d.stribblehill@durham.ac.uk>
1392 1440
139320000116 144120000116
@@ -1396,17 +1444,17 @@
1396 - Released 1.2.1pre26 1444 - Released 1.2.1pre26
1397 1445
1398 - Compilation fix from Kiyokazu SUTO <suto@ks-and-ks.ne.jp> 1446 - Compilation fix from Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
1399 - Fixed broken bugfix for /dev/ptmx on Linux systems which lack 1447 - Fixed broken bugfix for /dev/ptmx on Linux systems which lack
1400 openpty(). Report from Kiyokazu SUTO <suto@ks-and-ks.ne.jp> 1448 openpty(). Report from Kiyokazu SUTO <suto@ks-and-ks.ne.jp>
1401 1449
140220000115 145020000115
1403 - Add --with-xauth-path configure directive and explicit test for 1451 - Add --with-xauth-path configure directive and explicit test for
1404 /usr/openwin/bin/xauth for Solaris systems. Report from Anders 1452 /usr/openwin/bin/xauth for Solaris systems. Report from Anders
1405 Nordby <anders@fix.no> 1453 Nordby <anders@fix.no>
1406 - Fix incorrect detection of /dev/ptmx on Linux systems that lack 1454 - Fix incorrect detection of /dev/ptmx on Linux systems that lack
1407 openpty. Report from John Seifarth <john@waw.be> 1455 openpty. Report from John Seifarth <john@waw.be>
1408 - Look for intXX_t and u_intXX_t in sys/bitypes.h if they are not in 1456 - Look for intXX_t and u_intXX_t in sys/bitypes.h if they are not in
1409 sys/types.h. Fixes problems on SCO, report from Gary E. Miller 1457 sys/types.h. Fixes problems on SCO, report from Gary E. Miller
1410 <gem@rellim.com> 1458 <gem@rellim.com>
1411 - Use __snprintf and __vnsprintf if they are found where snprintf and 1459 - Use __snprintf and __vnsprintf if they are found where snprintf and
1412 vnsprintf are lacking. Suggested by Ben Taylor <bent@shell.clark.net> 1460 vnsprintf are lacking. Suggested by Ben Taylor <bent@shell.clark.net>
@@ -1418,11 +1466,11 @@
1418 [scp.c packet.h packet.c login.c log.c canohost.c channels.c] 1466 [scp.c packet.h packet.c login.c log.c canohost.c channels.c]
1419 [hostfile.c sshd_config] 1467 [hostfile.c sshd_config]
1420 ipv6 support: mostly gethostbyname->getaddrinfo/getnameinfo, new 1468 ipv6 support: mostly gethostbyname->getaddrinfo/getnameinfo, new
1421 features: sshd allows multiple ListenAddress and Port options. note 1469 features: sshd allows multiple ListenAddress and Port options. note
1422 that libwrap is not IPv6-ready. (based on patches from 1470 that libwrap is not IPv6-ready. (based on patches from
1423 fujiwara@rcac.tdi.co.jp) 1471 fujiwara@rcac.tdi.co.jp)
1424 - [ssh.c canohost.c] 1472 - [ssh.c canohost.c]
1425 more hints (hints.ai_socktype=SOCK_STREAM) for getaddrinfo, 1473 more hints (hints.ai_socktype=SOCK_STREAM) for getaddrinfo,
1426 from itojun@ 1474 from itojun@
1427 - [channels.c] 1475 - [channels.c]
1428 listen on _all_ interfaces for X11-Fwd (hints.ai_flags = AI_PASSIVE) 1476 listen on _all_ interfaces for X11-Fwd (hints.ai_flags = AI_PASSIVE)
@@ -1431,7 +1479,7 @@
1431 - [scp.1 sshd.8 servconf.h scp.c] 1479 - [scp.1 sshd.8 servconf.h scp.c]
1432 document -4, -6, and 'ssh -L 2022/::1/22' 1480 document -4, -6, and 'ssh -L 2022/::1/22'
1433 - [ssh.c] 1481 - [ssh.c]
1434 'ssh @host' is illegal (null user name), from 1482 'ssh @host' is illegal (null user name), from
1435 karsten@gedankenpolizei.de 1483 karsten@gedankenpolizei.de
1436 - [sshconnect.c] 1484 - [sshconnect.c]
1437 better error message 1485 better error message
@@ -1460,7 +1508,7 @@
1460 Holger Trapp <Holger.Trapp@Informatik.TU-Chemnitz.DE> 1508 Holger Trapp <Holger.Trapp@Informatik.TU-Chemnitz.DE>
1461 1509
146220000105 151020000105
1463 - Fixed annoying DES corruption problem. libcrypt has been 1511 - Fixed annoying DES corruption problem. libcrypt has been
1464 overriding symbols in libcrypto. Removed libcrypt and crypt.h 1512 overriding symbols in libcrypto. Removed libcrypt and crypt.h
1465 altogether (libcrypto includes its own crypt(1) replacement) 1513 altogether (libcrypto includes its own crypt(1) replacement)
1466 - Added platform-specific rules for Irix 6.x. Included warning that 1514 - Added platform-specific rules for Irix 6.x. Included warning that
@@ -1468,14 +1516,14 @@
1468 1516
146920000103 151720000103
1470 - Add explicit make rules for files proccessed by fixpaths. 1518 - Add explicit make rules for files proccessed by fixpaths.
1471 - Fix "make install" in RPM spec files. Report from Tenkou N. Hattori 1519 - Fix "make install" in RPM spec files. Report from Tenkou N. Hattori
1472 <tnh@kondara.org> 1520 <tnh@kondara.org>
1473 - Removed "nullok" directive from default PAM configuration files. 1521 - Removed "nullok" directive from default PAM configuration files.
1474 Added information on enabling EmptyPasswords on openssh+PAM in 1522 Added information on enabling EmptyPasswords on openssh+PAM in
1475 UPGRADING file. 1523 UPGRADING file.
1476 - OpenBSD CVS updates 1524 - OpenBSD CVS updates
1477 - [ssh-agent.c] 1525 - [ssh-agent.c]
1478 cleanup_exit() for SIGTERM/SIGHUP, too. from fgsch@ and 1526 cleanup_exit() for SIGTERM/SIGHUP, too. from fgsch@ and
1479 dgaudet@arctic.org 1527 dgaudet@arctic.org
1480 - [sshconnect.c] 1528 - [sshconnect.c]
1481 compare correct version for 1.3 compat mode 1529 compare correct version for 1.3 compat mode
@@ -1487,18 +1535,18 @@
1487 <dgaudet@arctic.org> 1535 <dgaudet@arctic.org>
1488 1536
148919991231 153719991231
1490 - Fix password support on systems with a mixture of shadowed and 1538 - Fix password support on systems with a mixture of shadowed and
1491 non-shadowed passwords (e.g. NIS). Report and fix from 1539 non-shadowed passwords (e.g. NIS). Report and fix from
1492 HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp> 1540 HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
1493 - Fix broken autoconf typedef detection. Report from Marc G. 1541 - Fix broken autoconf typedef detection. Report from Marc G.
1494 Fournier <marc.fournier@acadiau.ca> 1542 Fournier <marc.fournier@acadiau.ca>
1495 - Fix occasional crash on LinuxPPC. Patch from Franz Sirl 1543 - Fix occasional crash on LinuxPPC. Patch from Franz Sirl
1496 <Franz.Sirl-kernel@lauterbach.com> 1544 <Franz.Sirl-kernel@lauterbach.com>
1497 - Prevent typedefs from being compiled more than once. Report from 1545 - Prevent typedefs from being compiled more than once. Report from
1498 Marc G. Fournier <marc.fournier@acadiau.ca> 1546 Marc G. Fournier <marc.fournier@acadiau.ca>
1499 - Fill in ut_utaddr utmp field. Report from Benjamin Charron 1547 - Fill in ut_utaddr utmp field. Report from Benjamin Charron
1500 <iretd@bigfoot.com> 1548 <iretd@bigfoot.com>
1501 - Really fix broken default path. Fix from Jim Knoble 1549 - Really fix broken default path. Fix from Jim Knoble
1502 <jmknoble@pobox.com> 1550 <jmknoble@pobox.com>
1503 - Remove test for quad_t. No longer needed. 1551 - Remove test for quad_t. No longer needed.
1504 - Released 1.2.1pre24 1552 - Released 1.2.1pre24
@@ -1510,9 +1558,9 @@
1510 - OpenBSD CVS updates: 1558 - OpenBSD CVS updates:
1511 - [auth-passwd.c] 1559 - [auth-passwd.c]
1512 check for NULL 1st 1560 check for NULL 1st
1513 - Removed most of the pam code into its own file auth-pam.[ch]. This 1561 - Removed most of the pam code into its own file auth-pam.[ch]. This
1514 cleaned up sshd.c up significantly. 1562 cleaned up sshd.c up significantly.
1515 - PAM authentication was incorrectly interpreting 1563 - PAM authentication was incorrectly interpreting
1516 "PermitRootLogin without-password". Report from Matthias Andree 1564 "PermitRootLogin without-password". Report from Matthias Andree
1517 <ma@dt.e-technik.uni-dortmund.de 1565 <ma@dt.e-technik.uni-dortmund.de
1518 - Several other cleanups 1566 - Several other cleanups
@@ -1522,14 +1570,14 @@
1522 - Released 1.2.1pre23 1570 - Released 1.2.1pre23
1523 1571
152419991229 157219991229
1525 - Applied another NetBSD portability patch from David Rankin 1573 - Applied another NetBSD portability patch from David Rankin
1526 <drankin@bohemians.lexington.ky.us> 1574 <drankin@bohemians.lexington.ky.us>
1527 - Fix --with-default-path option. 1575 - Fix --with-default-path option.
1528 - Autodetect perl, patch from David Rankin 1576 - Autodetect perl, patch from David Rankin
1529 <drankin@bohemians.lexington.ky.us> 1577 <drankin@bohemians.lexington.ky.us>
1530 - Print whether OpenSSH was compiled with RSARef, patch from 1578 - Print whether OpenSSH was compiled with RSARef, patch from
1531 Nalin Dahyabhai <nalin@thermo.stat.ncsu.edu> 1579 Nalin Dahyabhai <nalin@thermo.stat.ncsu.edu>
1532 - Calls to pam_setcred, patch from Nalin Dahyabhai 1580 - Calls to pam_setcred, patch from Nalin Dahyabhai
1533 <nalin@thermo.stat.ncsu.edu> 1581 <nalin@thermo.stat.ncsu.edu>
1534 - Detect missing size_t and typedef it. 1582 - Detect missing size_t and typedef it.
1535 - Rename helper.[ch] to (more appropriate) bsd-misc.[ch] 1583 - Rename helper.[ch] to (more appropriate) bsd-misc.[ch]
@@ -1537,7 +1585,7 @@
1537 1585
153819991228 158619991228
1539 - Replacement for getpagesize() for systems which lack it 1587 - Replacement for getpagesize() for systems which lack it
1540 - NetBSD login.c compile fix from David Rankin 1588 - NetBSD login.c compile fix from David Rankin
1541 <drankin@bohemians.lexington.ky.us> 1589 <drankin@bohemians.lexington.ky.us>
1542 - Fully set ut_tv if present in utmp or utmpx 1590 - Fully set ut_tv if present in utmp or utmpx
1543 - Portability fixes for Irix 5.3 (now compiles OK!) 1591 - Portability fixes for Irix 5.3 (now compiles OK!)
@@ -1569,15 +1617,15 @@
1569 - Revised RPM package to include Jim Knoble's <jmknoble@pobox.com> 1617 - Revised RPM package to include Jim Knoble's <jmknoble@pobox.com>
1570 X11 ssh-askpass program. 1618 X11 ssh-askpass program.
1571 - Disable logging of PAM success and failures, PAM is verbose enough. 1619 - Disable logging of PAM success and failures, PAM is verbose enough.
1572 Unfortunatly there is currently no way to disable auth failure 1620 Unfortunatly there is currently no way to disable auth failure
1573 messages. Mention this in UPGRADING file and sent message to PAM 1621 messages. Mention this in UPGRADING file and sent message to PAM
1574 developers 1622 developers
1575 - OpenBSD CVS update: 1623 - OpenBSD CVS update:
1576 - [ssh-keygen.1 ssh.1] 1624 - [ssh-keygen.1 ssh.1]
1577 remove ref to .ssh/random_seed, mention .ssh/environment in 1625 remove ref to .ssh/random_seed, mention .ssh/environment in
1578 .Sh FILES, too 1626 .Sh FILES, too
1579 - Released 1.2.1pre21 1627 - Released 1.2.1pre21
1580 - Fixed implicit '.' in default path, report from Jim Knoble 1628 - Fixed implicit '.' in default path, report from Jim Knoble
1581 <jmknoble@pobox.com> 1629 <jmknoble@pobox.com>
1582 - Redhat RPM spec fixes from Jim Knoble <jmknoble@pobox.com> 1630 - Redhat RPM spec fixes from Jim Knoble <jmknoble@pobox.com>
1583 1631
@@ -1594,20 +1642,20 @@
1594 <96na@eng.cam.ac.uk>) 1642 <96na@eng.cam.ac.uk>)
1595 1643
159619991223 164419991223
1597 - Merged later HPUX patch from Andre Lucas 1645 - Merged later HPUX patch from Andre Lucas
1598 <andre.lucas@dial.pipex.com> 1646 <andre.lucas@dial.pipex.com>
1599 - Above patch included better utmpx support from Ben Taylor 1647 - Above patch included better utmpx support from Ben Taylor
1600 <bent@clark.net> 1648 <bent@clark.net>
1601 1649
160219991222 165019991222
1603 - Fix undefined fd_set type in ssh.h from Povl H. Pedersen 1651 - Fix undefined fd_set type in ssh.h from Povl H. Pedersen
1604 <pope@netguide.dk> 1652 <pope@netguide.dk>
1605 - Fix login.c breakage on systems which lack ut_host in struct 1653 - Fix login.c breakage on systems which lack ut_host in struct
1606 utmp. Reported by Willard Dawson <willard.dawson@sbs.siemens.com> 1654 utmp. Reported by Willard Dawson <willard.dawson@sbs.siemens.com>
1607 1655
160819991221 165619991221
1609 - Integration of large HPUX patch from Andre Lucas 1657 - Integration of large HPUX patch from Andre Lucas
1610 <andre.lucas@dial.pipex.com>. Integrating it had a few other 1658 <andre.lucas@dial.pipex.com>. Integrating it had a few other
1611 benefits: 1659 benefits:
1612 - Ability to disable shadow passwords at configure time 1660 - Ability to disable shadow passwords at configure time
1613 - Ability to disable lastlog support at configure time 1661 - Ability to disable lastlog support at configure time
@@ -1620,12 +1668,12 @@
1620 - Release 1.2.1pre19 1668 - Release 1.2.1pre19
1621 1669
162219991218 167019991218
1623 - Redhat init script patch from Chun-Chung Chen 1671 - Redhat init script patch from Chun-Chung Chen
1624 <cjj@u.washington.edu> 1672 <cjj@u.washington.edu>
1625 - Avoid breakage on systems without IPv6 headers 1673 - Avoid breakage on systems without IPv6 headers
1626 1674
162719991216 167519991216
1628 - Makefile changes for Solaris from Peter Kocks 1676 - Makefile changes for Solaris from Peter Kocks
1629 <peter.kocks@baygate.com> 1677 <peter.kocks@baygate.com>
1630 - Minor updates to docs 1678 - Minor updates to docs
1631 - Merged OpenBSD CVS changes: 1679 - Merged OpenBSD CVS changes:
@@ -1633,7 +1681,7 @@
1633 keysize warnings talk about identity files 1681 keysize warnings talk about identity files
1634 - [packet.c] 1682 - [packet.c]
1635 "Connection closed by x.x.x.x": fatal() -> log() 1683 "Connection closed by x.x.x.x": fatal() -> log()
1636 - Correctly handle empty passwords in shadow file. Patch from: 1684 - Correctly handle empty passwords in shadow file. Patch from:
1637 "Chris, the Young One" <cky@pobox.com> 1685 "Chris, the Young One" <cky@pobox.com>
1638 - Released 1.2.1pre18 1686 - Released 1.2.1pre18
1639 1687
@@ -1643,13 +1691,13 @@
1643 - Use LDFLAGS correctly 1691 - Use LDFLAGS correctly
1644 - Fix SIGIO error in scp 1692 - Fix SIGIO error in scp
1645 - Simplify status line printing in scp 1693 - Simplify status line printing in scp
1646 - Added better test for inline functions compiler support from 1694 - Added better test for inline functions compiler support from
1647 Darren_Hall@progressive.com 1695 Darren_Hall@progressive.com
1648 1696
164919991214 169719991214
1650 - OpenBSD CVS Changes 1698 - OpenBSD CVS Changes
1651 - [canohost.c] 1699 - [canohost.c]
1652 fix get_remote_port() and friends for sshd -i; 1700 fix get_remote_port() and friends for sshd -i;
1653 Holger.Trapp@Informatik.TU-Chemnitz.DE 1701 Holger.Trapp@Informatik.TU-Chemnitz.DE
1654 - [mpaux.c] 1702 - [mpaux.c]
1655 make code simpler. no need for memcpy. niels@ ok 1703 make code simpler. no need for memcpy. niels@ ok
@@ -1669,16 +1717,16 @@
1669 - Doc updates 1717 - Doc updates
1670 1718
167119991211 171919991211
1672 - Fix compilation on systems with AFS. Reported by 1720 - Fix compilation on systems with AFS. Reported by
1673 aloomis@glue.umd.edu 1721 aloomis@glue.umd.edu
1674 - Fix installation on Solaris. Reported by 1722 - Fix installation on Solaris. Reported by
1675 Gordon Rowell <gordonr@gormand.com.au> 1723 Gordon Rowell <gordonr@gormand.com.au>
1676 - Fix gccisms (__attribute__ and inline). Report by edgy@us.ibm.com, 1724 - Fix gccisms (__attribute__ and inline). Report by edgy@us.ibm.com,
1677 patch from Markus Friedl <markus.friedl@informatik.uni-erlangen.de> 1725 patch from Markus Friedl <markus.friedl@informatik.uni-erlangen.de>
1678 - Auto-locate xauth. Patch from David Agraz <dagraz@jahoopa.com> 1726 - Auto-locate xauth. Patch from David Agraz <dagraz@jahoopa.com>
1679 - Compile fix from David Agraz <dagraz@jahoopa.com> 1727 - Compile fix from David Agraz <dagraz@jahoopa.com>
1680 - Avoid compiler warning in bsd-snprintf.c 1728 - Avoid compiler warning in bsd-snprintf.c
1681 - Added pam_limits.so to default PAM config. Suggested by 1729 - Added pam_limits.so to default PAM config. Suggested by
1682 Jim Knoble <jmknoble@pobox.com> 1730 Jim Knoble <jmknoble@pobox.com>
1683 1731
168419991209 173219991209
@@ -1693,8 +1741,8 @@
1693 - [sshd.c] 1741 - [sshd.c]
1694 make sure the client selects a supported cipher 1742 make sure the client selects a supported cipher
1695 - [sshd.c] 1743 - [sshd.c]
1696 fix sighup handling. accept would just restart and daemon handled 1744 fix sighup handling. accept would just restart and daemon handled
1697 sighup only after the next connection was accepted. use poll on 1745 sighup only after the next connection was accepted. use poll on
1698 listen sock now. 1746 listen sock now.
1699 - [sshd.c] 1747 - [sshd.c]
1700 make that a fatal 1748 make that a fatal
@@ -1703,18 +1751,18 @@
1703 - Released 1.2pre17 1751 - Released 1.2pre17
1704 1752
170519991208 175319991208
1706 - Compile fix for Solaris with /dev/ptmx from 1754 - Compile fix for Solaris with /dev/ptmx from
1707 David Agraz <dagraz@jahoopa.com> 1755 David Agraz <dagraz@jahoopa.com>
1708 1756
170919991207 175719991207
1710 - sshd Redhat init script patch from Jim Knoble <jmknoble@pobox.com> 1758 - sshd Redhat init script patch from Jim Knoble <jmknoble@pobox.com>
1711 fixes compatability with 4.x and 5.x 1759 fixes compatability with 4.x and 5.x
1712 - Fixed default SSH_ASKPASS 1760 - Fixed default SSH_ASKPASS
1713 - Fix PAM account and session being called multiple times. Problem 1761 - Fix PAM account and session being called multiple times. Problem
1714 reported by Adrian Baugh <adrian@merlin.keble.ox.ac.uk> 1762 reported by Adrian Baugh <adrian@merlin.keble.ox.ac.uk>
1715 - Merged more OpenBSD changes: 1763 - Merged more OpenBSD changes:
1716 - [atomicio.c authfd.c scp.c serverloop.c ssh.h sshconnect.c sshd.c] 1764 - [atomicio.c authfd.c scp.c serverloop.c ssh.h sshconnect.c sshd.c]
1717 move atomicio into it's own file. wrap all socket write()s which 1765 move atomicio into it's own file. wrap all socket write()s which
1718 were doing write(sock, buf, len) != len, with atomicio() calls. 1766 were doing write(sock, buf, len) != len, with atomicio() calls.
1719 - [auth-skey.c] 1767 - [auth-skey.c]
1720 fd leak 1768 fd leak
@@ -1828,23 +1876,23 @@
182819991122 187619991122
1829 - Make <enter> close gnome-ssh-askpass (Debian bug #50299) 1877 - Make <enter> close gnome-ssh-askpass (Debian bug #50299)
1830 - OpenBSD CVS Changes 1878 - OpenBSD CVS Changes
1831 - [ssh-keygen.c] 1879 - [ssh-keygen.c]
1832 don't create ~/.ssh only if the user wants to store the private 1880 don't create ~/.ssh only if the user wants to store the private
1833 key there. show fingerprint instead of public-key after 1881 key there. show fingerprint instead of public-key after
1834 keygeneration. ok niels@ 1882 keygeneration. ok niels@
1835 - Added OpenBSD bsd-strlcat.c, created bsd-strlcat.h 1883 - Added OpenBSD bsd-strlcat.c, created bsd-strlcat.h
1836 - Added timersub() macro 1884 - Added timersub() macro
1837 - Tidy RCSIDs of bsd-*.c 1885 - Tidy RCSIDs of bsd-*.c
1838 - Added autoconf test and macro to deal with old PAM libraries 1886 - Added autoconf test and macro to deal with old PAM libraries
1839 pam_strerror definition (one arg vs two). 1887 pam_strerror definition (one arg vs two).
1840 - Fix EGD problems (Thanks to Ben Taylor <bent@clark.net>) 1888 - Fix EGD problems (Thanks to Ben Taylor <bent@clark.net>)
1841 - Retry /dev/urandom reads interrupted by signal (report from 1889 - Retry /dev/urandom reads interrupted by signal (report from
1842 Robert Hardy <rhardy@webcon.net>) 1890 Robert Hardy <rhardy@webcon.net>)
1843 - Added a setenv replacement for systems which lack it 1891 - Added a setenv replacement for systems which lack it
1844 - Only display public key comment when presenting ssh-askpass dialog 1892 - Only display public key comment when presenting ssh-askpass dialog
1845 - Released 1.2pre14 1893 - Released 1.2pre14
1846 1894
1847 - Configure, Make and changelog corrections from Tudor Bosman 1895 - Configure, Make and changelog corrections from Tudor Bosman
1848 <tudorb@jm.nu> and Niels Kristian Bech Jensen <nkbj@image.dk> 1896 <tudorb@jm.nu> and Niels Kristian Bech Jensen <nkbj@image.dk>
1849 1897
185019991121 189819991121
@@ -1871,13 +1919,13 @@
1871 print usage() everytime we get bad options 1919 print usage() everytime we get bad options
1872 - [ssh-keygen.c] overflow, djm@mindrot.org 1920 - [ssh-keygen.c] overflow, djm@mindrot.org
1873 - [sshd.c] fix sigchld race; cjc5@po.cwru.edu 1921 - [sshd.c] fix sigchld race; cjc5@po.cwru.edu
1874 1922
187519991120 192319991120
1876 - Merged more Solaris support from Marc G. Fournier 1924 - Merged more Solaris support from Marc G. Fournier
1877 <marc.fournier@acadiau.ca> 1925 <marc.fournier@acadiau.ca>
1878 - Wrote autoconf tests for integer bit-types 1926 - Wrote autoconf tests for integer bit-types
1879 - Fixed enabling kerberos support 1927 - Fixed enabling kerberos support
1880 - Fix segfault in ssh-keygen caused by buffer overrun in filename 1928 - Fix segfault in ssh-keygen caused by buffer overrun in filename
1881 handling. 1929 handling.
1882 1930
188319991119 193119991119
@@ -1890,14 +1938,14 @@
1890 - EGD uses a socket, not a named pipe. Duh. 1938 - EGD uses a socket, not a named pipe. Duh.
1891 - Fix includes in fingerprint.c 1939 - Fix includes in fingerprint.c
1892 - Fix scp progress bar bug again. 1940 - Fix scp progress bar bug again.
1893 - Move ssh-askpass from ${libdir}/ssh to ${libexecdir}/ssh at request of 1941 - Move ssh-askpass from ${libdir}/ssh to ${libexecdir}/ssh at request of
1894 David Rankin <drankin@bohemians.lexington.ky.us> 1942 David Rankin <drankin@bohemians.lexington.ky.us>
1895 - Added autoconf option to enable Kerberos 4 support (untested) 1943 - Added autoconf option to enable Kerberos 4 support (untested)
1896 - Added autoconf option to enable AFS support (untested) 1944 - Added autoconf option to enable AFS support (untested)
1897 - Added autoconf option to enable S/Key support (untested) 1945 - Added autoconf option to enable S/Key support (untested)
1898 - Added autoconf option to enable TCP wrappers support (compiles OK) 1946 - Added autoconf option to enable TCP wrappers support (compiles OK)
1899 - Renamed BSD helper function files to bsd-* 1947 - Renamed BSD helper function files to bsd-*
1900 - Added tests for login and daemon and enable OpenBSD replacements for 1948 - Added tests for login and daemon and enable OpenBSD replacements for
1901 when they are absent. 1949 when they are absent.
1902 - Added non-PAM MD5 password support patch from Tudor Bosman <tudorb@jm.nu> 1950 - Added non-PAM MD5 password support patch from Tudor Bosman <tudorb@jm.nu>
1903 1951
@@ -1905,7 +1953,7 @@
1905 - Merged OpenBSD CVS changes 1953 - Merged OpenBSD CVS changes
1906 - [scp.c] foregroundproc() in scp 1954 - [scp.c] foregroundproc() in scp
1907 - [sshconnect.h] include fingerprint.h 1955 - [sshconnect.h] include fingerprint.h
1908 - [sshd.c] bugfix: the log() for passwd-auth escaped during logging 1956 - [sshd.c] bugfix: the log() for passwd-auth escaped during logging
1909 changes. 1957 changes.
1910 - [ssh.1] Spell my name right. 1958 - [ssh.1] Spell my name right.
1911 - Added openssh.com info to README 1959 - Added openssh.com info to README
@@ -1914,20 +1962,20 @@
1914 - Merged OpenBSD CVS changes 1962 - Merged OpenBSD CVS changes
1915 - [ChangeLog.Ylonen] noone needs this anymore 1963 - [ChangeLog.Ylonen] noone needs this anymore
1916 - [authfd.c] close-on-exec for auth-socket, ok deraadt 1964 - [authfd.c] close-on-exec for auth-socket, ok deraadt
1917 - [hostfile.c] 1965 - [hostfile.c]
1918 in known_hosts key lookup the entry for the bits does not need 1966 in known_hosts key lookup the entry for the bits does not need
1919 to match, all the information is contained in n and e. This 1967 to match, all the information is contained in n and e. This
1920 solves the problem with buggy servers announcing the wrong 1968 solves the problem with buggy servers announcing the wrong
1921 modulus length. markus and me. 1969 modulus length. markus and me.
1922 - [serverloop.c] 1970 - [serverloop.c]
1923 bugfix: check for space if child has terminated, from: 1971 bugfix: check for space if child has terminated, from:
1924 iedowse@maths.tcd.ie 1972 iedowse@maths.tcd.ie
1925 - [ssh-add.1 ssh-add.c ssh-keygen.1 ssh-keygen.c sshconnect.c] 1973 - [ssh-add.1 ssh-add.c ssh-keygen.1 ssh-keygen.c sshconnect.c]
1926 [fingerprint.c fingerprint.h] 1974 [fingerprint.c fingerprint.h]
1927 rsa key fingerprints, idea from Bjoern Groenvall <bg@sics.se> 1975 rsa key fingerprints, idea from Bjoern Groenvall <bg@sics.se>
1928 - [ssh-agent.1] typo 1976 - [ssh-agent.1] typo
1929 - [ssh.1] add OpenSSH information to AUTHOR section. okay markus@ 1977 - [ssh.1] add OpenSSH information to AUTHOR section. okay markus@
1930 - [sshd.c] 1978 - [sshd.c]
1931 force logging to stderr while loading private key file 1979 force logging to stderr while loading private key file
1932 (lost while converting to new log-levels) 1980 (lost while converting to new log-levels)
1933 1981
@@ -1948,10 +1996,10 @@
1948 1996
194919991115 199719991115
1950 - Merged OpenBSD CVS changes: 1998 - Merged OpenBSD CVS changes:
1951 - [ssh-add.c] change passphrase loop logic and remove ref to 1999 - [ssh-add.c] change passphrase loop logic and remove ref to
1952 $DISPLAY, ok niels 2000 $DISPLAY, ok niels
1953 - Changed to ssh-add.c broke askpass support. Revised it to be a little more 2001 - Changed to ssh-add.c broke askpass support. Revised it to be a little more
1954 modular. 2002 modular.
1955 - Revised autoconf support for enabling/disabling askpass support. 2003 - Revised autoconf support for enabling/disabling askpass support.
1956 - Merged more OpenBSD CVS changes: 2004 - Merged more OpenBSD CVS changes:
1957 [auth-krb4.c] 2005 [auth-krb4.c]
@@ -1991,9 +2039,9 @@
1991 - Added 'Obsoletes' lines to RPM spec file 2039 - Added 'Obsoletes' lines to RPM spec file
1992 - Merged OpenBSD CVS changes: 2040 - Merged OpenBSD CVS changes:
1993 - [bufaux.c] save a view malloc/memcpy/memset/free's, ok niels 2041 - [bufaux.c] save a view malloc/memcpy/memset/free's, ok niels
1994 - [scp.c] fix overflow reported by damien@ibs.com.au: off_t 2042 - [scp.c] fix overflow reported by damien@ibs.com.au: off_t
1995 totalsize, ok niels,aaron 2043 totalsize, ok niels,aaron
1996 - Delay fork (-f option) in ssh until after port forwarded connections 2044 - Delay fork (-f option) in ssh until after port forwarded connections
1997 have been initialised. Patch from Jani Hakala <jahakala@cc.jyu.fi> 2045 have been initialised. Patch from Jani Hakala <jahakala@cc.jyu.fi>
1998 - Added shadow password patch from Thomas Neumann <tom@smart.ruhr.de> 2046 - Added shadow password patch from Thomas Neumann <tom@smart.ruhr.de>
1999 - Added ifdefs to auth-passwd.c to exclude it when PAM is enabled 2047 - Added ifdefs to auth-passwd.c to exclude it when PAM is enabled
@@ -2005,7 +2053,7 @@
2005 - Merged changes from OpenBSD CVS 2053 - Merged changes from OpenBSD CVS
2006 - [sshd.c] session_key_int may be zero 2054 - [sshd.c] session_key_int may be zero
2007 - [auth-rh-rsa.c servconf.c servconf.h ssh.h sshd.8 sshd.c sshd_config] 2055 - [auth-rh-rsa.c servconf.c servconf.h ssh.h sshd.8 sshd.c sshd_config]
2008 IgnoreUserKnownHosts(default=no), used for RhostRSAAuth, ok 2056 IgnoreUserKnownHosts(default=no), used for RhostRSAAuth, ok
2009 deraadt,millert 2057 deraadt,millert
2010 - Brought default sshd_config more in line with OpenBSD's 2058 - Brought default sshd_config more in line with OpenBSD's
2011 - Grab server in gnome-ssh-askpass (Debian bug #49872) 2059 - Grab server in gnome-ssh-askpass (Debian bug #49872)
@@ -2034,11 +2082,11 @@
2034 - [auth-rh-rsa.c] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too 2082 - [auth-rh-rsa.c] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too
2035 - [ssh.1] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too 2083 - [ssh.1] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too
2036 - [sshd.8] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too 2084 - [sshd.8] user/958: check ~/.ssh/known_hosts for rhosts-rsa, too
2037 - Fix integer overflow which was messing up scp's progress bar for large 2085 - Fix integer overflow which was messing up scp's progress bar for large
2038 file transfers. Fix submitted to OpenBSD developers. Report and fix 2086 file transfers. Fix submitted to OpenBSD developers. Report and fix
2039 from Kees Cook <cook@cpoint.net> 2087 from Kees Cook <cook@cpoint.net>
2040 - Merged more OpenBSD CVS changes: 2088 - Merged more OpenBSD CVS changes:
2041 - [auth-krb4.c auth-passwd.c] remove x11- and krb-cleanup from fatal() 2089 - [auth-krb4.c auth-passwd.c] remove x11- and krb-cleanup from fatal()
2042 + krb-cleanup cleanup 2090 + krb-cleanup cleanup
2043 - [clientloop.c log-client.c log-server.c ] 2091 - [clientloop.c log-client.c log-server.c ]
2044 [readconf.c readconf.h servconf.c servconf.h ] 2092 [readconf.c readconf.h servconf.c servconf.h ]
@@ -2127,7 +2175,7 @@
2127 - Improved PAM logging 2175 - Improved PAM logging
2128 - Added some debug() calls for PAM 2176 - Added some debug() calls for PAM
2129 - Removed redundant subdirectories 2177 - Removed redundant subdirectories
2130 - Integrated part of a patch from Dan Brosemer <odin@linuxfreak.com> for 2178 - Integrated part of a patch from Dan Brosemer <odin@linuxfreak.com> for
2131 building on Debian. 2179 building on Debian.
2132 - Fixed off-by-one error in PAM env patch 2180 - Fixed off-by-one error in PAM env patch
2133 - Released 1.2pre6 2181 - Released 1.2pre6
diff --git a/atomicio.c b/atomicio.c
index 45da22d3b..f5b1812f5 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 1999 Theo de Raadt 2 * Copyright (c) 1995,1999 Theo de Raadt
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: atomicio.c,v 1.4 2000/06/20 01:39:37 markus Exp $"); 27RCSID("$OpenBSD: atomicio.c,v 1.5 2000/09/07 20:27:49 deraadt Exp $");
28 28
29#include "xmalloc.h" 29#include "xmalloc.h"
30#include "ssh.h" 30#include "ssh.h"
diff --git a/auth-krb4.c b/auth-krb4.c
index 8715dc0d9..799cf261a 100644
--- a/auth-krb4.c
+++ b/auth-krb4.c
@@ -1,6 +1,25 @@
1/* 1/*
2 * Dug Song <dugsong@UMICH.EDU> 2 * Copyright (c) 1999 Dug Song. All rights reserved.
3 * Kerberos v4 authentication and ticket-passing routines. 3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 */ 23 */
5 24
6#include "includes.h" 25#include "includes.h"
@@ -9,7 +28,7 @@
9#include "ssh.h" 28#include "ssh.h"
10#include "servconf.h" 29#include "servconf.h"
11 30
12RCSID("$OpenBSD: auth-krb4.c,v 1.17 2000/08/28 03:50:54 deraadt Exp $"); 31RCSID("$OpenBSD: auth-krb4.c,v 1.18 2000/09/07 20:27:49 deraadt Exp $");
13 32
14#ifdef KRB4 33#ifdef KRB4
15char *ticket = NULL; 34char *ticket = NULL;
diff --git a/auth-options.c b/auth-options.c
index 55ccc8519..da6965266 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,5 +1,20 @@
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * RSA-based authentication. This code determines whether to admit a login
6 * based on RSA authentication. This file also contains functions to check
7 * validity of the host key.
8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 */
15
1#include "includes.h" 16#include "includes.h"
2RCSID("$OpenBSD: auth-options.c,v 1.2 2000/06/20 01:39:38 markus Exp $"); 17RCSID("$OpenBSD: auth-options.c,v 1.4 2000/09/07 21:13:36 markus Exp $");
3 18
4#include "ssh.h" 19#include "ssh.h"
5#include "packet.h" 20#include "packet.h"
diff --git a/auth-options.h b/auth-options.h
index 1ecdb9df4..9044d98be 100644
--- a/auth-options.h
+++ b/auth-options.h
@@ -1,3 +1,15 @@
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Functions to interface with the SSH_AUTHENTICATION_FD socket.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 */
1#ifndef AUTH_OPTIONS_H 13#ifndef AUTH_OPTIONS_H
2#define AUTH_OPTIONS_H 14#define AUTH_OPTIONS_H
3/* Flags that may be set in authorized_keys options. */ 15/* Flags that may be set in authorized_keys options. */
diff --git a/auth-passwd.c b/auth-passwd.c
index 850e25834..27824165f 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -2,14 +2,64 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Sat Mar 18 05:11:38 1995 ylo
6 * Password authentication. This file contains the functions to check whether 5 * Password authentication. This file contains the functions to check whether
7 * the password is valid for the user. 6 * the password is valid for the user.
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 *
14 *
15 * Copyright (c) 1999 Dug Song. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 *
38 * Copyright (c) 2000 Markus Friedl. All rights reserved.
39 *
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions
42 * are met:
43 * 1. Redistributions of source code must retain the above copyright
44 * notice, this list of conditions and the following disclaimer.
45 * 2. Redistributions in binary form must reproduce the above copyright
46 * notice, this list of conditions and the following disclaimer in the
47 * documentation and/or other materials provided with the distribution.
48 *
49 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
50 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
51 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
52 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
53 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
54 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
55 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
56 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
57 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
58 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8 */ 59 */
9 60
10#include "includes.h" 61#include "includes.h"
11 62RCSID("$OpenBSD: auth-passwd.c,v 1.17 2000/09/07 20:27:49 deraadt Exp $");
12RCSID("$OpenBSD: auth-passwd.c,v 1.16 2000/06/20 01:39:38 markus Exp $");
13 63
14#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA) 64#if !defined(USE_PAM) && !defined(HAVE_OSF_SIA)
15 65
diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c
index 4386758d0..072e385ab 100644
--- a/auth-rh-rsa.c
+++ b/auth-rh-rsa.c
@@ -1,21 +1,19 @@
1/* 1/*
2 *
3 * auth-rh-rsa.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sun May 7 03:08:06 1995 ylo
11 *
12 * Rhosts or /etc/hosts.equiv authentication combined with RSA host 5 * Rhosts or /etc/hosts.equiv authentication combined with RSA host
13 * authentication. 6 * authentication.
14 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
15 */ 13 */
16 14
17#include "includes.h" 15#include "includes.h"
18RCSID("$OpenBSD: auth-rh-rsa.c,v 1.14 2000/06/20 01:39:38 markus Exp $"); 16RCSID("$OpenBSD: auth-rh-rsa.c,v 1.16 2000/09/07 21:13:36 markus Exp $");
19 17
20#include "packet.h" 18#include "packet.h"
21#include "ssh.h" 19#include "ssh.h"
diff --git a/auth-rhosts.c b/auth-rhosts.c
index f670276b9..901c8d139 100644
--- a/auth-rhosts.c
+++ b/auth-rhosts.c
@@ -1,22 +1,20 @@
1/* 1/*
2 *
3 * auth-rhosts.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Fri Mar 17 05:12:18 1995 ylo
11 *
12 * Rhosts authentication. This file contains code to check whether to admit 5 * Rhosts authentication. This file contains code to check whether to admit
13 * the login based on rhosts authentication. This file also processes 6 * the login based on rhosts authentication. This file also processes
14 * /etc/hosts.equiv. 7 * /etc/hosts.equiv.
15 * 8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
16 */ 14 */
17 15
18#include "includes.h" 16#include "includes.h"
19RCSID("$OpenBSD: auth-rhosts.c,v 1.14 2000/06/20 01:39:38 markus Exp $"); 17RCSID("$OpenBSD: auth-rhosts.c,v 1.15 2000/09/07 20:27:49 deraadt Exp $");
20 18
21#include "packet.h" 19#include "packet.h"
22#include "ssh.h" 20#include "ssh.h"
diff --git a/auth-rsa.c b/auth-rsa.c
index 65f9bf757..8aefc8fad 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -1,22 +1,20 @@
1/* 1/*
2 *
3 * auth-rsa.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Mon Mar 27 01:46:52 1995 ylo
11 *
12 * RSA-based authentication. This code determines whether to admit a login 5 * RSA-based authentication. This code determines whether to admit a login
13 * based on RSA authentication. This file also contains functions to check 6 * based on RSA authentication. This file also contains functions to check
14 * validity of the host key. 7 * validity of the host key.
15 * 8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
16 */ 14 */
17 15
18#include "includes.h" 16#include "includes.h"
19RCSID("$OpenBSD: auth-rsa.c,v 1.27 2000/07/07 03:55:03 todd Exp $"); 17RCSID("$OpenBSD: auth-rsa.c,v 1.29 2000/09/07 21:13:36 markus Exp $");
20 18
21#include "rsa.h" 19#include "rsa.h"
22#include "packet.h" 20#include "packet.h"
diff --git a/auth-skey.c b/auth-skey.c
index 208d380bb..1e3cec860 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -1,7 +1,31 @@
1/*
2 * Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
1#include "includes.h" 25#include "includes.h"
2#ifdef SKEY 26RCSID("$OpenBSD: auth-skey.c,v 1.8 2000/09/07 20:27:49 deraadt Exp $");
3RCSID("$OpenBSD: auth-skey.c,v 1.7 2000/06/20 01:39:38 markus Exp $");
4 27
28#ifdef SKEY
5#include "ssh.h" 29#include "ssh.h"
6#include "packet.h" 30#include "packet.h"
7#include <openssl/sha.h> 31#include <openssl/sha.h>
diff --git a/auth.c b/auth.c
index dc3e82116..ccce644a7 100644
--- a/auth.c
+++ b/auth.c
@@ -1,11 +1,39 @@
1/* 1/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved 3 * All rights reserved
4 *
5 * As far as I am concerned, the code I have written for this software
6 * can be used freely for any purpose. Any derived versions of this
7 * software must be clearly marked as such, and if the derived work is
8 * incompatible with the protocol description in the RFC file, it must be
9 * called by a name other than "ssh" or "Secure Shell".
10 *
11 *
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 12 * Copyright (c) 2000 Markus Friedl. All rights reserved.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 */ 33 */
6 34
7#include "includes.h" 35#include "includes.h"
8RCSID("$OpenBSD: auth.c,v 1.8 2000/08/04 20:30:07 markus Exp $"); 36RCSID("$OpenBSD: auth.c,v 1.10 2000/09/07 21:13:36 markus Exp $");
9 37
10#include "xmalloc.h" 38#include "xmalloc.h"
11#include "rsa.h" 39#include "rsa.h"
@@ -33,7 +61,6 @@ RCSID("$OpenBSD: auth.c,v 1.8 2000/08/04 20:30:07 markus Exp $");
33 61
34/* import */ 62/* import */
35extern ServerOptions options; 63extern ServerOptions options;
36extern char *forced_command;
37 64
38/* 65/*
39 * Check if the user is allowed to log in via ssh. If user is listed in 66 * Check if the user is allowed to log in via ssh. If user is listed in
diff --git a/auth.h b/auth.h
index 61b1f2c5c..65bf7ae10 100644
--- a/auth.h
+++ b/auth.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1#ifndef AUTH_H 24#ifndef AUTH_H
2#define AUTH_H 25#define AUTH_H
3 26
diff --git a/auth1.c b/auth1.c
index 3720a7d28..43faa67f3 100644
--- a/auth1.c
+++ b/auth1.c
@@ -1,10 +1,16 @@
1/* 1/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved 3 * All rights reserved
4 *
5 * As far as I am concerned, the code I have written for this software
6 * can be used freely for any purpose. Any derived versions of this
7 * software must be clearly marked as such, and if the derived work is
8 * incompatible with the protocol description in the RFC file, it must be
9 * called by a name other than "ssh" or "Secure Shell".
4 */ 10 */
5 11
6#include "includes.h" 12#include "includes.h"
7RCSID("$OpenBSD: auth1.c,v 1.3 2000/08/20 18:42:40 millert Exp $"); 13RCSID("$OpenBSD: auth1.c,v 1.4 2000/09/07 20:27:49 deraadt Exp $");
8 14
9#include "xmalloc.h" 15#include "xmalloc.h"
10#include "rsa.h" 16#include "rsa.h"
diff --git a/auth2.c b/auth2.c
index 7769046fb..804afd8d6 100644
--- a/auth2.c
+++ b/auth2.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -26,8 +21,9 @@
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 23 */
24
29#include "includes.h" 25#include "includes.h"
30RCSID("$OpenBSD: auth2.c,v 1.13 2000/08/20 18:42:40 millert Exp $"); 26RCSID("$OpenBSD: auth2.c,v 1.14 2000/09/07 20:27:49 deraadt Exp $");
31 27
32#include <openssl/dsa.h> 28#include <openssl/dsa.h>
33#include <openssl/rsa.h> 29#include <openssl/rsa.h>
diff --git a/authfd.c b/authfd.c
index 6c40afc65..89fa2afad 100644
--- a/authfd.c
+++ b/authfd.c
@@ -1,23 +1,41 @@
1/* 1/*
2 *
3 * authfd.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Wed Mar 29 01:30:28 1995 ylo
11 *
12 * Functions for connecting the local authentication agent. 5 * Functions for connecting the local authentication agent.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 *
14 * SSH2 implementation, 13 * SSH2 implementation,
15 * Copyright (c) 2000 Markus Friedl. All rights reserved. 14 * Copyright (c) 2000 Markus Friedl. All rights reserved.
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
16 * 24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 35 */
18 36
19#include "includes.h" 37#include "includes.h"
20RCSID("$OpenBSD: authfd.c,v 1.26 2000/08/31 22:09:34 markus Exp $"); 38RCSID("$OpenBSD: authfd.c,v 1.27 2000/09/07 20:27:49 deraadt Exp $");
21 39
22#include "ssh.h" 40#include "ssh.h"
23#include "rsa.h" 41#include "rsa.h"
diff --git a/authfd.h b/authfd.h
index 5819b9139..b7a137d99 100644
--- a/authfd.h
+++ b/authfd.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * authfd.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Wed Mar 29 01:17:41 1995 ylo
11 *
12 * Functions to interface with the SSH_AUTHENTICATION_FD socket. 5 * Functions to interface with the SSH_AUTHENTICATION_FD socket.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: authfd.h,v 1.10 2000/08/19 21:34:43 markus Exp $"); */ 14/* RCSID("$OpenBSD: authfd.h,v 1.11 2000/09/07 20:27:49 deraadt Exp $"); */
17 15
18#ifndef AUTHFD_H 16#ifndef AUTHFD_H
19#define AUTHFD_H 17#define AUTHFD_H
diff --git a/authfile.c b/authfile.c
index 4368cb941..0a5bae96f 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,21 +1,42 @@
1/* 1/*
2 *
3 * authfile.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Mon Mar 27 03:52:05 1995 ylo
11 *
12 * This file contains functions for reading and writing identity files, and 5 * This file contains functions for reading and writing identity files, and
13 * for reading the passphrase from the user. 6 * for reading the passphrase from the user.
14 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 *
14 *
15 * Copyright (c) 2000 Markus Friedl. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 */ 36 */
16 37
17#include "includes.h" 38#include "includes.h"
18RCSID("$OpenBSD: authfile.c,v 1.17 2000/06/20 01:39:38 markus Exp $"); 39RCSID("$OpenBSD: authfile.c,v 1.19 2000/09/07 20:27:49 deraadt Exp $");
19 40
20#include <openssl/bn.h> 41#include <openssl/bn.h>
21#include <openssl/dsa.h> 42#include <openssl/dsa.h>
@@ -262,6 +283,7 @@ load_public_key_rsa(const char *filename, RSA * pub, char **comment_return)
262 return 1; 283 return 1;
263} 284}
264 285
286/* load public key from private-key file */
265int 287int
266load_public_key(const char *filename, Key * key, char **comment_return) 288load_public_key(const char *filename, Key * key, char **comment_return)
267{ 289{
@@ -497,3 +519,57 @@ load_private_key(const char *filename, const char *passphrase, Key *key,
497 close(fd); 519 close(fd);
498 return ret; 520 return ret;
499} 521}
522
523int
524do_load_public_key(const char *filename, Key *k, char **commentp)
525{
526 FILE *f;
527 unsigned int bits;
528 char line[1024];
529 char *cp;
530
531 f = fopen(filename, "r");
532 if (f != NULL) {
533 while (fgets(line, sizeof(line), f)) {
534 line[sizeof(line)-1] = '\0';
535 cp = line;
536 switch(*cp){
537 case '#':
538 case '\n':
539 case '\0':
540 continue;
541 }
542 /* Skip leading whitespace. */
543 for (; *cp && (*cp == ' ' || *cp == '\t'); cp++)
544 ;
545 if (*cp) {
546 bits = key_read(k, &cp);
547 if (bits != 0) {
548 if (commentp)
549 *commentp=xstrdup(filename);
550 fclose(f);
551 return 1;
552 }
553 }
554 }
555 fclose(f);
556 }
557 return 0;
558}
559
560/* load public key from pubkey file */
561int
562try_load_public_key(const char *filename, Key *k, char **commentp)
563{
564 char pub[MAXPATHLEN];
565
566 if (do_load_public_key(filename, k, commentp) == 1)
567 return 1;
568 if (strlcpy(pub, filename, sizeof pub) >= MAXPATHLEN)
569 return 0;
570 if (strlcat(pub, ".pub", sizeof pub) >= MAXPATHLEN)
571 return 0;
572 if (do_load_public_key(pub, k, commentp) == 1)
573 return 1;
574 return 0;
575}
diff --git a/authfile.h b/authfile.h
index afec27d54..4283d9381 100644
--- a/authfile.h
+++ b/authfile.h
@@ -1,3 +1,15 @@
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Functions to interface with the SSH_AUTHENTICATION_FD socket.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 */
1#ifndef AUTHFILE_H 13#ifndef AUTHFILE_H
2#define AUTHFILE_H 14#define AUTHFILE_H
3 15
@@ -18,9 +30,8 @@ save_private_key(const char *filename, const char *passphrase,
18 * comment of the key is returned in comment_return if it is non-NULL; the 30 * comment of the key is returned in comment_return if it is non-NULL; the
19 * caller must free the value with xfree. 31 * caller must free the value with xfree.
20 */ 32 */
21int 33int load_public_key(const char *filename, Key * pub, char **comment_return);
22load_public_key(const char *filename, Key * pub, 34int try_load_public_key(const char *filename, Key * pub, char **comment_return);
23 char **comment_return);
24 35
25/* 36/*
26 * Loads the private key from the file. Returns 0 if an error is encountered 37 * Loads the private key from the file. Returns 0 if an error is encountered
diff --git a/bufaux.c b/bufaux.c
index ecf529ff6..a3f220f89 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,23 +1,43 @@
1/* 1/*
2 *
3 * bufaux.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Wed Mar 29 02:24:47 1995 ylo
11 *
12 * Auxiliary functions for storing and retrieving various data types to/from 5 * Auxiliary functions for storing and retrieving various data types to/from
13 * Buffers. 6 * Buffers.
14 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 *
14 *
15 * SSH2 packet format added by Markus Friedl 15 * SSH2 packet format added by Markus Friedl
16 * Copyright (c) 2000 Markus Friedl. All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
16 * 26 *
27 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
28 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
29 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 37 */
18 38
19#include "includes.h" 39#include "includes.h"
20RCSID("$OpenBSD: bufaux.c,v 1.12 2000/06/20 01:39:39 markus Exp $"); 40RCSID("$OpenBSD: bufaux.c,v 1.13 2000/09/07 20:27:50 deraadt Exp $");
21 41
22#include "ssh.h" 42#include "ssh.h"
23#include <openssl/bn.h> 43#include <openssl/bn.h>
diff --git a/bufaux.h b/bufaux.h
index 42df46394..4f53858f7 100644
--- a/bufaux.h
+++ b/bufaux.h
@@ -1,17 +1,16 @@
1/* 1/*
2 *
3 * bufaux.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 * 5 *
10 * Created: Wed Mar 29 02:18:23 1995 ylo 6 * As far as I am concerned, the code I have written for this software
11 * 7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
12 */ 11 */
13 12
14/* RCSID("$OpenBSD: bufaux.h,v 1.7 2000/06/20 01:39:39 markus Exp $"); */ 13/* RCSID("$OpenBSD: bufaux.h,v 1.8 2000/09/07 20:27:50 deraadt Exp $"); */
15 14
16#ifndef BUFAUX_H 15#ifndef BUFAUX_H
17#define BUFAUX_H 16#define BUFAUX_H
diff --git a/buffer.c b/buffer.c
index db5ae0a23..d993c8bcd 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1,20 +1,18 @@
1/* 1/*
2 *
3 * buffer.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sat Mar 18 04:15:33 1995 ylo
11 *
12 * Functions for manipulating fifo buffers (that can grow if needed). 5 * Functions for manipulating fifo buffers (that can grow if needed).
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16#include "includes.h" 14#include "includes.h"
17RCSID("$OpenBSD: buffer.c,v 1.7 2000/06/20 01:39:39 markus Exp $"); 15RCSID("$OpenBSD: buffer.c,v 1.8 2000/09/07 20:27:50 deraadt Exp $");
18 16
19#include "xmalloc.h" 17#include "xmalloc.h"
20#include "buffer.h" 18#include "buffer.h"
diff --git a/buffer.h b/buffer.h
index a2b4effff..522036a41 100644
--- a/buffer.h
+++ b/buffer.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * buffer.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sat Mar 18 04:12:25 1995 ylo
11 *
12 * Code for manipulating FIFO buffers. 5 * Code for manipulating FIFO buffers.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: buffer.h,v 1.5 2000/06/20 01:39:39 markus Exp $"); */ 14/* RCSID("$OpenBSD: buffer.h,v 1.6 2000/09/07 20:27:50 deraadt Exp $"); */
17 15
18#ifndef BUFFER_H 16#ifndef BUFFER_H
19#define BUFFER_H 17#define BUFFER_H
diff --git a/canohost.c b/canohost.c
index 7ded0e3ba..98ce9744f 100644
--- a/canohost.c
+++ b/canohost.c
@@ -1,20 +1,18 @@
1/* 1/*
2 *
3 * canohost.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sun Jul 2 17:52:22 1995 ylo
11 *
12 * Functions for returning the canonical host name of the remote site. 5 * Functions for returning the canonical host name of the remote site.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16#include "includes.h" 14#include "includes.h"
17RCSID("$OpenBSD: canohost.c,v 1.13 2000/06/20 01:39:39 markus Exp $"); 15RCSID("$OpenBSD: canohost.c,v 1.15 2000/09/07 21:13:37 markus Exp $");
18 16
19#include "packet.h" 17#include "packet.h"
20#include "xmalloc.h" 18#include "xmalloc.h"
diff --git a/channels.c b/channels.c
index 4ac48a77a..48479c456 100644
--- a/channels.c
+++ b/channels.c
@@ -1,23 +1,46 @@
1/* 1/*
2 *
3 * channels.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Fri Mar 24 16:35:24 1995 ylo
11 *
12 * This file contains functions for generic socket connection forwarding. 5 * This file contains functions for generic socket connection forwarding.
13 * There is also code for initiating connection forwarding for X11 connections, 6 * There is also code for initiating connection forwarding for X11 connections,
14 * arbitrary tcp/ip connections, and the authentication agent connection. 7 * arbitrary tcp/ip connections, and the authentication agent connection.
15 * 8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 *
15 *
16 * SSH2 support added by Markus Friedl. 16 * SSH2 support added by Markus Friedl.
17 * Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
18 * Copyright (c) 1999 Dug Song. All rights reserved.
19 * Copyright (c) 1999 Theo de Raadt. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
31 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
32 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
33 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
34 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
39 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 40 */
18 41
19#include "includes.h" 42#include "includes.h"
20RCSID("$OpenBSD: channels.c,v 1.66 2000/08/19 21:55:51 markus Exp $"); 43RCSID("$OpenBSD: channels.c,v 1.68 2000/09/07 20:40:29 markus Exp $");
21 44
22#include "ssh.h" 45#include "ssh.h"
23#include "packet.h" 46#include "packet.h"
@@ -44,12 +67,6 @@ RCSID("$OpenBSD: channels.c,v 1.66 2000/08/19 21:55:51 markus Exp $");
44/* Max len of agent socket */ 67/* Max len of agent socket */
45#define MAX_SOCKET_NAME 100 68#define MAX_SOCKET_NAME 100
46 69
47/* default window/packet sizes for tcp/x11-fwd-channel */
48#define CHAN_TCP_WINDOW_DEFAULT (8*1024)
49#define CHAN_TCP_PACKET_DEFAULT (CHAN_TCP_WINDOW_DEFAULT/2)
50#define CHAN_X11_WINDOW_DEFAULT (4*1024)
51#define CHAN_X11_PACKET_DEFAULT (CHAN_X11_WINDOW_DEFAULT/2)
52
53/* 70/*
54 * Pointer to an array containing all allocated channels. The array is 71 * Pointer to an array containing all allocated channels. The array is
55 * dynamically extended as needed. 72 * dynamically extended as needed.
@@ -2340,7 +2357,7 @@ channel_set_fds(int id, int rfd, int wfd, int efd, int extusage)
2340 channel_register_fds(c, rfd, wfd, efd, extusage); 2357 channel_register_fds(c, rfd, wfd, efd, extusage);
2341 c->type = SSH_CHANNEL_OPEN; 2358 c->type = SSH_CHANNEL_OPEN;
2342 /* XXX window size? */ 2359 /* XXX window size? */
2343 c->local_window = c->local_window_max = c->local_maxpacket/2; 2360 c->local_window = c->local_window_max = c->local_maxpacket * 2;
2344 packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST); 2361 packet_start(SSH2_MSG_CHANNEL_WINDOW_ADJUST);
2345 packet_put_int(c->remote_id); 2362 packet_put_int(c->remote_id);
2346 packet_put_int(c->local_window); 2363 packet_put_int(c->local_window);
diff --git a/channels.h b/channels.h
index 9acdf5810..c0d60199c 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,38 @@
1/* RCSID("$OpenBSD: channels.h,v 1.16 2000/08/19 21:55:51 markus Exp $"); */ 1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 *
6 * As far as I am concerned, the code I have written for this software
7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
11 */
12/*
13 * Copyright (c) 2000 Markus Friedl. All rights reserved.
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */
35/* RCSID("$OpenBSD: channels.h,v 1.19 2000/09/07 21:13:37 markus Exp $"); */
2 36
3#ifndef CHANNELS_H 37#ifndef CHANNELS_H
4#define CHANNELS_H 38#define CHANNELS_H
@@ -74,6 +108,15 @@ struct Channel {
74#define CHAN_EXTENDED_READ 1 108#define CHAN_EXTENDED_READ 1
75#define CHAN_EXTENDED_WRITE 2 109#define CHAN_EXTENDED_WRITE 2
76 110
111/* default window/packet sizes for tcp/x11-fwd-channel */
112#define CHAN_SES_WINDOW_DEFAULT (32*1024)
113#define CHAN_SES_PACKET_DEFAULT (CHAN_SES_WINDOW_DEFAULT/2)
114#define CHAN_TCP_WINDOW_DEFAULT (32*1024)
115#define CHAN_TCP_PACKET_DEFAULT (CHAN_TCP_WINDOW_DEFAULT/2)
116#define CHAN_X11_WINDOW_DEFAULT (4*1024)
117#define CHAN_X11_PACKET_DEFAULT (CHAN_X11_WINDOW_DEFAULT/2)
118
119
77void channel_set_fds(int id, int rfd, int wfd, int efd, int extusage); 120void channel_set_fds(int id, int rfd, int wfd, int efd, int extusage);
78void channel_open(int id); 121void channel_open(int id);
79void channel_request(int id, char *service, int wantconfirm); 122void channel_request(int id, char *service, int wantconfirm);
diff --git a/cipher.c b/cipher.c
index a44e51d98..c7985a79c 100644
--- a/cipher.c
+++ b/cipher.c
@@ -1,18 +1,41 @@
1/* 1/*
2 *
3 * cipher.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 * 5 *
10 * Created: Wed Apr 19 17:41:39 1995 ylo 6 * As far as I am concerned, the code I have written for this software
7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
11 *
12 *
13 * Copyright (c) 1999 Niels Provos. All rights reserved.
14 * Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
11 * 24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 */ 35 */
13 36
14#include "includes.h" 37#include "includes.h"
15RCSID("$OpenBSD: cipher.c,v 1.29 2000/07/10 16:30:25 ho Exp $"); 38RCSID("$OpenBSD: cipher.c,v 1.31 2000/09/12 00:38:32 deraadt Exp $");
16 39
17#include "ssh.h" 40#include "ssh.h"
18#include "cipher.h" 41#include "cipher.h"
@@ -118,7 +141,7 @@ static char *cipher_names[] =
118 "des", 141 "des",
119 "3des", 142 "3des",
120 "tss", 143 "tss",
121 "rc4", 144 "rc4", /* Alleged RC4 */
122 "blowfish", 145 "blowfish",
123 "reserved", 146 "reserved",
124 "blowfish-cbc", 147 "blowfish-cbc",
diff --git a/cipher.h b/cipher.h
index a13799077..bc7a5e224 100644
--- a/cipher.h
+++ b/cipher.h
@@ -1,17 +1,16 @@
1/* 1/*
2 *
3 * cipher.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 * 5 *
10 * Created: Wed Apr 19 16:50:42 1995 ylo 6 * As far as I am concerned, the code I have written for this software
11 * 7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
12 */ 11 */
13 12
14/* RCSID("$OpenBSD: cipher.h,v 1.18 2000/06/20 01:39:40 markus Exp $"); */ 13/* RCSID("$OpenBSD: cipher.h,v 1.19 2000/09/07 20:27:50 deraadt Exp $"); */
15 14
16#ifndef CIPHER_H 15#ifndef CIPHER_H
17#define CIPHER_H 16#define CIPHER_H
diff --git a/clientloop.c b/clientloop.c
index d339e1274..7400a17a6 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,22 +1,65 @@
1/* 1/*
2 *
3 * clientloop.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
5 * The main loop for the interactive session (client side).
9 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
10 * 12 *
11 * Created: Sat Sep 23 12:23:57 1995 ylo
12 * 13 *
13 * The main loop for the interactive session (client side). 14 * Copyright (c) 1999 Theo de Raadt. All rights reserved.
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
14 * 36 *
15 * SSH2 support added by Markus Friedl. 37 * SSH2 support added by Markus Friedl.
38 * Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
39 *
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions
42 * are met:
43 * 1. Redistributions of source code must retain the above copyright
44 * notice, this list of conditions and the following disclaimer.
45 * 2. Redistributions in binary form must reproduce the above copyright
46 * notice, this list of conditions and the following disclaimer in the
47 * documentation and/or other materials provided with the distribution.
48 *
49 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
50 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
51 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
52 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
53 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
54 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
55 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
56 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
57 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
58 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
16 */ 59 */
17 60
18#include "includes.h" 61#include "includes.h"
19RCSID("$OpenBSD: clientloop.c,v 1.32 2000/08/19 22:21:19 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.35 2000/09/14 20:25:14 markus Exp $");
20 63
21#include "xmalloc.h" 64#include "xmalloc.h"
22#include "ssh.h" 65#include "ssh.h"
@@ -1010,10 +1053,9 @@ client_input_channel_open(int type, int plen)
1010 /* XXX move to channels.c */ 1053 /* XXX move to channels.c */
1011 sock = x11_connect_display(); 1054 sock = x11_connect_display();
1012 if (sock >= 0) { 1055 if (sock >= 0) {
1013/*XXX MAXPACK */
1014 id = channel_new("x11", SSH_CHANNEL_X11_OPEN, 1056 id = channel_new("x11", SSH_CHANNEL_X11_OPEN,
1015 sock, sock, -1, 4*1024, 32*1024, 0, 1057 sock, sock, -1, CHAN_X11_WINDOW_DEFAULT,
1016 xstrdup("x11")); 1058 CHAN_X11_PACKET_DEFAULT, 0, xstrdup("x11"));
1017 c = channel_lookup(id); 1059 c = channel_lookup(id);
1018 } 1060 }
1019 } 1061 }
@@ -1106,7 +1148,7 @@ client_input_channel_req(int id, void *arg)
1106 1148
1107 c = channel_lookup(id); 1149 c = channel_lookup(id);
1108 if (c == NULL) 1150 if (c == NULL)
1109 fatal("session_input_channel_req: channel %d: bad channel", id); 1151 fatal("client_input_channel_req: channel %d: bad channel", id);
1110 1152
1111 if (session_ident == -1) { 1153 if (session_ident == -1) {
1112 error("client_input_channel_req: no channel %d", id); 1154 error("client_input_channel_req: no channel %d", id);
diff --git a/compat.c b/compat.c
index 5d3940ab4..eeb6e2ef1 100644
--- a/compat.c
+++ b/compat.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 1999 Markus Friedl. All rights reserved. 2 * Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -28,7 +23,7 @@
28 */ 23 */
29 24
30#include "includes.h" 25#include "includes.h"
31RCSID("$OpenBSD: compat.c,v 1.21 2000/08/27 18:18:04 markus Exp $"); 26RCSID("$OpenBSD: compat.c,v 1.23 2000/09/07 21:13:37 markus Exp $");
32 27
33#include "ssh.h" 28#include "ssh.h"
34#include "packet.h" 29#include "packet.h"
diff --git a/compat.h b/compat.h
index 2060a39f4..5be188b79 100644
--- a/compat.h
+++ b/compat.h
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -26,7 +21,7 @@
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 23 */
29/* RCSID("$OpenBSD: compat.h,v 1.9 2000/06/20 01:39:40 markus Exp $"); */ 24/* RCSID("$OpenBSD: compat.h,v 1.10 2000/09/07 20:27:50 deraadt Exp $"); */
30 25
31#ifndef COMPAT_H 26#ifndef COMPAT_H
32#define COMPAT_H 27#define COMPAT_H
diff --git a/compress.c b/compress.c
index 4ec20104e..93266ed9f 100644
--- a/compress.c
+++ b/compress.c
@@ -1,20 +1,18 @@
1/* 1/*
2 *
3 * compress.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Wed Oct 25 22:12:46 1995 ylo
11 *
12 * Interface to packet compression for ssh. 5 * Interface to packet compression for ssh.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16#include "includes.h" 14#include "includes.h"
17RCSID("$OpenBSD: compress.c,v 1.8 2000/06/20 01:39:40 markus Exp $"); 15RCSID("$OpenBSD: compress.c,v 1.9 2000/09/07 20:27:50 deraadt Exp $");
18 16
19#include "ssh.h" 17#include "ssh.h"
20#include "buffer.h" 18#include "buffer.h"
diff --git a/compress.h b/compress.h
index ce7d7fab4..575716481 100644
--- a/compress.h
+++ b/compress.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * compress.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Wed Oct 25 22:12:46 1995 ylo
11 *
12 * Interface to packet compression for ssh. 5 * Interface to packet compression for ssh.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: compress.h,v 1.5 2000/06/20 01:39:40 markus Exp $"); */ 14/* RCSID("$OpenBSD: compress.h,v 1.6 2000/09/07 20:27:50 deraadt Exp $"); */
17 15
18#ifndef COMPRESS_H 16#ifndef COMPRESS_H
19#define COMPRESS_H 17#define COMPRESS_H
diff --git a/crc32.c b/crc32.c
index eb9b2dcd4..a4e1f27b0 100644
--- a/crc32.c
+++ b/crc32.c
@@ -1,55 +1,48 @@
1/* 1/*
2 * The implementation here was originally done by Gary S. Brown. 2 * COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
3 * I have borrowed the tables directly, and made some minor changes 3 * code or tables extracted from it, as desired without restriction.
4 * to the crc32-function (including changing the interface). 4 *
5 * //ylo 5 * First, the polynomial itself and its table of feedback terms. The
6 * polynomial is
7 * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
8 *
9 * Note that we take it "backwards" and put the highest-order term in
10 * the lowest-order bit. The X^32 term is "implied"; the LSB is the
11 * X^31 term, etc. The X^0 term (usually shown as "+1") results in
12 * the MSB being 1
13 *
14 * Note that the usual hardware shift register implementation, which
15 * is what we're using (we're merely optimizing it by doing eight-bit
16 * chunks at a time) shifts bits into the lowest-order term. In our
17 * implementation, that means shifting towards the right. Why do we
18 * do it this way? Because the calculated CRC must be transmitted in
19 * order from highest-order term to lowest-order term. UARTs transmit
20 * characters in order from LSB to MSB. By storing the CRC this way
21 * we hand it to the UART in the order low-byte to high-byte; the UART
22 * sends each low-bit to hight-bit; and the result is transmission bit
23 * by bit from highest- to lowest-order term without requiring any bit
24 * shuffling on our part. Reception works similarly
25 *
26 * The feedback terms table consists of 256, 32-bit entries. Notes
27 *
28 * The table can be generated at runtime if desired; code to do so
29 * is shown later. It might not be obvious, but the feedback
30 * terms simply represent the results of eight shift/xor opera
31 * tions for all combinations of data and CRC register values
32 *
33 * The values must be right-shifted by eight bits by the "updcrc
34 * logic; the shift must be unsigned (bring in zeroes). On some
35 * hardware you could probably optimize the shift in assembler by
36 * using byte-swap instructions
37 * polynomial $edb88320
6 */ 38 */
7 39
40
8#include "includes.h" 41#include "includes.h"
9RCSID("$OpenBSD: crc32.c,v 1.6 2000/08/19 02:17:12 deraadt Exp $"); 42RCSID("$OpenBSD: crc32.c,v 1.7 2000/09/07 20:27:51 deraadt Exp $");
10 43
11#include "crc32.h" 44#include "crc32.h"
12 45
13 /* ============================================================= */
14 /* COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or */
15 /* code or tables extracted from it, as desired without restriction. */
16 /* */
17 /* First, the polynomial itself and its table of feedback terms. The */
18 /* polynomial is */
19 /* X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 */
20 /* */
21 /* Note that we take it "backwards" and put the highest-order term in */
22 /* the lowest-order bit. The X^32 term is "implied"; the LSB is the */
23 /* X^31 term, etc. The X^0 term (usually shown as "+1") results in */
24 /* the MSB being 1. */
25 /* */
26 /* Note that the usual hardware shift register implementation, which */
27 /* is what we're using (we're merely optimizing it by doing eight-bit */
28 /* chunks at a time) shifts bits into the lowest-order term. In our */
29 /* implementation, that means shifting towards the right. Why do we */
30 /* do it this way? Because the calculated CRC must be transmitted in */
31 /* order from highest-order term to lowest-order term. UARTs transmit */
32 /* characters in order from LSB to MSB. By storing the CRC this way, */
33 /* we hand it to the UART in the order low-byte to high-byte; the UART */
34 /* sends each low-bit to hight-bit; and the result is transmission bit */
35 /* by bit from highest- to lowest-order term without requiring any bit */
36 /* shuffling on our part. Reception works similarly. */
37 /* */
38 /* The feedback terms table consists of 256, 32-bit entries. Notes: */
39 /* */
40 /* The table can be generated at runtime if desired; code to do so */
41 /* is shown later. It might not be obvious, but the feedback */
42 /* terms simply represent the results of eight shift/xor opera- */
43 /* tions for all combinations of data and CRC register values. */
44 /* */
45 /* The values must be right-shifted by eight bits by the "updcrc" */
46 /* logic; the shift must be unsigned (bring in zeroes). On some */
47 /* hardware you could probably optimize the shift in assembler by */
48 /* using byte-swap instructions. */
49 /* polynomial $edb88320 */
50 /* */
51 /* -------------------------------------------------------------------- */
52
53static unsigned int crc32_tab[] = { 46static unsigned int crc32_tab[] = {
54 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, 47 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
55 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, 48 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
diff --git a/crc32.h b/crc32.h
index 2c84a8017..58c4fbacd 100644
--- a/crc32.h
+++ b/crc32.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * crc32.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1992 Tatu Ylonen, Espoo, Finland 3 * Copyright (c) 1992 Tatu Ylonen, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Tue Feb 11 14:37:27 1992 ylo
11 *
12 * Functions for computing 32-bit CRC. 5 * Functions for computing 32-bit CRC.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: crc32.h,v 1.7 2000/08/19 21:29:40 deraadt Exp $"); */ 14/* RCSID("$OpenBSD: crc32.h,v 1.8 2000/09/07 20:27:51 deraadt Exp $"); */
17 15
18#ifndef CRC32_H 16#ifndef CRC32_H
19#define CRC32_H 17#define CRC32_H
diff --git a/deattack.c b/deattack.c
index 72e7f1e06..74a46c0e7 100644
--- a/deattack.c
+++ b/deattack.c
@@ -1,5 +1,6 @@
1/* $OpenBSD: deattack.c,v 1.9 2000/09/07 20:27:51 deraadt Exp $ */
2
1/* 3/*
2 * $OpenBSD: deattack.c,v 1.8 2000/08/19 02:17:12 deraadt Exp $
3 * Cryptographic attack detector for ssh - source code 4 * Cryptographic attack detector for ssh - source code
4 * 5 *
5 * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina. 6 * Copyright (c) 1998 CORE SDI S.A., Buenos Aires, Argentina.
diff --git a/dispatch.c b/dispatch.c
index 8df08b173..3daac2022 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +22,7 @@
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 23 */
29#include "includes.h" 24#include "includes.h"
30RCSID("$OpenBSD: dispatch.c,v 1.3 2000/06/20 01:39:41 markus Exp $"); 25RCSID("$OpenBSD: dispatch.c,v 1.4 2000/09/07 20:27:51 deraadt Exp $");
31#include "ssh.h" 26#include "ssh.h"
32#include "dispatch.h" 27#include "dispatch.h"
33#include "packet.h" 28#include "packet.h"
diff --git a/dispatch.h b/dispatch.h
index 12084aafe..dc9d3dd4e 100644
--- a/dispatch.h
+++ b/dispatch.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1enum { 24enum {
2 DISPATCH_BLOCK, 25 DISPATCH_BLOCK,
3 DISPATCH_NONBLOCK 26 DISPATCH_NONBLOCK
diff --git a/dsa.c b/dsa.c
index 5ce7abf70..4ff4b58f2 100644
--- a/dsa.c
+++ b/dsa.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -28,7 +23,7 @@
28 */ 23 */
29 24
30#include "includes.h" 25#include "includes.h"
31RCSID("$OpenBSD: dsa.c,v 1.10 2000/07/20 00:33:12 markus Exp $"); 26RCSID("$OpenBSD: dsa.c,v 1.11 2000/09/07 20:27:51 deraadt Exp $");
32 27
33#include "ssh.h" 28#include "ssh.h"
34#include "xmalloc.h" 29#include "xmalloc.h"
diff --git a/dsa.h b/dsa.h
index 3cece7c1f..252e7880b 100644
--- a/dsa.h
+++ b/dsa.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1#ifndef DSA_H 24#ifndef DSA_H
2#define DSA_H 25#define DSA_H
3 26
diff --git a/getput.h b/getput.h
index 5f6b14114..19ff5e14b 100644
--- a/getput.h
+++ b/getput.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * getput.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Wed Jun 28 22:36:30 1995 ylo
11 *
12 * Macros for storing and retrieving data in msb first and lsb first order. 5 * Macros for storing and retrieving data in msb first and lsb first order.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: getput.h,v 1.4 2000/06/20 01:39:41 markus Exp $"); */ 14/* RCSID("$OpenBSD: getput.h,v 1.5 2000/09/07 20:27:51 deraadt Exp $"); */
17 15
18#ifndef GETPUT_H 16#ifndef GETPUT_H
19#define GETPUT_H 17#define GETPUT_H
diff --git a/hmac.c b/hmac.c
index 27590ec80..48a176304 100644
--- a/hmac.c
+++ b/hmac.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -28,7 +23,7 @@
28 */ 23 */
29 24
30#include "includes.h" 25#include "includes.h"
31RCSID("$OpenBSD: hmac.c,v 1.3 2000/06/20 01:39:41 markus Exp $"); 26RCSID("$OpenBSD: hmac.c,v 1.4 2000/09/07 20:27:51 deraadt Exp $");
32 27
33#include "xmalloc.h" 28#include "xmalloc.h"
34#include "ssh.h" 29#include "ssh.h"
diff --git a/hmac.h b/hmac.h
index fb6802927..281300e25 100644
--- a/hmac.h
+++ b/hmac.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1#ifndef HMAC_H 24#ifndef HMAC_H
2#define HMAC_H 25#define HMAC_H
3 26
diff --git a/hostfile.c b/hostfile.c
index f58e1d67d..9c03a4688 100644
--- a/hostfile.c
+++ b/hostfile.c
@@ -1,20 +1,42 @@
1/* 1/*
2 *
3 * hostfile.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
5 * Functions for manipulating the known hosts files.
9 * 6 *
10 * Created: Thu Jun 29 07:10:56 1995 ylo 7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
11 * 12 *
12 * Functions for manipulating the known hosts files.
13 * 13 *
14 * Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
15 * Copyright (c) 1999 Niels Provos. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 */ 36 */
15 37
16#include "includes.h" 38#include "includes.h"
17RCSID("$OpenBSD: hostfile.c,v 1.19 2000/06/06 19:32:13 markus Exp $"); 39RCSID("$OpenBSD: hostfile.c,v 1.20 2000/09/07 20:27:51 deraadt Exp $");
18 40
19#include "packet.h" 41#include "packet.h"
20#include "match.h" 42#include "match.h"
diff --git a/hostfile.h b/hostfile.h
index c9bdd7f2e..9c2353bf9 100644
--- a/hostfile.h
+++ b/hostfile.h
@@ -1,3 +1,14 @@
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 *
6 * As far as I am concerned, the code I have written for this software
7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
11 */
1#ifndef HOSTFILE_H 12#ifndef HOSTFILE_H
2#define HOSTFILE_H 13#define HOSTFILE_H
3 14
diff --git a/includes.h b/includes.h
index 27569e18f..da08722ec 100644
--- a/includes.h
+++ b/includes.h
@@ -1,16 +1,14 @@
1/* 1/*
2 *
3 * includes.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Thu Mar 23 16:29:37 1995 ylo
11 *
12 * This file includes most of the needed system headers. 5 * This file includes most of the needed system headers.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16#ifndef INCLUDES_H 14#ifndef INCLUDES_H
diff --git a/kex.c b/kex.c
index b488090b4..8a83db47e 100644
--- a/kex.c
+++ b/kex.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -28,7 +23,7 @@
28 */ 23 */
29 24
30#include "includes.h" 25#include "includes.h"
31RCSID("$OpenBSD: kex.c,v 1.9 2000/07/10 16:30:25 ho Exp $"); 26RCSID("$OpenBSD: kex.c,v 1.10 2000/09/07 20:27:51 deraadt Exp $");
32 27
33#include "ssh.h" 28#include "ssh.h"
34#include "ssh2.h" 29#include "ssh2.h"
diff --git a/kex.h b/kex.h
index 7e5c67024..8c89687b6 100644
--- a/kex.h
+++ b/kex.h
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
diff --git a/key.c b/key.c
index f2ce75e7f..f7df0bb1d 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,14 @@
1/* 1/*
2 * read_bignum():
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 *
5 * As far as I am concerned, the code I have written for this software
6 * can be used freely for any purpose. Any derived versions of this
7 * software must be clearly marked as such, and if the derived work is
8 * incompatible with the protocol description in the RFC file, it must be
9 * called by a name other than "ssh" or "Secure Shell".
10 *
11 *
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 12 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 * 13 *
4 * Redistribution and use in source and binary forms, with or without 14 * Redistribution and use in source and binary forms, with or without
@@ -9,11 +19,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 19 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 20 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 21 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 22 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -26,10 +31,6 @@
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 33 */
29/*
30 * read_bignum():
31 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
32 */
33 34
34#include "includes.h" 35#include "includes.h"
35#include "ssh.h" 36#include "ssh.h"
@@ -41,7 +42,7 @@
41#include "dsa.h" 42#include "dsa.h"
42#include "uuencode.h" 43#include "uuencode.h"
43 44
44RCSID("$OpenBSD: key.c,v 1.10 2000/08/19 21:34:43 markus Exp $"); 45RCSID("$OpenBSD: key.c,v 1.11 2000/09/07 20:27:51 deraadt Exp $");
45 46
46#define SSH_DSS "ssh-dss" 47#define SSH_DSS "ssh-dss"
47 48
diff --git a/key.h b/key.h
index 53b3bfb26..8e1e0a98d 100644
--- a/key.h
+++ b/key.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1#ifndef KEY_H 24#ifndef KEY_H
2#define KEY_H 25#define KEY_H
3 26
diff --git a/log-client.c b/log-client.c
index 7615a94f0..505c8c337 100644
--- a/log-client.c
+++ b/log-client.c
@@ -1,21 +1,42 @@
1/* 1/*
2 *
3 * log-client.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Mon Mar 20 21:13:40 1995 ylo
11 *
12 * Client-side versions of debug(), log(), etc. These print to stderr. 5 * Client-side versions of debug(), log(), etc. These print to stderr.
13 * This is a stripped down version of log-server.c. 6 * This is a stripped down version of log-server.c.
14 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 *
14 *
15 * Copyright (c) 2000 Markus Friedl. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 */ 36 */
16 37
17#include "includes.h" 38#include "includes.h"
18RCSID("$OpenBSD: log-client.c,v 1.10 2000/08/19 02:57:33 deraadt Exp $"); 39RCSID("$OpenBSD: log-client.c,v 1.12 2000/09/12 20:53:10 markus Exp $");
19 40
20#include "xmalloc.h" 41#include "xmalloc.h"
21#include "ssh.h" 42#include "ssh.h"
@@ -36,7 +57,9 @@ log_init(char *av0, LogLevel level, SyslogFacility ignored1, int ignored2)
36 case SYSLOG_LEVEL_FATAL: 57 case SYSLOG_LEVEL_FATAL:
37 case SYSLOG_LEVEL_INFO: 58 case SYSLOG_LEVEL_INFO:
38 case SYSLOG_LEVEL_VERBOSE: 59 case SYSLOG_LEVEL_VERBOSE:
39 case SYSLOG_LEVEL_DEBUG: 60 case SYSLOG_LEVEL_DEBUG1:
61 case SYSLOG_LEVEL_DEBUG2:
62 case SYSLOG_LEVEL_DEBUG3:
40 log_level = level; 63 log_level = level;
41 break; 64 break;
42 default: 65 default:
@@ -54,7 +77,7 @@ do_log(LogLevel level, const char *fmt, va_list args)
54 77
55 if (level > log_level) 78 if (level > log_level)
56 return; 79 return;
57 if (level == SYSLOG_LEVEL_DEBUG) 80 if (level >= SYSLOG_LEVEL_DEBUG1)
58 fprintf(stderr, "debug: "); 81 fprintf(stderr, "debug: ");
59 vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); 82 vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
60 fprintf(stderr, "%s\r\n", msgbuf); 83 fprintf(stderr, "%s\r\n", msgbuf);
diff --git a/log-server.c b/log-server.c
index 9db77d9e0..270a3c698 100644
--- a/log-server.c
+++ b/log-server.c
@@ -1,21 +1,42 @@
1/* 1/*
2 *
3 * log-server.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Mon Mar 20 21:19:30 1995 ylo
11 *
12 * Server-side versions of debug(), log(), etc. These normally send the output 5 * Server-side versions of debug(), log(), etc. These normally send the output
13 * to the system log. 6 * to the system log.
14 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 *
14 *
15 * Copyright (c) 2000 Markus Friedl. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15 */ 36 */
16 37
17#include "includes.h" 38#include "includes.h"
18RCSID("$OpenBSD: log-server.c,v 1.15 2000/06/20 01:39:42 markus Exp $"); 39RCSID("$OpenBSD: log-server.c,v 1.17 2000/09/12 20:53:10 markus Exp $");
19 40
20#include <syslog.h> 41#include <syslog.h>
21#include "packet.h" 42#include "packet.h"
@@ -47,7 +68,9 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
47 case SYSLOG_LEVEL_FATAL: 68 case SYSLOG_LEVEL_FATAL:
48 case SYSLOG_LEVEL_INFO: 69 case SYSLOG_LEVEL_INFO:
49 case SYSLOG_LEVEL_VERBOSE: 70 case SYSLOG_LEVEL_VERBOSE:
50 case SYSLOG_LEVEL_DEBUG: 71 case SYSLOG_LEVEL_DEBUG1:
72 case SYSLOG_LEVEL_DEBUG2:
73 case SYSLOG_LEVEL_DEBUG3:
51 log_level = level; 74 log_level = level;
52 break; 75 break;
53 default: 76 default:
@@ -122,8 +145,16 @@ do_log(LogLevel level, const char *fmt, va_list args)
122 case SYSLOG_LEVEL_VERBOSE: 145 case SYSLOG_LEVEL_VERBOSE:
123 pri = LOG_INFO; 146 pri = LOG_INFO;
124 break; 147 break;
125 case SYSLOG_LEVEL_DEBUG: 148 case SYSLOG_LEVEL_DEBUG1:
126 txt = "debug"; 149 txt = "debug1";
150 pri = LOG_DEBUG;
151 break;
152 case SYSLOG_LEVEL_DEBUG2:
153 txt = "debug2";
154 pri = LOG_DEBUG;
155 break;
156 case SYSLOG_LEVEL_DEBUG3:
157 txt = "debug3";
127 pri = LOG_DEBUG; 158 pri = LOG_DEBUG;
128 break; 159 break;
129 default: 160 default:
diff --git a/log.c b/log.c
index 03038b2fb..13033ab42 100644
--- a/log.c
+++ b/log.c
@@ -1,9 +1,42 @@
1/* 1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 *
6 * As far as I am concerned, the code I have written for this software
7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
11 */
12/*
2 * Shared versions of debug(), log(), etc. 13 * Shared versions of debug(), log(), etc.
14 *
15 * Copyright (c) 2000 Markus Friedl. All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions
19 * are met:
20 * 1. Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3 */ 36 */
4 37
5#include "includes.h" 38#include "includes.h"
6RCSID("$OpenBSD: log.c,v 1.7 2000/01/04 00:07:59 markus Exp $"); 39RCSID("$OpenBSD: log.c,v 1.10 2000/09/12 20:53:10 markus Exp $");
7 40
8#include "ssh.h" 41#include "ssh.h"
9#include "xmalloc.h" 42#include "xmalloc.h"
@@ -60,7 +93,25 @@ debug(const char *fmt,...)
60{ 93{
61 va_list args; 94 va_list args;
62 va_start(args, fmt); 95 va_start(args, fmt);
63 do_log(SYSLOG_LEVEL_DEBUG, fmt, args); 96 do_log(SYSLOG_LEVEL_DEBUG1, fmt, args);
97 va_end(args);
98}
99
100void
101debug2(const char *fmt,...)
102{
103 va_list args;
104 va_start(args, fmt);
105 do_log(SYSLOG_LEVEL_DEBUG2, fmt, args);
106 va_end(args);
107}
108
109void
110debug3(const char *fmt,...)
111{
112 va_list args;
113 va_start(args, fmt);
114 do_log(SYSLOG_LEVEL_DEBUG3, fmt, args);
64 va_end(args); 115 va_end(args);
65} 116}
66 117
@@ -157,7 +208,9 @@ static struct {
157 { "ERROR", SYSLOG_LEVEL_ERROR }, 208 { "ERROR", SYSLOG_LEVEL_ERROR },
158 { "INFO", SYSLOG_LEVEL_INFO }, 209 { "INFO", SYSLOG_LEVEL_INFO },
159 { "VERBOSE", SYSLOG_LEVEL_VERBOSE }, 210 { "VERBOSE", SYSLOG_LEVEL_VERBOSE },
160 { "DEBUG", SYSLOG_LEVEL_DEBUG }, 211 { "DEBUG1", SYSLOG_LEVEL_DEBUG1 },
212 { "DEBUG2", SYSLOG_LEVEL_DEBUG2 },
213 { "DEBUG3", SYSLOG_LEVEL_DEBUG3 },
161 { NULL, 0 } 214 { NULL, 0 }
162}; 215};
163 216
diff --git a/login.c b/login.c
index c50721823..b13b84dc1 100644
--- a/login.c
+++ b/login.c
@@ -1,24 +1,45 @@
1/* 1/*
2 *
3 * login.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Fri Mar 24 14:51:08 1995 ylo
11 *
12 * This file performs some of the things login(1) normally does. We cannot 5 * This file performs some of the things login(1) normally does. We cannot
13 * easily use something like login -p -h host -f user, because there are 6 * easily use something like login -p -h host -f user, because there are
14 * several different logins around, and it is hard to determined what kind of 7 * several different logins around, and it is hard to determined what kind of
15 * login the current system has. Also, we want to be able to execute commands 8 * login the current system has. Also, we want to be able to execute commands
16 * on a tty. 9 * on a tty.
17 * 10 *
11 * As far as I am concerned, the code I have written for this software
12 * can be used freely for any purpose. Any derived versions of this
13 * software must be clearly marked as such, and if the derived work is
14 * incompatible with the protocol description in the RFC file, it must be
15 * called by a name other than "ssh" or "Secure Shell".
16 *
17 * Copyright (c) 1999 Theo de Raadt. All rights reserved.
18 * Copyright (c) 1999 Markus Friedl. All rights reserved.
19 *
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
22 * are met:
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
30 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
31 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
33 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
34 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
38 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18 */ 39 */
19 40
20#include "includes.h" 41#include "includes.h"
21RCSID("$OpenBSD: login.c,v 1.14 2000/06/20 01:39:42 markus Exp $"); 42RCSID("$OpenBSD: login.c,v 1.15 2000/09/07 20:27:52 deraadt Exp $");
22 43
23#include "loginrec.h" 44#include "loginrec.h"
24 45
diff --git a/match.c b/match.c
index c4f54b2c4..c373129b8 100644
--- a/match.c
+++ b/match.c
@@ -1,20 +1,18 @@
1/* 1/*
2 *
3 * match.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Thu Jun 22 01:17:50 1995 ylo
11 *
12 * Simple pattern matching, with '*' and '?' as wildcards. 5 * Simple pattern matching, with '*' and '?' as wildcards.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16#include "includes.h" 14#include "includes.h"
17RCSID("$OpenBSD: match.c,v 1.8 2000/06/20 01:39:42 markus Exp $"); 15RCSID("$OpenBSD: match.c,v 1.9 2000/09/07 20:27:52 deraadt Exp $");
18 16
19#include "ssh.h" 17#include "ssh.h"
20 18
diff --git a/match.h b/match.h
index 8eac0a502..564f5abf9 100644
--- a/match.h
+++ b/match.h
@@ -1,3 +1,16 @@
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * This file contains various auxiliary functions related to multiple
6 * precision integers.
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 */
1#ifndef MATCH_H 14#ifndef MATCH_H
2#define MATCH_H 15#define MATCH_H
3 16
diff --git a/mpaux.c b/mpaux.c
index 6caae64d6..1ee8df194 100644
--- a/mpaux.c
+++ b/mpaux.c
@@ -1,21 +1,19 @@
1/* 1/*
2 *
3 * mpaux.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sun Jul 16 04:29:30 1995 ylo
11 *
12 * This file contains various auxiliary functions related to multiple 5 * This file contains various auxiliary functions related to multiple
13 * precision integers. 6 * precision integers.
14 * 7 *
15*/ 8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 */
16 14
17#include "includes.h" 15#include "includes.h"
18RCSID("$OpenBSD: mpaux.c,v 1.13 2000/06/20 01:39:42 markus Exp $"); 16RCSID("$OpenBSD: mpaux.c,v 1.14 2000/09/07 20:27:52 deraadt Exp $");
19 17
20#include <openssl/bn.h> 18#include <openssl/bn.h>
21#include "getput.h" 19#include "getput.h"
diff --git a/mpaux.h b/mpaux.h
index b05c14bf7..9de17276b 100644
--- a/mpaux.h
+++ b/mpaux.h
@@ -1,19 +1,18 @@
1/* 1/*
2 *
3 * mpaux.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sun Jul 16 04:29:30 1995 ylo
11 *
12 * This file contains various auxiliary functions related to multiple 5 * This file contains various auxiliary functions related to multiple
13 * precision integers. 6 * precision integers.
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
14 */ 13 */
15 14
16/* RCSID("$OpenBSD: mpaux.h,v 1.7 2000/06/20 01:39:42 markus Exp $"); */ 15/* RCSID("$OpenBSD: mpaux.h,v 1.8 2000/09/07 20:27:52 deraadt Exp $"); */
17 16
18#ifndef MPAUX_H 17#ifndef MPAUX_H
19#define MPAUX_H 18#define MPAUX_H
diff --git a/myproposal.h b/myproposal.h
index 9611d8951..18db954c5 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1#define KEX_DEFAULT_KEX "diffie-hellman-group1-sha1" 24#define KEX_DEFAULT_KEX "diffie-hellman-group1-sha1"
2#define KEX_DEFAULT_PK_ALG "ssh-dss" 25#define KEX_DEFAULT_PK_ALG "ssh-dss"
3#define KEX_DEFAULT_ENCRYPT "3des-cbc,blowfish-cbc,arcfour,cast128-cbc" 26#define KEX_DEFAULT_ENCRYPT "3des-cbc,blowfish-cbc,arcfour,cast128-cbc"
diff --git a/nchan.c b/nchan.c
index 51c5a4cad..55d391e03 100644
--- a/nchan.c
+++ b/nchan.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -28,7 +23,7 @@
28 */ 23 */
29 24
30#include "includes.h" 25#include "includes.h"
31RCSID("$OpenBSD: nchan.c,v 1.18 2000/06/20 01:39:42 markus Exp $"); 26RCSID("$OpenBSD: nchan.c,v 1.19 2000/09/07 20:27:52 deraadt Exp $");
32 27
33#include "ssh.h" 28#include "ssh.h"
34 29
diff --git a/nchan.h b/nchan.h
index 38205cfaf..366b894ae 100644
--- a/nchan.h
+++ b/nchan.h
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +22,7 @@
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 23 */
29 24
30/* RCSID("$OpenBSD: nchan.h,v 1.8 2000/06/20 01:39:43 markus Exp $"); */ 25/* RCSID("$OpenBSD: nchan.h,v 1.9 2000/09/07 20:27:52 deraadt Exp $"); */
31 26
32#ifndef NCHAN_H 27#ifndef NCHAN_H
33#define NCHAN_H 28#define NCHAN_H
diff --git a/nchan.ms b/nchan.ms
index eb49cd3b4..1679d39f3 100644
--- a/nchan.ms
+++ b/nchan.ms
@@ -9,11 +9,6 @@
9.\" 2. Redistributions in binary form must reproduce the above copyright 9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the 10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution. 11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by Markus Friedl.
15.\" 4. The name of the author may not be used to endorse or promote products
16.\" derived from this software without specific prior written permission.
17.\" 12.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
diff --git a/packet.c b/packet.c
index 8f9311074..62239eb7d 100644
--- a/packet.c
+++ b/packet.c
@@ -1,23 +1,43 @@
1/* 1/*
2 *
3 * packet.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sat Mar 18 02:40:40 1995 ylo
11 *
12 * This file contains code implementing the packet protocol and communication 5 * This file contains code implementing the packet protocol and communication
13 * with the other side. This same code is used both on client and server side. 6 * with the other side. This same code is used both on client and server side.
14 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 *
14 *
15 * SSH2 packet format added by Markus Friedl. 15 * SSH2 packet format added by Markus Friedl.
16 * Copyright (c) 2000 Markus Friedl. All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
16 * 26 *
27 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
28 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
29 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 */ 37 */
18 38
19#include "includes.h" 39#include "includes.h"
20RCSID("$OpenBSD: packet.c,v 1.34 2000/08/19 02:17:12 deraadt Exp $"); 40RCSID("$OpenBSD: packet.c,v 1.35 2000/09/07 20:27:52 deraadt Exp $");
21 41
22#include "xmalloc.h" 42#include "xmalloc.h"
23#include "buffer.h" 43#include "buffer.h"
diff --git a/packet.h b/packet.h
index 015d9ec85..7a3935399 100644
--- a/packet.h
+++ b/packet.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * packet.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sat Mar 18 02:02:14 1995 ylo
11 *
12 * Interface for the packet protocol functions. 5 * Interface for the packet protocol functions.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: packet.h,v 1.16 2000/06/20 01:39:43 markus Exp $"); */ 14/* RCSID("$OpenBSD: packet.h,v 1.17 2000/09/07 20:27:52 deraadt Exp $"); */
17 15
18#ifndef PACKET_H 16#ifndef PACKET_H
19#define PACKET_H 17#define PACKET_H
diff --git a/pty.c b/pty.c
index d610a4543..cbbe5845e 100644
--- a/pty.c
+++ b/pty.c
@@ -1,20 +1,18 @@
1/* 1/*
2 *
3 * pty.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Fri Mar 17 04:37:25 1995 ylo
11 *
12 * Allocating a pseudo-terminal, and making it the controlling tty. 5 * Allocating a pseudo-terminal, and making it the controlling tty.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16#include "includes.h" 14#include "includes.h"
17RCSID("$OpenBSD: pty.c,v 1.14 2000/06/20 01:39:43 markus Exp $"); 15RCSID("$OpenBSD: pty.c,v 1.16 2000/09/07 21:13:37 markus Exp $");
18 16
19#ifdef HAVE_UTIL_H 17#ifdef HAVE_UTIL_H
20# include <util.h> 18# include <util.h>
diff --git a/pty.h b/pty.h
index 284196813..13d8e6026 100644
--- a/pty.h
+++ b/pty.h
@@ -1,19 +1,18 @@
1/* 1/*
2 *
3 * pty.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Fri Mar 17 05:03:28 1995 ylo
11 *
12 * Functions for allocating a pseudo-terminal and making it the controlling 5 * Functions for allocating a pseudo-terminal and making it the controlling
13 * tty. 6 * tty.
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
14 */ 13 */
15 14
16/* RCSID("$OpenBSD: pty.h,v 1.7 2000/06/20 01:39:43 markus Exp $"); */ 15/* RCSID("$OpenBSD: pty.h,v 1.8 2000/09/07 20:27:52 deraadt Exp $"); */
17 16
18#ifndef PTY_H 17#ifndef PTY_H
19#define PTY_H 18#define PTY_H
diff --git a/radix.c b/radix.c
index 7e668ea65..842920484 100644
--- a/radix.c
+++ b/radix.c
@@ -1,13 +1,31 @@
1/* 1/*
2 * radix.c 2 * Copyright (c) 1999 Dug Song. All rights reserved.
3 * 3 *
4 * Dug Song <dugsong@UMICH.EDU> 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 */ 23 */
6 24
7#include "includes.h" 25#include "includes.h"
8#include "uuencode.h" 26#include "uuencode.h"
9 27
10RCSID("$OpenBSD: radix.c,v 1.12 2000/06/22 23:55:00 djm Exp $"); 28RCSID("$OpenBSD: radix.c,v 1.13 2000/09/07 20:27:52 deraadt Exp $");
11 29
12#ifdef AFS 30#ifdef AFS
13#include <krb.h> 31#include <krb.h>
diff --git a/readconf.c b/readconf.c
index c9e0f5944..4f4a16de8 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,20 +1,18 @@
1/* 1/*
2 *
3 * readconf.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sat Apr 22 00:03:10 1995 ylo
11 *
12 * Functions for reading the configuration files. 5 * Functions for reading the configuration files.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16#include "includes.h" 14#include "includes.h"
17RCSID("$OpenBSD: readconf.c,v 1.45 2000/08/02 17:27:04 provos Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.47 2000/09/07 21:13:37 markus Exp $");
18 16
19#include "ssh.h" 17#include "ssh.h"
20#include "cipher.h" 18#include "cipher.h"
diff --git a/readconf.h b/readconf.h
index e33cebce1..23df57b42 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * readconf.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Sat Apr 22 00:25:29 1995 ylo
11 *
12 * Functions for reading the configuration file. 5 * Functions for reading the configuration file.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: readconf.h,v 1.20 2000/06/20 01:39:43 markus Exp $"); */ 14/* RCSID("$OpenBSD: readconf.h,v 1.21 2000/09/07 20:27:53 deraadt Exp $"); */
17 15
18#ifndef READCONF_H 16#ifndef READCONF_H
19#define READCONF_H 17#define READCONF_H
diff --git a/rsa.c b/rsa.c
index 46ad6b6e2..8f6444032 100644
--- a/rsa.c
+++ b/rsa.c
@@ -1,15 +1,40 @@
1/* 1/*
2 *
3 * rsa.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 * 5 *
10 * Created: Fri Mar 3 22:07:06 1995 ylo 6 * As far as I am concerned, the code I have written for this software
7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
11 *
12 *
13 * Copyright (c) 1999 Niels Provos. All rights reserved.
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 * notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 * notice, this list of conditions and the following disclaimer in the
22 * documentation and/or other materials provided with the distribution.
11 * 23 *
12 * Description of the RSA algorithm can be found e.g. from the following sources: 24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *
35 *
36 * Description of the RSA algorithm can be found e.g. from the following
37 * sources:
13 * 38 *
14 * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1994. 39 * Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1994.
15 * 40 *
@@ -25,17 +50,17 @@
25 * Hans Riesel: Prime Numbers and Computer Methods for Factorization. 50 * Hans Riesel: Prime Numbers and Computer Methods for Factorization.
26 * Birkhauser, 1994. 51 * Birkhauser, 1994.
27 * 52 *
28 * The RSA Frequently Asked Questions document by RSA Data Security, Inc., 1995. 53 * The RSA Frequently Asked Questions document by RSA Data Security,
54 * Inc., 1995.
29 * 55 *
30 * RSA in 3 lines of perl by Adam Back <aba@atlax.ex.ac.uk>, 1995, as included 56 * RSA in 3 lines of perl by Adam Back <aba@atlax.ex.ac.uk>, 1995, as
31 * below: 57 * included below:
32 * 58 *
33 * [gone - had to be deleted - what a pity] 59 * [gone - had to be deleted - what a pity]
34 * 60 */
35*/
36 61
37#include "includes.h" 62#include "includes.h"
38RCSID("$OpenBSD: rsa.c,v 1.15 2000/06/20 01:39:44 markus Exp $"); 63RCSID("$OpenBSD: rsa.c,v 1.16 2000/09/07 20:27:53 deraadt Exp $");
39 64
40#include "rsa.h" 65#include "rsa.h"
41#include "ssh.h" 66#include "ssh.h"
diff --git a/rsa.h b/rsa.h
index dfbf6f487..93a2dac85 100644
--- a/rsa.h
+++ b/rsa.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * rsa.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Fri Mar 3 22:01:06 1995 ylo
11 *
12 * RSA key generation, encryption and decryption. 5 * RSA key generation, encryption and decryption.
13 * 6 *
14*/ 7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 */
15 13
16/* RCSID("$OpenBSD: rsa.h,v 1.7 2000/06/20 01:39:44 markus Exp $"); */ 14/* RCSID("$OpenBSD: rsa.h,v 1.8 2000/09/07 20:27:53 deraadt Exp $"); */
17 15
18#ifndef RSA_H 16#ifndef RSA_H
19#define RSA_H 17#define RSA_H
diff --git a/scp.c b/scp.c
index 23ecc41ca..79c310c5e 100644
--- a/scp.c
+++ b/scp.c
@@ -1,14 +1,42 @@
1/* 1/*
2 * scp - secure remote copy. This is basically patched BSD rcp which
3 * uses ssh to do the data transfer (instead of using rcmd).
2 * 4 *
3 * scp - secure remote copy. This is basically patched BSD rcp which uses ssh 5 * NOTE: This version should NOT be suid root. (This uses ssh to
4 * to do the data transfer (instead of using rcmd). 6 * do the transfer and ssh has the necessary privileges.)
5 *
6 * NOTE: This version should NOT be suid root. (This uses ssh to do the transfer
7 * and ssh has the necessary privileges.)
8 * 7 *
9 * 1995 Timo Rinne <tri@iki.fi>, Tatu Ylonen <ylo@cs.hut.fi> 8 * 1995 Timo Rinne <tri@iki.fi>, Tatu Ylonen <ylo@cs.hut.fi>
10 * 9 *
11*/ 10 * As far as I am concerned, the code I have written for this software
11 * can be used freely for any purpose. Any derived versions of this
12 * software must be clearly marked as such, and if the derived work is
13 * incompatible with the protocol description in the RFC file, it must be
14 * called by a name other than "ssh" or "Secure Shell".
15 */
16/*
17 * Copyright (c) 1999 Theo de Raadt. All rights reserved.
18 * Copyright (c) 1999 Aaron Campbell. All rights reserved.
19 *
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
22 * are met:
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
30 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
31 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
33 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
34 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
38 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */
12 40
13/* 41/*
14 * Parts from: 42 * Parts from:
@@ -47,7 +75,7 @@
47 */ 75 */
48 76
49#include "includes.h" 77#include "includes.h"
50RCSID("$OpenBSD: scp.c,v 1.37 2000/09/01 15:25:13 deraadt Exp $"); 78RCSID("$OpenBSD: scp.c,v 1.39 2000/09/07 20:53:00 markus Exp $");
51 79
52#include "ssh.h" 80#include "ssh.h"
53#include "xmalloc.h" 81#include "xmalloc.h"
diff --git a/servconf.c b/servconf.c
index 6affb51e9..815510814 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,18 +1,16 @@
1/* 1/*
2 *
3 * servconf.c
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 3 * All rights reserved
9 * 4 *
10 * Created: Mon Aug 21 15:48:58 1995 ylo 5 * As far as I am concerned, the code I have written for this software
11 * 6 * can be used freely for any purpose. Any derived versions of this
7 * software must be clearly marked as such, and if the derived work is
8 * incompatible with the protocol description in the RFC file, it must be
9 * called by a name other than "ssh" or "Secure Shell".
12 */ 10 */
13 11
14#include "includes.h" 12#include "includes.h"
15RCSID("$OpenBSD: servconf.c,v 1.50 2000/07/22 09:14:36 markus Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.51 2000/09/07 20:27:53 deraadt Exp $");
16 14
17#include "ssh.h" 15#include "ssh.h"
18#include "servconf.h" 16#include "servconf.h"
diff --git a/servconf.h b/servconf.h
index 3b65c6a6f..f00a1284f 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,19 +1,17 @@
1/* 1/*
2 *
3 * servconf.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Mon Aug 21 15:35:03 1995 ylo
11 *
12 * Definitions for server configuration data and for the functions reading it. 5 * Definitions for server configuration data and for the functions reading it.
13 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
14 */ 12 */
15 13
16/* RCSID("$OpenBSD: servconf.h,v 1.27 2000/07/22 09:14:36 markus Exp $"); */ 14/* RCSID("$OpenBSD: servconf.h,v 1.28 2000/09/07 20:27:53 deraadt Exp $"); */
17 15
18#ifndef SERVCONF_H 16#ifndef SERVCONF_H
19#define SERVCONF_H 17#define SERVCONF_H
diff --git a/serverloop.c b/serverloop.c
index 8c17c0d56..c2b2d0222 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -2,12 +2,36 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Sun Sep 10 00:30:37 1995 ylo
6 * Server main loop for handling the interactive session. 5 * Server main loop for handling the interactive session.
7 */ 6 *
8/* 7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 *
9 * SSH2 support by Markus Friedl. 13 * SSH2 support by Markus Friedl.
10 * Copyright (c) 2000 Markus Friedl. All rights reserved. 14 * Copyright (c) 2000 Markus Friedl. All rights reserved.
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11 */ 35 */
12 36
13#include "includes.h" 37#include "includes.h"
@@ -736,7 +760,8 @@ input_direct_tcpip(void)
736 if (sock < 0) 760 if (sock < 0)
737 return -1; 761 return -1;
738 return channel_new("direct-tcpip", SSH_CHANNEL_OPEN, 762 return channel_new("direct-tcpip", SSH_CHANNEL_OPEN,
739 sock, sock, -1, 4*1024, 32*1024, 0, xstrdup("direct-tcpip")); 763 sock, sock, -1, CHAN_TCP_WINDOW_DEFAULT,
764 CHAN_TCP_PACKET_DEFAULT, 0, xstrdup("direct-tcpip"));
740} 765}
741 766
742void 767void
@@ -769,7 +794,8 @@ server_input_channel_open(int type, int plen)
769 * CHANNEL_REQUEST messages is registered. 794 * CHANNEL_REQUEST messages is registered.
770 */ 795 */
771 id = channel_new(ctype, SSH_CHANNEL_LARVAL, 796 id = channel_new(ctype, SSH_CHANNEL_LARVAL,
772 -1, -1, -1, 0, 32*1024, 0, xstrdup("server-session")); 797 -1, -1, -1, 0, CHAN_SES_PACKET_DEFAULT,
798 0, xstrdup("server-session"));
773 if (session_open(id) == 1) { 799 if (session_open(id) == 1) {
774 channel_register_callback(id, SSH2_MSG_CHANNEL_REQUEST, 800 channel_register_callback(id, SSH2_MSG_CHANNEL_REQUEST,
775 session_input_channel_req, (void *)0); 801 session_input_channel_req, (void *)0);
diff --git a/session.c b/session.c
index a537efdd4..0cc919c6b 100644
--- a/session.c
+++ b/session.c
@@ -1,14 +1,39 @@
1/* 1/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved 3 * All rights reserved
4 */ 4 *
5/* 5 * As far as I am concerned, the code I have written for this software
6 * can be used freely for any purpose. Any derived versions of this
7 * software must be clearly marked as such, and if the derived work is
8 * incompatible with the protocol description in the RFC file, it must be
9 * called by a name other than "ssh" or "Secure Shell".
10 *
6 * SSH2 support by Markus Friedl. 11 * SSH2 support by Markus Friedl.
7 * Copyright (c) 2000 Markus Friedl. All rights reserved. 12 * Copyright (c) 2000 Markus Friedl. All rights reserved.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8 */ 33 */
9 34
10#include "includes.h" 35#include "includes.h"
11RCSID("$OpenBSD: session.c,v 1.35 2000/09/04 19:07:21 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.37 2000/09/07 20:27:53 deraadt Exp $");
12 37
13#include "xmalloc.h" 38#include "xmalloc.h"
14#include "ssh.h" 39#include "ssh.h"
@@ -684,6 +709,11 @@ do_login(Session *s)
684 last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name, 709 last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,
685 hostname, sizeof(hostname)); 710 hostname, sizeof(hostname));
686 711
712 /* Get the time and hostname when the user last logged in. */
713 hostname[0] = '\0';
714 last_login_time = get_last_login_time(pw->pw_uid, pw->pw_name,
715 hostname, sizeof(hostname));
716
687 /* Record that there was a login on that tty from the remote host. */ 717 /* Record that there was a login on that tty from the remote host. */
688 record_login(pid, s->tty, pw->pw_name, pw->pw_uid, 718 record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
689 get_remote_name_or_ip(), (struct sockaddr *)&from); 719 get_remote_name_or_ip(), (struct sockaddr *)&from);
@@ -712,7 +742,7 @@ do_login(Session *s)
712 if (strcmp(buf, "") == 0) 742 if (strcmp(buf, "") == 0)
713 printf("Last login: %s\r\n", time_string); 743 printf("Last login: %s\r\n", time_string);
714 else 744 else
715 printf("Last login: %s from %s\r\n", time_string, buf); 745 printf("Last login: %s from %s\r\n", time_string, hostname);
716 } 746 }
717 if (options.print_motd) { 747 if (options.print_motd) {
718#ifdef HAVE_LOGIN_CAP 748#ifdef HAVE_LOGIN_CAP
diff --git a/session.h b/session.h
index a3427bcb0..bce99f77c 100644
--- a/session.h
+++ b/session.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1#ifndef SESSION_H 24#ifndef SESSION_H
2#define SESSION_H 25#define SESSION_H
3 26
diff --git a/sftp-server.8 b/sftp-server.8
index 85720a082..9811a3b42 100644
--- a/sftp-server.8
+++ b/sftp-server.8
@@ -1,4 +1,27 @@
1.\" $OpenBSD: sftp-server.8,v 1.1 2000/08/31 21:52:23 markus Exp $ 1.\" $OpenBSD: sftp-server.8,v 1.2 2000/09/07 20:27:53 deraadt Exp $
2.\"
3.\" Copyright (c) 2000 Markus Friedl. All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
2.Dd August 30, 2000 25.Dd August 30, 2000
3.Dt SFTP-SERVER 8 26.Dt SFTP-SERVER 8
4.Os 27.Os
diff --git a/sftp-server.c b/sftp-server.c
index 39cecac59..c5cd47b7d 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -27,7 +22,7 @@
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 23 */
29#include "includes.h" 24#include "includes.h"
30RCSID("$OpenBSD: sftp-server.c,v 1.4 2000/09/04 19:10:08 markus Exp $"); 25RCSID("$OpenBSD: sftp-server.c,v 1.6 2000/09/07 20:27:53 deraadt Exp $");
31 26
32#include "ssh.h" 27#include "ssh.h"
33#include "buffer.h" 28#include "buffer.h"
@@ -194,22 +189,22 @@ decode_attrib(Buffer *b)
194{ 189{
195 static Attrib a; 190 static Attrib a;
196 attrib_clear(&a); 191 attrib_clear(&a);
197 a.flags = get_int(); 192 a.flags = buffer_get_int(b);
198 if (a.flags & SSH_FXA_HAVE_SIZE) { 193 if (a.flags & SSH_FXA_HAVE_SIZE) {
199 a.size_high = get_int(); 194 a.size_high = buffer_get_int(b);
200 a.size_low = get_int(); 195 a.size_low = buffer_get_int(b);
201 a.size = (((u_int64_t) a.size_high) << 32) + a.size_low; 196 a.size = (((u_int64_t) a.size_high) << 32) + a.size_low;
202 } 197 }
203 if (a.flags & SSH_FXA_HAVE_UGID) { 198 if (a.flags & SSH_FXA_HAVE_UGID) {
204 a.uid = get_int(); 199 a.uid = buffer_get_int(b);
205 a.gid = get_int(); 200 a.gid = buffer_get_int(b);
206 } 201 }
207 if (a.flags & SSH_FXA_HAVE_PERM) { 202 if (a.flags & SSH_FXA_HAVE_PERM) {
208 a.perm = get_int(); 203 a.perm = buffer_get_int(b);
209 } 204 }
210 if (a.flags & SSH_FXA_HAVE_TIME) { 205 if (a.flags & SSH_FXA_HAVE_TIME) {
211 a.atime = get_int(); 206 a.atime = buffer_get_int(b);
212 a.mtime = get_int(); 207 a.mtime = buffer_get_int(b);
213 } 208 }
214 return &a; 209 return &a;
215} 210}
@@ -321,7 +316,7 @@ handle_to_string(int handle, char **stringp, int *hlenp)
321} 316}
322 317
323int 318int
324handle_from_string(char *handle, int hlen) 319handle_from_string(char *handle, u_int hlen)
325{ 320{
326/* XXX OVERFLOW ? */ 321/* XXX OVERFLOW ? */
327 char *ep; 322 char *ep;
@@ -380,7 +375,8 @@ int
380get_handle(void) 375get_handle(void)
381{ 376{
382 char *handle; 377 char *handle;
383 int hlen, val; 378 int val;
379 u_int hlen;
384 handle = get_string(&hlen); 380 handle = get_string(&hlen);
385 val = handle_from_string(handle, hlen); 381 val = handle_from_string(handle, hlen);
386 xfree(handle); 382 xfree(handle);
@@ -580,7 +576,7 @@ process_write(void)
580{ 576{
581 u_int32_t id, off_high, off_low; 577 u_int32_t id, off_high, off_low;
582 u_int64_t off; 578 u_int64_t off;
583 int len; 579 u_int len;
584 int handle, fd, ret, status = SSH_FX_FAILURE; 580 int handle, fd, ret, status = SSH_FX_FAILURE;
585 char *data; 581 char *data;
586 582
@@ -722,8 +718,8 @@ process_fsetstat(void)
722 u_int32_t id; 718 u_int32_t id;
723 int handle, fd, ret; 719 int handle, fd, ret;
724 int status = SSH_FX_OK; 720 int status = SSH_FX_OK;
725 char *name = NULL; 721 char *name;
726 722
727 id = get_int(); 723 id = get_int();
728 handle = get_handle(); 724 handle = get_handle();
729 a = get_attrib(); 725 a = get_attrib();
@@ -1017,7 +1013,7 @@ main(int ac, char **av)
1017{ 1013{
1018 fd_set rset, wset; 1014 fd_set rset, wset;
1019 int in, out, max; 1015 int in, out, max;
1020 size_t len, olen; 1016 ssize_t len, olen;
1021 1017
1022 handle_init(); 1018 handle_init();
1023 1019
diff --git a/ssh-add.1 b/ssh-add.1
index 0e6930aba..aa12ef34d 100644
--- a/ssh-add.1
+++ b/ssh-add.1
@@ -1,15 +1,39 @@
1.\" -*- nroff -*- 1.\" -*- nroff -*-
2.\" 2.\"
3.\" ssh-add.1
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\" All rights reserved 5.\" All rights reserved
9.\" 6.\"
10.\" Created: Sat Apr 22 23:55:14 1995 ylo 7.\" As far as I am concerned, the code I have written for this software
8.\" can be used freely for any purpose. Any derived versions of this
9.\" software must be clearly marked as such, and if the derived work is
10.\" incompatible with the protocol description in the RFC file, it must be
11.\" called by a name other than "ssh" or "Secure Shell".
12.\"
13.\"
14.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
15.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
16.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
17.\"
18.\" Redistribution and use in source and binary forms, with or without
19.\" modification, are permitted provided that the following conditions
20.\" are met:
21.\" 1. Redistributions of source code must retain the above copyright
22.\" notice, this list of conditions and the following disclaimer.
23.\" 2. Redistributions in binary form must reproduce the above copyright
24.\" notice, this list of conditions and the following disclaimer in the
25.\" documentation and/or other materials provided with the distribution.
11.\" 26.\"
12.\" $Id: ssh-add.1,v 1.16 2000/09/05 02:34:54 djm Exp $ 27.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
28.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
29.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13.\" 37.\"
14.Dd September 25, 1999 38.Dd September 25, 1999
15.Dt SSH-ADD 1 39.Dt SSH-ADD 1
@@ -103,7 +127,8 @@ newer versions bore successively more restrictive licenses.
103This version of OpenSSH 127This version of OpenSSH
104.Bl -bullet 128.Bl -bullet
105.It 129.It
106has all components of a restrictive nature (i.e., patents) 130has all components of a restrictive nature (i.e., patents, see
131.Xr crypto 3 )
107directly removed from the source code; any licensed or patented components 132directly removed from the source code; any licensed or patented components
108are chosen from 133are chosen from
109external libraries. 134external libraries.
@@ -122,3 +147,4 @@ supports one-time password authentication with
122.Xr ssh-agent 1 , 147.Xr ssh-agent 1 ,
123.Xr ssh-keygen 1 , 148.Xr ssh-keygen 1 ,
124.Xr sshd 8 , 149.Xr sshd 8 ,
150.Xr crypto 3
diff --git a/ssh-add.c b/ssh-add.c
index e24a94d71..06884d67f 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -2,15 +2,40 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Thu Apr 6 00:52:24 1995 ylo
6 * Adds an identity to the authentication server, or removes an identity. 5 * Adds an identity to the authentication server, or removes an identity.
7 * 6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 *
8 * SSH2 implementation, 13 * SSH2 implementation,
9 * Copyright (c) 2000 Markus Friedl. All rights reserved. 14 * Copyright (c) 2000 Markus Friedl. All rights reserved.
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 */ 35 */
11 36
12#include "includes.h" 37#include "includes.h"
13RCSID("$OpenBSD: ssh-add.c,v 1.20 2000/08/28 03:50:54 deraadt Exp $"); 38RCSID("$OpenBSD: ssh-add.c,v 1.22 2000/09/07 20:27:54 deraadt Exp $");
14 39
15#include <openssl/evp.h> 40#include <openssl/evp.h>
16#include <openssl/rsa.h> 41#include <openssl/rsa.h>
@@ -37,8 +62,12 @@ delete_file(AuthenticationConnection *ac, const char *filename)
37 62
38 public = key_new(KEY_RSA); 63 public = key_new(KEY_RSA);
39 if (!load_public_key(filename, public, &comment)) { 64 if (!load_public_key(filename, public, &comment)) {
40 printf("Bad key file %s: %s\n", filename, strerror(errno)); 65 key_free(public);
41 return; 66 public = key_new(KEY_DSA);
67 if (!try_load_public_key(filename, public, &comment)) {
68 printf("Bad key file %s\n", filename);
69 return;
70 }
42 } 71 }
43 if (ssh_remove_identity(ac, public)) 72 if (ssh_remove_identity(ac, public))
44 fprintf(stderr, "Identity removed: %s (%s)\n", filename, comment); 73 fprintf(stderr, "Identity removed: %s (%s)\n", filename, comment);
diff --git a/ssh-agent.1 b/ssh-agent.1
index 3de67ebf7..064d9d4cf 100644
--- a/ssh-agent.1
+++ b/ssh-agent.1
@@ -1,15 +1,38 @@
1.\" $OpenBSD: ssh-agent.1,v 1.15 2000/08/25 16:16:15 deraadt Exp $ 1.\" $OpenBSD: ssh-agent.1,v 1.16 2000/09/07 20:27:54 deraadt Exp $
2.\"
3.\" -*- nroff -*-
4.\"
5.\" ssh-agent.1
6.\" 2.\"
7.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
8.\"
9.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
10.\" All rights reserved 5.\" All rights reserved
11.\" 6.\"
12.\" Created: Sat Apr 23 20:10:43 1995 ylo 7.\" As far as I am concerned, the code I have written for this software
8.\" can be used freely for any purpose. Any derived versions of this
9.\" software must be clearly marked as such, and if the derived work is
10.\" incompatible with the protocol description in the RFC file, it must be
11.\" called by a name other than "ssh" or "Secure Shell".
12.\"
13.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
16.\"
17.\" Redistribution and use in source and binary forms, with or without
18.\" modification, are permitted provided that the following conditions
19.\" are met:
20.\" 1. Redistributions of source code must retain the above copyright
21.\" notice, this list of conditions and the following disclaimer.
22.\" 2. Redistributions in binary form must reproduce the above copyright
23.\" notice, this list of conditions and the following disclaimer in the
24.\" documentation and/or other materials provided with the distribution.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13.\" 36.\"
14.Dd September 25, 1999 37.Dd September 25, 1999
15.Dt SSH-AGENT 1 38.Dt SSH-AGENT 1
@@ -148,7 +171,8 @@ newer versions bore successively more restrictive licenses.
148This version of OpenSSH 171This version of OpenSSH
149.Bl -bullet 172.Bl -bullet
150.It 173.It
151has all components of a restrictive nature (i.e., patents) 174has all components of a restrictive nature (i.e., patents, see
175.Xr crypto 3 )
152directly removed from the source code; any licensed or patented components 176directly removed from the source code; any licensed or patented components
153are chosen from 177are chosen from
154external libraries. 178external libraries.
@@ -162,9 +186,9 @@ authentication and ticket passing.
162supports one-time password authentication with 186supports one-time password authentication with
163.Xr skey 1 . 187.Xr skey 1 .
164.El 188.El
165.Pp
166.Sh SEE ALSO 189.Sh SEE ALSO
167.Xr ssh 1 , 190.Xr ssh 1 ,
168.Xr ssh-add 1 , 191.Xr ssh-add 1 ,
169.Xr ssh-keygen 1 , 192.Xr ssh-keygen 1 ,
170.Xr sshd 8 , 193.Xr sshd 8 ,
194.Xr crypto 3
diff --git a/ssh-agent.c b/ssh-agent.c
index 0bc4722b2..f7be488f8 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,18 +1,43 @@
1/* $OpenBSD: ssh-agent.c,v 1.34 2000/08/31 22:09:34 markus Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.36 2000/09/15 07:13:49 deraadt Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6 * All rights reserved 6 * All rights reserved
7 * Created: Wed Mar 29 03:46:59 1995 ylo
8 * The authentication agent program. 7 * The authentication agent program.
9 * 8 *
9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 *
10 * SSH2 implementation, 15 * SSH2 implementation,
11 * Copyright (c) 2000 Markus Friedl. All rights reserved. 16 * Copyright (c) 2000 Markus Friedl. All rights reserved.
17 *
18 * Redistribution and use in source and binary forms, with or without
19 * modification, are permitted provided that the following conditions
20 * are met:
21 * 1. Redistributions of source code must retain the above copyright
22 * notice, this list of conditions and the following disclaimer.
23 * 2. Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the distribution.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
28 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
29 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 */ 37 */
13 38
14#include "includes.h" 39#include "includes.h"
15RCSID("$OpenBSD: ssh-agent.c,v 1.34 2000/08/31 22:09:34 markus Exp $"); 40RCSID("$OpenBSD: ssh-agent.c,v 1.36 2000/09/15 07:13:49 deraadt Exp $");
16 41
17#include "ssh.h" 42#include "ssh.h"
18#include "rsa.h" 43#include "rsa.h"
@@ -757,8 +782,11 @@ main(int ac, char **av)
757 printf("echo Agent pid %d;\n", pid); 782 printf("echo Agent pid %d;\n", pid);
758 exit(0); 783 exit(0);
759 } 784 }
760 setenv(SSH_AUTHSOCKET_ENV_NAME, socket_name, 1); 785 if (setenv(SSH_AUTHSOCKET_ENV_NAME, socket_name, 1) == -1 ||
761 setenv(SSH_AGENTPID_ENV_NAME, pidstrbuf, 1); 786 setenv(SSH_AGENTPID_ENV_NAME, pidstrbuf, 1) == -1) {
787 perror("setenv");
788 exit(1);
789 }
762 execvp(av[0], av); 790 execvp(av[0], av);
763 perror(av[0]); 791 perror(av[0]);
764 exit(1); 792 exit(1);
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index 242ed0e9d..337134465 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,15 +1,39 @@
1.\" -*- nroff -*- 1.\" -*- nroff -*-
2.\" 2.\"
3.\" ssh-keygen.1
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\" All rights reserved 5.\" All rights reserved
9.\" 6.\"
10.\" Created: Sat Apr 22 23:55:14 1995 ylo 7.\" As far as I am concerned, the code I have written for this software
8.\" can be used freely for any purpose. Any derived versions of this
9.\" software must be clearly marked as such, and if the derived work is
10.\" incompatible with the protocol description in the RFC file, it must be
11.\" called by a name other than "ssh" or "Secure Shell".
12.\"
13.\"
14.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
15.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
16.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
17.\"
18.\" Redistribution and use in source and binary forms, with or without
19.\" modification, are permitted provided that the following conditions
20.\" are met:
21.\" 1. Redistributions of source code must retain the above copyright
22.\" notice, this list of conditions and the following disclaimer.
23.\" 2. Redistributions in binary form must reproduce the above copyright
24.\" notice, this list of conditions and the following disclaimer in the
25.\" documentation and/or other materials provided with the distribution.
11.\" 26.\"
12.\" $Id: ssh-keygen.1,v 1.17 2000/09/01 23:08:09 djm Exp $ 27.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
28.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
29.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
31.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13.\" 37.\"
14.Dd September 25, 1999 38.Dd September 25, 1999
15.Dt SSH-KEYGEN 1 39.Dt SSH-KEYGEN 1
@@ -200,7 +224,8 @@ newer versions bore successively more restrictive licenses.
200This version of OpenSSH 224This version of OpenSSH
201.Bl -bullet 225.Bl -bullet
202.It 226.It
203has all components of a restrictive nature (i.e., patents) 227has all components of a restrictive nature (i.e., patents, see
228.Xr crypto 3 )
204directly removed from the source code; any licensed or patented components 229directly removed from the source code; any licensed or patented components
205are chosen from 230are chosen from
206external libraries. 231external libraries.
@@ -219,3 +244,4 @@ supports one-time password authentication with
219.Xr ssh-add 1 , 244.Xr ssh-add 1 ,
220.Xr ssh-agent 1 , 245.Xr ssh-agent 1 ,
221.Xr sshd 8 , 246.Xr sshd 8 ,
247.Xr crypto 3
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 83450fe84..216a8b6ef 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -2,12 +2,17 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Mon Mar 27 02:26:40 1995 ylo
6 * Identity and host key generation and maintenance. 5 * Identity and host key generation and maintenance.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
7 */ 12 */
8 13
9#include "includes.h" 14#include "includes.h"
10RCSID("$OpenBSD: ssh-keygen.c,v 1.30 2000/08/19 21:34:43 markus Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.31 2000/09/07 20:27:54 deraadt Exp $");
11 16
12#include <openssl/evp.h> 17#include <openssl/evp.h>
13#include <openssl/pem.h> 18#include <openssl/pem.h>
diff --git a/ssh.1 b/ssh.1
index ca208871e..578678220 100644
--- a/ssh.1
+++ b/ssh.1
@@ -1,15 +1,38 @@
1.\" -*- nroff -*- 1.\" -*- nroff -*-
2.\" 2.\"
3.\" ssh.1.in
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\" All rights reserved 5.\" All rights reserved
9.\" 6.\"
10.\" Created: Sat Apr 22 21:55:14 1995 ylo 7.\" As far as I am concerned, the code I have written for this software
8.\" can be used freely for any purpose. Any derived versions of this
9.\" software must be clearly marked as such, and if the derived work is
10.\" incompatible with the protocol description in the RFC file, it must be
11.\" called by a name other than "ssh" or "Secure Shell".
12.\"
13.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
16.\"
17.\" Redistribution and use in source and binary forms, with or without
18.\" modification, are permitted provided that the following conditions
19.\" are met:
20.\" 1. Redistributions of source code must retain the above copyright
21.\" notice, this list of conditions and the following disclaimer.
22.\" 2. Redistributions in binary form must reproduce the above copyright
23.\" notice, this list of conditions and the following disclaimer in the
24.\" documentation and/or other materials provided with the distribution.
11.\" 25.\"
12.\" $Id: ssh.1,v 1.31 2000/09/05 02:34:54 djm Exp $ 26.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13.\" 36.\"
14.Dd September 25, 1999 37.Dd September 25, 1999
15.Dt SSH 1 38.Dt SSH 1
@@ -460,6 +483,7 @@ debugging connection, authentication, and configuration problems.
460The verbose mode is also used to display 483The verbose mode is also used to display
461.Xr skey 1 484.Xr skey 1
462challenges, if the user entered "s/key" as password. 485challenges, if the user entered "s/key" as password.
486Multiple -v options increases the verbosity. Maximum is 3.
463.It Fl x 487.It Fl x
464Disables X11 forwarding. 488Disables X11 forwarding.
465.It Fl X 489.It Fl X
@@ -1202,7 +1226,8 @@ more restrictive licenses, and thus demand for a free version was born.
1202This version of OpenSSH 1226This version of OpenSSH
1203.Bl -bullet 1227.Bl -bullet
1204.It 1228.It
1205has all components of a restrictive nature (i.e., patents) 1229has all components of a restrictive nature (i.e., patents, see
1230.Xr crypto 3 )
1206directly removed from the source code; any licensed or patented components 1231directly removed from the source code; any licensed or patented components
1207are chosen from 1232are chosen from
1208external libraries. 1233external libraries.
@@ -1231,3 +1256,4 @@ The support for SSH protocol 2 was written by Markus Friedl.
1231.Xr ssh-keygen 1 , 1256.Xr ssh-keygen 1 ,
1232.Xr telnet 1 , 1257.Xr telnet 1 ,
1233.Xr sshd 8 , 1258.Xr sshd 8 ,
1259.Xr crypto 3
diff --git a/ssh.c b/ssh.c
index c117ad5ed..33eac930d 100644
--- a/ssh.c
+++ b/ssh.c
@@ -2,16 +2,44 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Sat Mar 18 16:36:11 1995 ylo
6 * Ssh client program. This program can be used to log into a remote machine. 5 * Ssh client program. This program can be used to log into a remote machine.
7 * The software supports strong authentication, encryption, and forwarding 6 * The software supports strong authentication, encryption, and forwarding
8 * of X11, TCP/IP, and authentication connections. 7 * of X11, TCP/IP, and authentication connections.
9 * 8 *
10 * Modified to work with SSL by Niels Provos <provos@citi.umich.edu> in Canada. 9 * As far as I am concerned, the code I have written for this software
10 * can be used freely for any purpose. Any derived versions of this
11 * software must be clearly marked as such, and if the derived work is
12 * incompatible with the protocol description in the RFC file, it must be
13 * called by a name other than "ssh" or "Secure Shell".
14 *
15 * Copyright (c) 1999 Niels Provos. All rights reserved.
16 *
17 * Modified to work with SSL by Niels Provos <provos@citi.umich.edu>
18 * in Canada (German citizen).
19 *
20 * Redistribution and use in source and binary forms, with or without
21 * modification, are permitted provided that the following conditions
22 * are met:
23 * 1. Redistributions of source code must retain the above copyright
24 * notice, this list of conditions and the following disclaimer.
25 * 2. Redistributions in binary form must reproduce the above copyright
26 * notice, this list of conditions and the following disclaimer in the
27 * documentation and/or other materials provided with the distribution.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
30 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
31 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
33 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
34 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
38 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11 */ 39 */
12 40
13#include "includes.h" 41#include "includes.h"
14RCSID("$OpenBSD: ssh.c,v 1.63 2000/08/28 20:19:52 markus Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.66 2000/09/12 20:53:10 markus Exp $");
15 43
16#include <openssl/evp.h> 44#include <openssl/evp.h>
17#include <openssl/dsa.h> 45#include <openssl/dsa.h>
@@ -127,6 +155,7 @@ usage()
127 fprintf(stderr, " -t Tty; allocate a tty even if command is given.\n"); 155 fprintf(stderr, " -t Tty; allocate a tty even if command is given.\n");
128 fprintf(stderr, " -T Do not allocate a tty.\n"); 156 fprintf(stderr, " -T Do not allocate a tty.\n");
129 fprintf(stderr, " -v Verbose; display verbose debugging messages.\n"); 157 fprintf(stderr, " -v Verbose; display verbose debugging messages.\n");
158 fprintf(stderr, " Multiple -v increases verbosity.\n");
130 fprintf(stderr, " -V Display version number only.\n"); 159 fprintf(stderr, " -V Display version number only.\n");
131 fprintf(stderr, " -P Don't allocate a privileged port.\n"); 160 fprintf(stderr, " -P Don't allocate a privileged port.\n");
132 fprintf(stderr, " -q Quiet; don't display any warning messages.\n"); 161 fprintf(stderr, " -q Quiet; don't display any warning messages.\n");
@@ -354,6 +383,16 @@ main(int ac, char **av)
354 tty_flag = 1; 383 tty_flag = 1;
355 break; 384 break;
356 case 'v': 385 case 'v':
386 if (0 == debug_flag) {
387 debug_flag = 1;
388 options.log_level = SYSLOG_LEVEL_DEBUG1;
389 } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) {
390 options.log_level++;
391 break;
392 } else {
393 fatal("Too high debugging level.\n");
394 }
395 /* fallthrough */
357 case 'V': 396 case 'V':
358 fprintf(stderr, "SSH Version %s, protocol versions %d.%d/%d.%d.\n", 397 fprintf(stderr, "SSH Version %s, protocol versions %d.%d/%d.%d.\n",
359 SSH_VERSION, 398 SSH_VERSION,
@@ -362,8 +401,6 @@ main(int ac, char **av)
362 fprintf(stderr, "Compiled with SSL (0x%8.8lx).\n", SSLeay()); 401 fprintf(stderr, "Compiled with SSL (0x%8.8lx).\n", SSLeay());
363 if (opt == 'V') 402 if (opt == 'V')
364 exit(0); 403 exit(0);
365 debug_flag = 1;
366 options.log_level = SYSLOG_LEVEL_DEBUG;
367 break; 404 break;
368 case 'q': 405 case 'q':
369 options.log_level = SYSLOG_LEVEL_QUIET; 406 options.log_level = SYSLOG_LEVEL_QUIET;
@@ -994,18 +1031,16 @@ ssh_session2(void)
994 if (daemon(1, 1) < 0) 1031 if (daemon(1, 1) < 0)
995 fatal("daemon() failed: %.200s", strerror(errno)); 1032 fatal("daemon() failed: %.200s", strerror(errno));
996 1033
997 window = 32*1024; 1034 window = CHAN_SES_WINDOW_DEFAULT;
998 if (tty_flag) { 1035 packetmax = CHAN_SES_PACKET_DEFAULT;
999 packetmax = window/8; 1036 if (!tty_flag) {
1000 } else {
1001 window *= 2; 1037 window *= 2;
1002 packetmax = window/2; 1038 packetmax *=2;
1003 } 1039 }
1004
1005/*XXX MAXPACK */
1006 id = channel_new( 1040 id = channel_new(
1007 "session", SSH_CHANNEL_OPENING, in, out, err, 1041 "session", SSH_CHANNEL_OPENING, in, out, err,
1008 window, packetmax, CHAN_EXTENDED_WRITE, xstrdup("client-session")); 1042 window, packetmax, CHAN_EXTENDED_WRITE,
1043 xstrdup("client-session"));
1009 1044
1010 channel_open(id); 1045 channel_open(id);
1011 channel_register_callback(id, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, client_init, (void *)0); 1046 channel_register_callback(id, SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, client_init, (void *)0);
diff --git a/ssh.h b/ssh.h
index f21dee494..cc612d0d4 100644
--- a/ssh.h
+++ b/ssh.h
@@ -1,19 +1,18 @@
1/* 1/*
2 *
3 * ssh.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 * 5 *
10 * Created: Fri Mar 17 17:09:37 1995 ylo
11 *
12 * Generic header file for ssh. 6 * Generic header file for ssh.
13 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
14 */ 13 */
15 14
16/* RCSID("$OpenBSD: ssh.h,v 1.49 2000/08/19 18:48:11 markus Exp $"); */ 15/* RCSID("$OpenBSD: ssh.h,v 1.51 2000/09/12 20:53:10 markus Exp $"); */
17 16
18#ifndef SSH_H 17#ifndef SSH_H
19#define SSH_H 18#define SSH_H
@@ -450,7 +449,9 @@ typedef enum {
450 SYSLOG_LEVEL_ERROR, 449 SYSLOG_LEVEL_ERROR,
451 SYSLOG_LEVEL_INFO, 450 SYSLOG_LEVEL_INFO,
452 SYSLOG_LEVEL_VERBOSE, 451 SYSLOG_LEVEL_VERBOSE,
453 SYSLOG_LEVEL_DEBUG 452 SYSLOG_LEVEL_DEBUG1,
453 SYSLOG_LEVEL_DEBUG2,
454 SYSLOG_LEVEL_DEBUG3
454} LogLevel; 455} LogLevel;
455/* Initializes logging. */ 456/* Initializes logging. */
456void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr); 457void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr);
@@ -468,6 +469,8 @@ void error(const char *fmt,...) __attribute__((format(printf, 1, 2)));
468void log(const char *fmt,...) __attribute__((format(printf, 1, 2))); 469void log(const char *fmt,...) __attribute__((format(printf, 1, 2)));
469void verbose(const char *fmt,...) __attribute__((format(printf, 1, 2))); 470void verbose(const char *fmt,...) __attribute__((format(printf, 1, 2)));
470void debug(const char *fmt,...) __attribute__((format(printf, 1, 2))); 471void debug(const char *fmt,...) __attribute__((format(printf, 1, 2)));
472void debug2(const char *fmt,...) __attribute__((format(printf, 1, 2)));
473void debug3(const char *fmt,...) __attribute__((format(printf, 1, 2)));
471 474
472/* same as fatal() but w/o logging */ 475/* same as fatal() but w/o logging */
473void fatal_cleanup(void); 476void fatal_cleanup(void);
diff --git a/ssh2.h b/ssh2.h
index 1fa4c0a0d..47628ddd4 100644
--- a/ssh2.h
+++ b/ssh2.h
@@ -1,4 +1,28 @@
1/* 1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25/*
2 * draft-ietf-secsh-architecture-05.txt 26 * draft-ietf-secsh-architecture-05.txt
3 * 27 *
4 * Transport layer protocol: 28 * Transport layer protocol:
@@ -28,7 +52,7 @@
28 * 52 *
29 * 192-255 Local extensions 53 * 192-255 Local extensions
30 */ 54 */
31/* RCSID("$OpenBSD: ssh2.h,v 1.3 2000/05/15 07:03:12 markus Exp $"); */ 55/* RCSID("$OpenBSD: ssh2.h,v 1.4 2000/09/07 20:27:54 deraadt Exp $"); */
32 56
33/* transport layer: generic */ 57/* transport layer: generic */
34 58
diff --git a/sshconnect.c b/sshconnect.c
index 7c47ebe94..7144040ef 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -2,13 +2,18 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Sat Mar 18 22:15:47 1995 ylo
6 * Code to connect to a remote host, and to perform the client side of the 5 * Code to connect to a remote host, and to perform the client side of the
7 * login (authentication) dialog. 6 * login (authentication) dialog.
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
8 */ 13 */
9 14
10#include "includes.h" 15#include "includes.h"
11RCSID("$OpenBSD: sshconnect.c,v 1.77 2000/08/28 03:50:54 deraadt Exp $"); 16RCSID("$OpenBSD: sshconnect.c,v 1.78 2000/09/07 20:27:54 deraadt Exp $");
12 17
13#include <openssl/bn.h> 18#include <openssl/bn.h>
14#include <openssl/dsa.h> 19#include <openssl/dsa.h>
diff --git a/sshconnect.h b/sshconnect.h
index 13d395fd6..146a65baf 100644
--- a/sshconnect.h
+++ b/sshconnect.h
@@ -1,3 +1,26 @@
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
1#ifndef SSHCONNECT_H 24#ifndef SSHCONNECT_H
2#define SSHCONNECT_H 25#define SSHCONNECT_H
3 26
diff --git a/sshconnect1.c b/sshconnect1.c
index 7b60d6276..2bb4d5387 100644
--- a/sshconnect1.c
+++ b/sshconnect1.c
@@ -2,14 +2,18 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Sat Mar 18 22:15:47 1995 ylo
6 * Code to connect to a remote host, and to perform the client side of the 5 * Code to connect to a remote host, and to perform the client side of the
7 * login (authentication) dialog. 6 * login (authentication) dialog.
8 * 7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
9 */ 13 */
10 14
11#include "includes.h" 15#include "includes.h"
12RCSID("$OpenBSD: sshconnect1.c,v 1.5 2000/08/19 21:34:44 markus Exp $"); 16RCSID("$OpenBSD: sshconnect1.c,v 1.6 2000/09/07 20:27:54 deraadt Exp $");
13 17
14#include <openssl/bn.h> 18#include <openssl/bn.h>
15#include <openssl/dsa.h> 19#include <openssl/dsa.h>
diff --git a/sshconnect2.c b/sshconnect2.c
index 1f49067ad..d225359d0 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -9,11 +9,6 @@
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 3. All advertising materials mentioning features or use of this software
13 * must display the following acknowledgement:
14 * This product includes software developed by Markus Friedl.
15 * 4. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 * 12 *
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -28,7 +23,7 @@
28 */ 23 */
29 24
30#include "includes.h" 25#include "includes.h"
31RCSID("$OpenBSD: sshconnect2.c,v 1.17 2000/08/19 21:34:44 markus Exp $"); 26RCSID("$OpenBSD: sshconnect2.c,v 1.18 2000/09/07 20:27:55 deraadt Exp $");
32 27
33#include <openssl/bn.h> 28#include <openssl/bn.h>
34#include <openssl/rsa.h> 29#include <openssl/rsa.h>
diff --git a/sshd.8 b/sshd.8
index 0402748d2..6c08a377e 100644
--- a/sshd.8
+++ b/sshd.8
@@ -1,15 +1,38 @@
1.\" -*- nroff -*- 1.\" -*- nroff -*-
2.\" 2.\"
3.\" sshd.8.in
4.\"
5.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
6.\"
7.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8.\" All rights reserved 5.\" All rights reserved
9.\" 6.\"
10.\" Created: Sat Apr 22 21:55:14 1995 ylo 7.\" As far as I am concerned, the code I have written for this software
8.\" can be used freely for any purpose. Any derived versions of this
9.\" software must be clearly marked as such, and if the derived work is
10.\" incompatible with the protocol description in the RFC file, it must be
11.\" called by a name other than "ssh" or "Secure Shell".
12.\"
13.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved.
14.\" Copyright (c) 1999 Aaron Campbell. All rights reserved.
15.\" Copyright (c) 1999 Theo de Raadt. All rights reserved.
16.\"
17.\" Redistribution and use in source and binary forms, with or without
18.\" modification, are permitted provided that the following conditions
19.\" are met:
20.\" 1. Redistributions of source code must retain the above copyright
21.\" notice, this list of conditions and the following disclaimer.
22.\" 2. Redistributions in binary form must reproduce the above copyright
23.\" notice, this list of conditions and the following disclaimer in the
24.\" documentation and/or other materials provided with the distribution.
11.\" 25.\"
12.\" $Id: sshd.8,v 1.28 2000/09/05 02:34:54 djm Exp $ 26.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
28.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
29.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
30.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
31.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
35.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13.\" 36.\"
14.Dd September 25, 1999 37.Dd September 25, 1999
15.Dt SSHD 8 38.Dt SSHD 8
@@ -163,6 +186,7 @@ The server sends verbose debug output to the system
163log, and does not put itself in the background. 186log, and does not put itself in the background.
164The server also will not fork and will only process one connection. 187The server also will not fork and will only process one connection.
165This option is only intended for debugging for the server. 188This option is only intended for debugging for the server.
189Multiple -d options increases the debugging level. Maximum is 3.
166.It Fl f Ar configuration_file 190.It Fl f Ar configuration_file
167Specifies the name of the configuration file. 191Specifies the name of the configuration file.
168The default is 192The default is
@@ -1014,7 +1038,8 @@ more restrictive licenses, and thus demand for a free version was born.
1014This version of OpenSSH 1038This version of OpenSSH
1015.Bl -bullet 1039.Bl -bullet
1016.It 1040.It
1017has all components of a restrictive nature (i.e., patents) 1041has all components of a restrictive nature (i.e., patents, see
1042.Xr crypto 3 )
1018directly removed from the source code; any licensed or patented components 1043directly removed from the source code; any licensed or patented components
1019are chosen from 1044are chosen from
1020external libraries. 1045external libraries.
@@ -1041,5 +1066,6 @@ The support for SSH protocol 2 was written by Markus Friedl.
1041.Xr ssh-add 1 , 1066.Xr ssh-add 1 ,
1042.Xr ssh-agent 1 , 1067.Xr ssh-agent 1 ,
1043.Xr ssh-keygen 1 , 1068.Xr ssh-keygen 1 ,
1069.Xr crypto 3 ,
1044.Xr rlogin 1 , 1070.Xr rlogin 1 ,
1045.Xr rsh 1 1071.Xr rsh 1
diff --git a/sshd.c b/sshd.c
index f01df902a..e94b5d11d 100644
--- a/sshd.c
+++ b/sshd.c
@@ -2,19 +2,45 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Fri Mar 17 17:09:28 1995 ylo 5 * This program is the ssh daemon. It listens for connections from clients,
6 * This program is the ssh daemon. It listens for connections from clients, and 6 * and performs authentication, executes use commands or shell, and forwards
7 * performs authentication, executes use commands or shell, and forwards
8 * information to/from the application to the user client over an encrypted 7 * information to/from the application to the user client over an encrypted
9 * connection. This can also handle forwarding of X11, TCP/IP, and authentication 8 * connection. This can also handle forwarding of X11, TCP/IP, and
10 * agent connections. 9 * authentication agent connections.
11 * 10 *
12 * SSH2 implementation, 11 * As far as I am concerned, the code I have written for this software
13 * Copyright (c) 2000 Markus Friedl. All rights reserved. 12 * can be used freely for any purpose. Any derived versions of this
13 * software must be clearly marked as such, and if the derived work is
14 * incompatible with the protocol description in the RFC file, it must be
15 * called by a name other than "ssh" or "Secure Shell".
16 *
17 * SSH2 implementation:
18 *
19 * Copyright (c) 2000 Markus Friedl. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
23 * are met:
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
31 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
32 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
33 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
34 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
35 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
39 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 */ 40 */
15 41
16#include "includes.h" 42#include "includes.h"
17RCSID("$OpenBSD: sshd.c,v 1.125 2000/08/17 20:06:34 markus Exp $"); 43RCSID("$OpenBSD: sshd.c,v 1.127 2000/09/12 20:53:10 markus Exp $");
18 44
19#include "xmalloc.h" 45#include "xmalloc.h"
20#include "rsa.h" 46#include "rsa.h"
@@ -485,8 +511,15 @@ main(int ac, char **av)
485 config_file_name = optarg; 511 config_file_name = optarg;
486 break; 512 break;
487 case 'd': 513 case 'd':
488 debug_flag = 1; 514 if (0 == debug_flag) {
489 options.log_level = SYSLOG_LEVEL_DEBUG; 515 debug_flag = 1;
516 options.log_level = SYSLOG_LEVEL_DEBUG1;
517 } else if (options.log_level < SYSLOG_LEVEL_DEBUG3) {
518 options.log_level++;
519 } else {
520 fprintf(stderr, "Too high debugging level.\n");
521 exit(1);
522 }
490 break; 523 break;
491 case 'i': 524 case 'i':
492 inetd_flag = 1; 525 inetd_flag = 1;
@@ -502,8 +535,10 @@ main(int ac, char **av)
502 break; 535 break;
503 case 'p': 536 case 'p':
504 options.ports_from_cmdline = 1; 537 options.ports_from_cmdline = 1;
505 if (options.num_ports >= MAX_PORTS) 538 if (options.num_ports >= MAX_PORTS) {
506 fatal("too many ports.\n"); 539 fprintf(stderr, "too many ports.\n");
540 exit(1);
541 }
507 options.ports[options.num_ports++] = atoi(optarg); 542 options.ports[options.num_ports++] = atoi(optarg);
508 break; 543 break;
509 case 'g': 544 case 'g':
@@ -529,7 +564,7 @@ main(int ac, char **av)
529 fprintf(stderr, "Usage: %s [options]\n", av0); 564 fprintf(stderr, "Usage: %s [options]\n", av0);
530 fprintf(stderr, "Options:\n"); 565 fprintf(stderr, "Options:\n");
531 fprintf(stderr, " -f file Configuration file (default %s)\n", SERVER_CONFIG_FILE); 566 fprintf(stderr, " -f file Configuration file (default %s)\n", SERVER_CONFIG_FILE);
532 fprintf(stderr, " -d Debugging mode\n"); 567 fprintf(stderr, " -d Debugging mode (multiple -d means more debugging)\n");
533 fprintf(stderr, " -i Started from inetd\n"); 568 fprintf(stderr, " -i Started from inetd\n");
534 fprintf(stderr, " -q Quiet (no logging)\n"); 569 fprintf(stderr, " -q Quiet (no logging)\n");
535 fprintf(stderr, " -p port Listen on the specified port (default: 22)\n"); 570 fprintf(stderr, " -p port Listen on the specified port (default: 22)\n");
diff --git a/tildexpand.c b/tildexpand.c
index d10ea0054..f25f7d96b 100644
--- a/tildexpand.c
+++ b/tildexpand.c
@@ -2,11 +2,16 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Wed Jul 12 01:07:36 1995 ylo 5 *
6 * As far as I am concerned, the code I have written for this software
7 * can be used freely for any purpose. Any derived versions of this
8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
6 */ 11 */
7 12
8#include "includes.h" 13#include "includes.h"
9RCSID("$OpenBSD: tildexpand.c,v 1.7 2000/06/20 01:39:45 markus Exp $"); 14RCSID("$OpenBSD: tildexpand.c,v 1.8 2000/09/07 20:27:55 deraadt Exp $");
10 15
11#include "xmalloc.h" 16#include "xmalloc.h"
12#include "ssh.h" 17#include "ssh.h"
diff --git a/ttymodes.c b/ttymodes.c
index f4b7af580..a7a3e9301 100644
--- a/ttymodes.c
+++ b/ttymodes.c
@@ -2,15 +2,20 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Tue Mar 21 15:59:15 1995 ylo
6 * Encoding and decoding of terminal modes in a portable way. 5 * Encoding and decoding of terminal modes in a portable way.
7 * Much of the format is defined in ttymodes.h; it is included multiple times 6 * Much of the format is defined in ttymodes.h; it is included multiple times
8 * into this file with the appropriate macro definitions to generate the 7 * into this file with the appropriate macro definitions to generate the
9 * suitable code. 8 * suitable code.
9 *
10 * As far as I am concerned, the code I have written for this software
11 * can be used freely for any purpose. Any derived versions of this
12 * software must be clearly marked as such, and if the derived work is
13 * incompatible with the protocol description in the RFC file, it must be
14 * called by a name other than "ssh" or "Secure Shell".
10 */ 15 */
11 16
12#include "includes.h" 17#include "includes.h"
13RCSID("$OpenBSD: ttymodes.c,v 1.7 2000/06/20 01:39:45 markus Exp $"); 18RCSID("$OpenBSD: ttymodes.c,v 1.8 2000/09/07 20:27:55 deraadt Exp $");
14 19
15#include "packet.h" 20#include "packet.h"
16#include "ssh.h" 21#include "ssh.h"
diff --git a/ttymodes.h b/ttymodes.h
index b0ef24760..a26e4fa5b 100644
--- a/ttymodes.h
+++ b/ttymodes.h
@@ -1,18 +1,17 @@
1/* 1/*
2 *
3 * ttymodes.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 * SGTTY stuff contributed by Janne Snabb <snabb@niksula.hut.fi> 3 * SGTTY stuff contributed by Janne Snabb <snabb@niksula.hut.fi>
7 *
8 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
9 * All rights reserved 5 * All rights reserved
10 * 6 *
11 * Created: Tue Mar 21 15:42:09 1995 ylo 7 * As far as I am concerned, the code I have written for this software
12 * 8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
13 */ 12 */
14 13
15/* RCSID("$OpenBSD: ttymodes.h,v 1.8 2000/06/20 01:39:45 markus Exp $"); */ 14/* RCSID("$OpenBSD: ttymodes.h,v 1.9 2000/09/07 20:27:55 deraadt Exp $"); */
16 15
17/* The tty mode description is a stream of bytes. The stream consists of 16/* The tty mode description is a stream of bytes. The stream consists of
18 * opcode-arguments pairs. It is terminated by opcode TTY_OP_END (0). 17 * opcode-arguments pairs. It is terminated by opcode TTY_OP_END (0).
diff --git a/uidswap.c b/uidswap.c
index 96ff931e1..48026b9b4 100644
--- a/uidswap.c
+++ b/uidswap.c
@@ -2,12 +2,17 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Sat Sep 9 01:56:14 1995 ylo
6 * Code for uid-swapping. 5 * Code for uid-swapping.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
7 */ 12 */
8 13
9#include "includes.h" 14#include "includes.h"
10RCSID("$OpenBSD: uidswap.c,v 1.8 2000/08/28 03:50:54 deraadt Exp $"); 15RCSID("$OpenBSD: uidswap.c,v 1.9 2000/09/07 20:27:55 deraadt Exp $");
11 16
12#include "ssh.h" 17#include "ssh.h"
13#include "uidswap.h" 18#include "uidswap.h"
diff --git a/uidswap.h b/uidswap.h
index c08a37004..ff6fad4c1 100644
--- a/uidswap.h
+++ b/uidswap.h
@@ -1,15 +1,13 @@
1/* 1/*
2 *
3 * uidswap.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 * 5 *
10 * Created: Sat Sep 9 01:43:15 1995 ylo 6 * As far as I am concerned, the code I have written for this software
11 * Last modified: Sat Sep 9 02:34:04 1995 ylo 7 * can be used freely for any purpose. Any derived versions of this
12 * 8 * software must be clearly marked as such, and if the derived work is
9 * incompatible with the protocol description in the RFC file, it must be
10 * called by a name other than "ssh" or "Secure Shell".
13 */ 11 */
14 12
15#ifndef UIDSWAP_H 13#ifndef UIDSWAP_H
diff --git a/util.c b/util.c
index 16c8c5072..71808f14d 100644
--- a/util.c
+++ b/util.c
@@ -1,5 +1,31 @@
1/* $OpenBSD: util.c,v 1.5 2000/09/07 20:27:55 deraadt Exp $ */
2
3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
1#include "includes.h" 27#include "includes.h"
2RCSID("$OpenBSD: util.c,v 1.4 2000/08/28 20:23:37 markus Exp $"); 28RCSID("$OpenBSD: util.c,v 1.5 2000/09/07 20:27:55 deraadt Exp $");
3 29
4#include "ssh.h" 30#include "ssh.h"
5 31
diff --git a/uuencode.c b/uuencode.c
index 27ba6559e..a37618d76 100644
--- a/uuencode.c
+++ b/uuencode.c
@@ -1,10 +1,33 @@
1/* $OpenBSD: uuencode.c,v 1.7 2000/09/07 20:27:55 deraadt Exp $ */
2
1/* 3/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3 */ 25 */
26
4#include "includes.h" 27#include "includes.h"
5#include "xmalloc.h" 28#include "xmalloc.h"
6 29
7RCSID("$OpenBSD: uuencode.c,v 1.6 2000/06/22 23:55:00 djm Exp $"); 30RCSID("$OpenBSD: uuencode.c,v 1.7 2000/09/07 20:27:55 deraadt Exp $");
8 31
9int 32int
10uuencode(unsigned char *src, unsigned int srclength, 33uuencode(unsigned char *src, unsigned int srclength,
diff --git a/uuencode.h b/uuencode.h
index c92c62744..dca80ec1a 100644
--- a/uuencode.h
+++ b/uuencode.h
@@ -1,3 +1,27 @@
1/*
2 * Copyright (c) 1999 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
1#ifndef UUENCODE_H 25#ifndef UUENCODE_H
2#define UUENCODE_H 26#define UUENCODE_H
3int uuencode(unsigned char *src, unsigned int srclength, char *target, size_t targsize); 27int uuencode(unsigned char *src, unsigned int srclength, char *target, size_t targsize);
diff --git a/xmalloc.c b/xmalloc.c
index ec62c5804..738c9cdc3 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -2,13 +2,18 @@
2 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
5 * Created: Mon Mar 20 21:23:10 1995 ylo
6 * Versions of malloc and friends that check their results, and never return 5 * Versions of malloc and friends that check their results, and never return
7 * failure (they call fatal if they encounter an error). 6 * failure (they call fatal if they encounter an error).
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
8 */ 13 */
9 14
10#include "includes.h" 15#include "includes.h"
11RCSID("$OpenBSD: xmalloc.c,v 1.7 2000/06/20 01:39:45 markus Exp $"); 16RCSID("$OpenBSD: xmalloc.c,v 1.8 2000/09/07 20:27:55 deraadt Exp $");
12 17
13#include "ssh.h" 18#include "ssh.h"
14 19
diff --git a/xmalloc.h b/xmalloc.h
index b11b49cbf..59a598ed6 100644
--- a/xmalloc.h
+++ b/xmalloc.h
@@ -1,20 +1,20 @@
1/* 1/*
2 *
3 * xmalloc.h
4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 4 * All rights reserved
9 *
10 * Created: Mon Mar 20 22:09:17 1995 ylo 5 * Created: Mon Mar 20 22:09:17 1995 ylo
11 * 6 *
12 * Versions of malloc and friends that check their results, and never return 7 * Versions of malloc and friends that check their results, and never return
13 * failure (they call fatal if they encounter an error). 8 * failure (they call fatal if they encounter an error).
14 * 9 *
10 * As far as I am concerned, the code I have written for this software
11 * can be used freely for any purpose. Any derived versions of this
12 * software must be clearly marked as such, and if the derived work is
13 * incompatible with the protocol description in the RFC file, it must be
14 * called by a name other than "ssh" or "Secure Shell".
15 */ 15 */
16 16
17/* RCSID("$OpenBSD: xmalloc.h,v 1.4 2000/06/20 01:39:45 markus Exp $"); */ 17/* RCSID("$OpenBSD: xmalloc.h,v 1.5 2000/09/07 20:27:56 deraadt Exp $"); */
18 18
19#ifndef XMALLOC_H 19#ifndef XMALLOC_H
20#define XMALLOC_H 20#define XMALLOC_H