From 2eb6340ddd2d1326cb3fd708be21b1bce7355e49 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 11:09:42 +1100 Subject: - stevesk@cvs.openbsd.org 2006/02/07 01:18:09 [includes.h ssh-agent.c ssh-keyscan.c sshconnect2.c] move #include out of includes.h; ok markus@ --- sshconnect2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sshconnect2.c') diff --git a/sshconnect2.c b/sshconnect2.c index adf967281..ce64586d8 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -23,7 +23,9 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.143 2005/10/14 02:17:59 stevesk Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.144 2006/02/07 01:18:09 stevesk Exp $"); + +#include #include "openbsd-compat/sys-queue.h" -- cgit v1.2.3 From 9cf6d077fb87b4364e70c9fd889bf26744718301 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 11:29:24 +1100 Subject: - stevesk@cvs.openbsd.org 2006/02/10 01:44:27 [includes.h monitor.c readpass.c scp.c serverloop.c session.c^?] [sftp.c sshconnect.c sshconnect2.c sshd.c] move #include out of includes.h; ok markus@ --- ChangeLog | 6 +++++- includes.h | 3 +-- monitor.c | 5 ++++- readpass.c | 5 ++++- scp.c | 5 ++++- serverloop.c | 5 ++++- session.c | 5 ++++- sftp.c | 4 +++- sshconnect.c | 5 ++++- sshconnect2.c | 4 +++- sshd.c | 4 +++- 11 files changed, 39 insertions(+), 12 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 1582d97c7..b6ddb879d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -62,6 +62,10 @@ [channels.c clientloop.c includes.h misc.c progressmeter.c sftp.c] [ssh.c sshd.c sshpty.c] move #include out of includes.h; ok markus@ + - stevesk@cvs.openbsd.org 2006/02/10 01:44:27 + [includes.h monitor.c readpass.c scp.c serverloop.c session.c] + [sftp.c sshconnect.c sshconnect2.c sshd.c] + move #include out of includes.h; ok markus@ 20060313 - (dtucker) [configure.ac] Bug #1171: Don't use printf("%lld", longlong) @@ -3963,4 +3967,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4157 2006/03/15 00:28:34 djm Exp $ +$Id: ChangeLog,v 1.4158 2006/03/15 00:29:24 djm Exp $ diff --git a/includes.h b/includes.h index 9cf7d30a2..1dbe16b78 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.32 2006/02/10 00:27:13 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.33 2006/02/10 01:44:26 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -92,7 +92,6 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg } #include #include -#include #ifdef HAVE_SYS_TIME_H # include /* For timersub */ #endif diff --git a/monitor.c b/monitor.c index 4ba78db9c..c21c0fab8 100644 --- a/monitor.c +++ b/monitor.c @@ -25,7 +25,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor.c,v 1.66 2006/02/08 13:15:44 stevesk Exp $"); +RCSID("$OpenBSD: monitor.c,v 1.67 2006/02/10 01:44:26 stevesk Exp $"); + +#include +#include #include diff --git a/readpass.c b/readpass.c index 9f74bec19..811cfa231 100644 --- a/readpass.c +++ b/readpass.c @@ -23,7 +23,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: readpass.c,v 1.34 2006/02/08 12:15:27 stevesk Exp $"); +RCSID("$OpenBSD: readpass.c,v 1.35 2006/02/10 01:44:26 stevesk Exp $"); + +#include +#include #ifdef HAVE_PATHS_H # include diff --git a/scp.c b/scp.c index 0b65ff081..4521f6343 100644 --- a/scp.c +++ b/scp.c @@ -71,7 +71,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.131 2006/02/08 23:51:24 stevesk Exp $"); +RCSID("$OpenBSD: scp.c,v 1.132 2006/02/10 01:44:26 stevesk Exp $"); + +#include +#include #include diff --git a/serverloop.c b/serverloop.c index 23f8831ef..11dcaf703 100644 --- a/serverloop.c +++ b/serverloop.c @@ -35,7 +35,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: serverloop.c,v 1.125 2006/02/07 01:42:00 stevesk Exp $"); +RCSID("$OpenBSD: serverloop.c,v 1.126 2006/02/10 01:44:26 stevesk Exp $"); + +#include +#include #include diff --git a/session.c b/session.c index 88e0a04d2..ecd6cf216 100644 --- a/session.c +++ b/session.c @@ -33,7 +33,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.192 2006/02/08 12:15:27 stevesk Exp $"); +RCSID("$OpenBSD: session.c,v 1.193 2006/02/10 01:44:27 stevesk Exp $"); + +#include +#include #include diff --git a/sftp.c b/sftp.c index 0599e587a..4e170ee60 100644 --- a/sftp.c +++ b/sftp.c @@ -15,9 +15,11 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.72 2006/02/10 00:27:13 stevesk Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.73 2006/02/10 01:44:27 stevesk Exp $"); #include +#include +#include #ifdef HAVE_PATHS_H # include diff --git a/sshconnect.c b/sshconnect.c index a71251ea0..dc74d75c4 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -13,7 +13,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.173 2006/02/08 14:16:59 stevesk Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.174 2006/02/10 01:44:27 stevesk Exp $"); + +#include +#include #include diff --git a/sshconnect2.c b/sshconnect2.c index ce64586d8..eb9a4d870 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -23,8 +23,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.144 2006/02/07 01:18:09 stevesk Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.145 2006/02/10 01:44:27 stevesk Exp $"); +#include +#include #include #include "openbsd-compat/sys-queue.h" diff --git a/sshd.c b/sshd.c index 3bf489723..8a68a537b 100644 --- a/sshd.c +++ b/sshd.c @@ -42,9 +42,11 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.320 2006/02/10 00:27:13 stevesk Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.321 2006/02/10 01:44:27 stevesk Exp $"); #include +#include +#include #include -- cgit v1.2.3 From f17883e6a0f9462c8bc163cce44331862581b0cb Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 11:45:54 +1100 Subject: - stevesk@cvs.openbsd.org 2006/02/20 17:02:44 [clientloop.c includes.h monitor.c progressmeter.c scp.c] [serverloop.c session.c sftp.c ssh-agent.c ssh.c sshd.c] move #include out of includes.h; ok markus@ --- ChangeLog | 6 +++++- auth-rhosts.c | 5 ++++- auth-rsa.c | 5 ++++- auth.c | 5 ++++- auth2-none.c | 5 ++++- auth2-pubkey.c | 5 ++++- authfile.c | 5 ++++- clientloop.c | 6 +++++- includes.h | 5 +---- readconf.c | 5 ++++- scp.c | 5 ++++- session.c | 5 ++++- sftp-client.c | 7 ++++++- sftp-common.c | 5 ++++- sftp-common.h | 5 ++++- sftp-glob.c | 7 ++++++- sftp-server.c | 5 ++++- sftp.c | 7 +++++-- ssh-add.c | 5 ++++- ssh-keygen.c | 5 ++++- ssh.c | 7 +++++-- sshconnect.c | 3 ++- sshconnect2.c | 3 ++- sshd.c | 7 +++++-- sshpty.c | 4 +++- 25 files changed, 101 insertions(+), 31 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 29ee4407d..be7263bd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -135,6 +135,10 @@ - stevesk@cvs.openbsd.org 2006/02/20 16:36:15 [authfd.c channels.c includes.h session.c ssh-agent.c ssh.c] move #include out of includes.h; ok djm@ + - stevesk@cvs.openbsd.org 2006/02/20 17:02:44 + [clientloop.c includes.h monitor.c progressmeter.c scp.c] + [serverloop.c session.c sftp.c ssh-agent.c ssh.c sshd.c] + move #include out of includes.h; ok markus@ 20060313 - (dtucker) [configure.ac] Bug #1171: Don't use printf("%lld", longlong) @@ -4036,4 +4040,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4178 2006/03/15 00:40:10 djm Exp $ +$Id: ChangeLog,v 1.4179 2006/03/15 00:45:54 djm Exp $ diff --git a/auth-rhosts.c b/auth-rhosts.c index 9748a9457..1deeb30b9 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -14,7 +14,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rhosts.c,v 1.34 2006/02/07 01:08:04 stevesk Exp $"); +RCSID("$OpenBSD: auth-rhosts.c,v 1.35 2006/02/20 17:19:53 stevesk Exp $"); + +#include +#include #ifdef HAVE_NETGROUP_H # include diff --git a/auth-rsa.c b/auth-rsa.c index d9c9652dc..275c0b67b 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -14,7 +14,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rsa.c,v 1.63 2005/06/17 02:44:32 djm Exp $"); +RCSID("$OpenBSD: auth-rsa.c,v 1.64 2006/02/20 17:19:53 stevesk Exp $"); + +#include +#include #include #include diff --git a/auth.c b/auth.c index 666a2dd22..fca373b80 100644 --- a/auth.c +++ b/auth.c @@ -23,7 +23,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth.c,v 1.61 2006/02/08 12:15:27 stevesk Exp $"); +RCSID("$OpenBSD: auth.c,v 1.62 2006/02/20 17:19:53 stevesk Exp $"); + +#include +#include #ifdef HAVE_PATHS_H # include diff --git a/auth2-none.c b/auth2-none.c index 1c30a3203..2eb27a914 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -23,7 +23,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-none.c,v 1.7 2004/05/11 19:01:43 deraadt Exp $"); +RCSID("$OpenBSD: auth2-none.c,v 1.8 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include "auth.h" #include "xmalloc.h" diff --git a/auth2-pubkey.c b/auth2-pubkey.c index a97d0f430..ea1367070 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -23,7 +23,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-pubkey.c,v 1.9 2004/12/11 01:48:56 dtucker Exp $"); +RCSID("$OpenBSD: auth2-pubkey.c,v 1.10 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include "ssh.h" #include "ssh2.h" diff --git a/authfile.c b/authfile.c index 420813f37..f97cf1820 100644 --- a/authfile.c +++ b/authfile.c @@ -36,7 +36,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfile.c,v 1.61 2005/06/17 02:44:32 djm Exp $"); +RCSID("$OpenBSD: authfile.c,v 1.62 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include #include diff --git a/clientloop.c b/clientloop.c index 52f3bd5b5..a7c510cca 100644 --- a/clientloop.c +++ b/clientloop.c @@ -59,8 +59,12 @@ */ #include "includes.h" -RCSID("$OpenBSD: clientloop.c,v 1.152 2006/02/10 00:27:13 stevesk Exp $"); +RCSID("$OpenBSD: clientloop.c,v 1.154 2006/02/20 17:19:54 stevesk Exp $"); +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include #include diff --git a/includes.h b/includes.h index ef4a269cc..be844c80b 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.34 2006/02/20 16:36:14 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.36 2006/02/20 17:19:53 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -111,9 +111,6 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg } #ifdef HAVE_SYS_CDEFS_H # include /* For __P() */ #endif -#ifdef HAVE_SYS_STAT_H -# include /* For S_* constants and macros */ -#endif #ifdef HAVE_SYS_SYSMACROS_H # include /* For MIN, MAX, etc */ #endif diff --git a/readconf.c b/readconf.c index bc5cf6188..da704d803 100644 --- a/readconf.c +++ b/readconf.c @@ -12,7 +12,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.146 2006/02/12 10:44:18 djm Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.147 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include "ssh.h" #include "xmalloc.h" diff --git a/scp.c b/scp.c index 4521f6343..8b806d637 100644 --- a/scp.c +++ b/scp.c @@ -71,9 +71,12 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.132 2006/02/10 01:44:26 stevesk Exp $"); +RCSID("$OpenBSD: scp.c,v 1.134 2006/02/20 17:19:54 stevesk Exp $"); #include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include #include diff --git a/session.c b/session.c index 969a7792a..1e883036b 100644 --- a/session.c +++ b/session.c @@ -33,9 +33,12 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.194 2006/02/20 16:36:14 stevesk Exp $"); +RCSID("$OpenBSD: session.c,v 1.196 2006/02/20 17:19:54 stevesk Exp $"); #include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include #include diff --git a/sftp-client.c b/sftp-client.c index 9dfdf5ad5..042ab8879 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -20,7 +20,12 @@ /* XXX: copy between two remote sites */ #include "includes.h" -RCSID("$OpenBSD: sftp-client.c,v 1.59 2006/02/15 05:08:24 david Exp $"); +RCSID("$OpenBSD: sftp-client.c,v 1.60 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include "openbsd-compat/sys-queue.h" diff --git a/sftp-common.c b/sftp-common.c index 4cea3c305..aa0757561 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -24,7 +24,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp-common.c,v 1.10 2003/11/10 16:23:41 jakob Exp $"); +RCSID("$OpenBSD: sftp-common.c,v 1.11 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include "buffer.h" #include "bufaux.h" diff --git a/sftp-common.h b/sftp-common.h index 2b1995a2d..72be6e61c 100644 --- a/sftp-common.h +++ b/sftp-common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.h,v 1.6 2006/01/02 01:20:31 djm Exp $ */ +/* $OpenBSD: sftp-common.h,v 1.7 2006/02/20 17:19:54 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -25,6 +25,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include +#include + /* Maximum packet that we are willing to send/accept */ #define SFTP_MAX_MSG_LENGTH (256 * 1024) diff --git a/sftp-glob.c b/sftp-glob.c index 9dfbf9538..baa84aa71 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -15,7 +15,12 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp-glob.c,v 1.16 2006/02/08 23:51:24 stevesk Exp $"); +RCSID("$OpenBSD: sftp-glob.c,v 1.17 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include diff --git a/sftp-server.c b/sftp-server.c index 96fe1a7bb..30bd1b0ee 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -14,7 +14,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -RCSID("$OpenBSD: sftp-server.c,v 1.51 2006/02/08 23:51:24 stevesk Exp $"); +RCSID("$OpenBSD: sftp-server.c,v 1.52 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include diff --git a/sftp.c b/sftp.c index 4e170ee60..f5589f2b9 100644 --- a/sftp.c +++ b/sftp.c @@ -15,10 +15,13 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.73 2006/02/10 01:44:27 stevesk Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.75 2006/02/20 17:19:54 stevesk Exp $"); -#include #include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#include #include #ifdef HAVE_PATHS_H diff --git a/ssh-add.c b/ssh-add.c index 2b01e6f13..8bfc401e8 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -35,7 +35,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.74 2005/11/12 18:37:59 deraadt Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.75 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index 64fadc7a1..8acbf7783 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -12,7 +12,10 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.135 2005/11/29 02:04:55 dtucker Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.136 2006/02/20 17:19:54 stevesk Exp $"); + +#include +#include #include #include diff --git a/ssh.c b/ssh.c index 84246b5c4..196da80c5 100644 --- a/ssh.c +++ b/ssh.c @@ -40,11 +40,14 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.262 2006/02/20 16:36:15 stevesk Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.264 2006/02/20 17:19:54 stevesk Exp $"); +#include +#ifdef HAVE_SYS_STAT_H +# include +#endif #include #include -#include #include #include diff --git a/sshconnect.c b/sshconnect.c index dc74d75c4..519a7cf0d 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -13,10 +13,11 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.174 2006/02/10 01:44:27 stevesk Exp $"); +RCSID("$OpenBSD: sshconnect.c,v 1.175 2006/02/20 17:19:54 stevesk Exp $"); #include #include +#include #include diff --git a/sshconnect2.c b/sshconnect2.c index eb9a4d870..f2776edb7 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -23,11 +23,12 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.145 2006/02/10 01:44:27 stevesk Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.146 2006/02/20 17:19:54 stevesk Exp $"); #include #include #include +#include #include "openbsd-compat/sys-queue.h" diff --git a/sshd.c b/sshd.c index 8a68a537b..f06b41188 100644 --- a/sshd.c +++ b/sshd.c @@ -42,10 +42,13 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.321 2006/02/10 01:44:27 stevesk Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.323 2006/02/20 17:19:54 stevesk Exp $"); -#include #include +#ifdef HAVE_SYS_STAT_H +# include +#endif +#include #include #include diff --git a/sshpty.c b/sshpty.c index 884df26ae..7cfcf91f6 100644 --- a/sshpty.c +++ b/sshpty.c @@ -12,9 +12,11 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshpty.c,v 1.15 2006/02/10 00:27:13 stevesk Exp $"); +RCSID("$OpenBSD: sshpty.c,v 1.16 2006/02/20 17:19:54 stevesk Exp $"); #include +#include +#include #ifdef HAVE_PATHS_H # include -- cgit v1.2.3 From a63128d1a8a4077bc992e09d00e2683d1592e500 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 12:08:28 +1100 Subject: - djm@cvs.openbsd.org 2006/03/07 09:07:40 [kex.c kex.h monitor.c myproposal.h ssh-keyscan.c sshconnect2.c sshd.c] Implement the diffie-hellman-group-exchange-sha256 key exchange method using the SHA256 code in libc (and wrapper to make it into an OpenSSL EVP), interop tested against CVS PuTTY NB. no portability bits committed yet --- ChangeLog | 8 ++++++- kex.c | 7 +++++- kex.h | 4 +++- md-sha256.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ monitor.c | 9 ++++++-- myproposal.h | 10 +++++---- ssh-keyscan.c | 3 ++- sshconnect2.c | 3 ++- sshd.c | 1 + 9 files changed, 105 insertions(+), 11 deletions(-) create mode 100644 md-sha256.c (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 3064b306d..3cd994f2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -236,6 +236,12 @@ - markus@cvs.openbsd.org 2006/03/14 16:32:48 [ssh_config.5 sshd_config.5] *AliveCountMax applies to protcol v2 only; ok dtucker, djm + - djm@cvs.openbsd.org 2006/03/07 09:07:40 + [kex.c kex.h monitor.c myproposal.h ssh-keyscan.c sshconnect2.c sshd.c] + Implement the diffie-hellman-group-exchange-sha256 key exchange method + using the SHA256 code in libc (and wrapper to make it into an OpenSSL + EVP), interop tested against CVS PuTTY + NB. no portability bits committed yet 20060313 - (dtucker) [configure.ac] Bug #1171: Don't use printf("%lld", longlong) @@ -4137,4 +4143,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4206 2006/03/15 01:06:55 djm Exp $ +$Id: ChangeLog,v 1.4207 2006/03/15 01:08:28 djm Exp $ diff --git a/kex.c b/kex.c index cd71be9ca..175613b40 100644 --- a/kex.c +++ b/kex.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kex.c,v 1.65 2005/11/04 05:15:59 djm Exp $"); +RCSID("$OpenBSD: kex.c,v 1.66 2006/03/07 09:07:40 djm Exp $"); #include @@ -44,6 +44,8 @@ RCSID("$OpenBSD: kex.c,v 1.65 2005/11/04 05:15:59 djm Exp $"); #define KEX_COOKIE_LEN 16 +extern const EVP_MD *evp_ssh_sha256(void); + /* prototype */ static void kex_kexinit_finish(Kex *); static void kex_choose_conf(Kex *); @@ -301,6 +303,9 @@ choose_kex(Kex *k, char *client, char *server) } else if (strcmp(k->name, KEX_DHGEX_SHA1) == 0) { k->kex_type = KEX_DH_GEX_SHA1; k->evp_md = EVP_sha1(); + } else if (strcmp(k->name, KEX_DHGEX_SHA256) == 0) { + k->kex_type = KEX_DH_GEX_SHA256; + k->evp_md = evp_ssh_sha256(); } else fatal("bad kex alg %s", k->name); } diff --git a/kex.h b/kex.h index bbd931e04..e2ba0a98f 100644 --- a/kex.h +++ b/kex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.h,v 1.38 2005/11/04 05:15:59 djm Exp $ */ +/* $OpenBSD: kex.h,v 1.39 2006/03/07 09:07:40 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -34,6 +34,7 @@ #define KEX_DH1 "diffie-hellman-group1-sha1" #define KEX_DH14 "diffie-hellman-group14-sha1" #define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" +#define KEX_DHGEX_SHA256 "diffie-hellman-group-exchange-sha256" #define COMP_NONE 0 #define COMP_ZLIB 1 @@ -63,6 +64,7 @@ enum kex_exchange { KEX_DH_GRP1_SHA1, KEX_DH_GRP14_SHA1, KEX_DH_GEX_SHA1, + KEX_DH_GEX_SHA256, KEX_MAX }; diff --git a/md-sha256.c b/md-sha256.c new file mode 100644 index 000000000..08848f841 --- /dev/null +++ b/md-sha256.c @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2005 Damien Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* EVP wrapper for SHA256 */ + +#include "includes.h" +#include +#include + +RCSID("$OpenBSD: md-sha256.c,v 1.1 2006/03/07 09:07:40 djm Exp $"); + +const EVP_MD *evp_ssh_sha256(void); + +static int +ssh_sha256_init(EVP_MD_CTX *ctxt) +{ + SHA256_Init(ctxt->md_data); + return (1); +} + +static int +ssh_sha256_update(EVP_MD_CTX *ctxt, const void *data, unsigned long len) +{ + SHA256_Update(ctxt->md_data, data, len); + return (1); +} + +static int +ssh_sha256_final(EVP_MD_CTX *ctxt, unsigned char *digest) +{ + SHA256_Final(digest, ctxt->md_data); + return (1); +} + +static int +ssh_sha256_cleanup(EVP_MD_CTX *ctxt) +{ + memset(ctxt->md_data, 0, sizeof(SHA256_CTX)); + return (1); +} + +const EVP_MD * +evp_ssh_sha256(void) +{ + static EVP_MD ssh_sha256; + + memset(&ssh_sha256, 0, sizeof(ssh_sha256)); + ssh_sha256.type = NID_undef; + ssh_sha256.md_size = SHA256_DIGEST_LENGTH; + ssh_sha256.init = ssh_sha256_init; + ssh_sha256.update = ssh_sha256_update; + ssh_sha256.final = ssh_sha256_final; + ssh_sha256.cleanup = ssh_sha256_cleanup; + ssh_sha256.block_size = SHA256_BLOCK_LENGTH; + ssh_sha256.ctx_size = sizeof(SHA256_CTX); + + return (&ssh_sha256); +} diff --git a/monitor.c b/monitor.c index 3260d473d..30849a371 100644 --- a/monitor.c +++ b/monitor.c @@ -25,7 +25,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor.c,v 1.68 2006/02/20 17:02:44 stevesk Exp $"); +RCSID("$OpenBSD: monitor.c,v 1.69 2006/03/07 09:07:40 djm Exp $"); #include #include @@ -543,7 +543,11 @@ mm_answer_sign(int sock, Buffer *m) keyid = buffer_get_int(m); p = buffer_get_string(m, &datlen); - if (datlen != 20) + /* + * Supported KEX types will only return SHA1 (20 byte) or + * SHA256 (32 byte) hashes + */ + if (datlen != 20 && datlen != 32) fatal("%s: data length incorrect: %u", __func__, datlen); /* save session id, it will be passed on the first call */ @@ -1627,6 +1631,7 @@ mm_get_kex(Buffer *m) kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; + kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; kex->server = 1; kex->hostkey_type = buffer_get_int(m); kex->kex_type = buffer_get_int(m); diff --git a/myproposal.h b/myproposal.h index d8cba1caf..cc94a8ed2 100644 --- a/myproposal.h +++ b/myproposal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: myproposal.h,v 1.18 2005/07/25 11:59:39 markus Exp $ */ +/* $OpenBSD: myproposal.h,v 1.19 2006/03/07 09:07:40 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -23,9 +23,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define KEX_DEFAULT_KEX "diffie-hellman-group-exchange-sha1," \ - "diffie-hellman-group14-sha1," \ - "diffie-hellman-group1-sha1" +#define KEX_DEFAULT_KEX \ + "diffie-hellman-group-exchange-sha256," \ + "diffie-hellman-group-exchange-sha1," \ + "diffie-hellman-group14-sha1," \ + "diffie-hellman-group1-sha1" #define KEX_DEFAULT_PK_ALG "ssh-rsa,ssh-dss" #define KEX_DEFAULT_ENCRYPT \ "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \ diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 13e7c721c..f05c4697c 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.59 2006/02/08 14:31:30 stevesk Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.60 2006/03/07 09:07:40 djm Exp $"); #include "openbsd-compat/sys-queue.h" #include @@ -351,6 +351,7 @@ keygrab_ssh2(con *c) c->c_kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; c->c_kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; c->c_kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; + c->c_kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; c->c_kex->verify_host_key = hostjump; if (!(j = setjmp(kexjmp))) { diff --git a/sshconnect2.c b/sshconnect2.c index f2776edb7..b01a3ca5b 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.146 2006/02/20 17:19:54 stevesk Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.147 2006/03/07 09:07:40 djm Exp $"); #include #include @@ -127,6 +127,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr) kex->kex[KEX_DH_GRP1_SHA1] = kexdh_client; kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; + kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; kex->client_version_string=client_version_string; kex->server_version_string=server_version_string; kex->verify_host_key=&verify_host_key_callback; diff --git a/sshd.c b/sshd.c index 19c2d96ad..6f458eb3b 100644 --- a/sshd.c +++ b/sshd.c @@ -2042,6 +2042,7 @@ do_ssh2_kex(void) kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; kex->kex[KEX_DH_GRP14_SHA1] = kexdh_server; kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; + kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; kex->server = 1; kex->client_version_string=client_version_string; kex->server_version_string=server_version_string; -- cgit v1.2.3 From 6645e7a70d1b46b2cb408e1a13755c300a0d47c2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 14:42:54 +1100 Subject: - (djm) [auth-pam.c clientloop.c includes.h monitor.c session.c] [sftp-client.c ssh-keysign.c ssh.c sshconnect.c sshconnect2.c] [sshd.c openbsd-compat/bsd-misc.c openbsd-compat/bsd-openpty.c] [openbsd-compat/glob.c openbsd-compat/mktemp.c] [openbsd-compat/readpassphrase.c] Lots of include fixes for OpenSolaris --- ChangeLog | 8 +++++++- auth-pam.c | 7 ++++++- clientloop.c | 2 ++ includes.h | 1 + monitor.c | 2 ++ openbsd-compat/bsd-misc.c | 5 ++++- openbsd-compat/bsd-openpty.c | 2 ++ openbsd-compat/glob.c | 3 +++ openbsd-compat/mktemp.c | 4 ++++ openbsd-compat/readpassphrase.c | 2 ++ session.c | 2 ++ sftp-client.c | 1 + ssh-keysign.c | 2 ++ ssh.c | 2 ++ sshconnect.c | 2 ++ sshconnect2.c | 1 - sshd.c | 2 ++ 17 files changed, 44 insertions(+), 4 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index d361e71f2..c30c0e399 100644 --- a/ChangeLog +++ b/ChangeLog @@ -258,6 +258,12 @@ - (djm) [ssh-agent.c] Restore dropped stat.h - (djm) [openbsd-compat/sha2.h openbsd-compat/sha2.c] Comment out SHA384, which we don't need and doesn't compile without tweaks + - (djm) [auth-pam.c clientloop.c includes.h monitor.c session.c] + [sftp-client.c ssh-keysign.c ssh.c sshconnect.c sshconnect2.c] + [sshd.c openbsd-compat/bsd-misc.c openbsd-compat/bsd-openpty.c] + [openbsd-compat/glob.c openbsd-compat/mktemp.c] + [openbsd-compat/readpassphrase.c] Lots of include fixes for + OpenSolaris 20060313 - (dtucker) [configure.ac] Bug #1171: Don't use printf("%lld", longlong) @@ -4159,4 +4165,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4217 2006/03/15 03:37:48 djm Exp $ +$Id: ChangeLog,v 1.4218 2006/03/15 03:42:54 djm Exp $ diff --git a/auth-pam.c b/auth-pam.c index fb9ae954a..49cf32369 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -47,7 +47,12 @@ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ #include "includes.h" -RCSID("$Id: auth-pam.c,v 1.128 2006/01/29 05:46:13 dtucker Exp $"); +RCSID("$Id: auth-pam.c,v 1.129 2006/03/15 03:42:55 djm Exp $"); + +#include +#include +#include +#include #ifdef USE_PAM #if defined(HAVE_SECURITY_PAM_APPL_H) diff --git a/clientloop.c b/clientloop.c index dba3e96c3..83706c297 100644 --- a/clientloop.c +++ b/clientloop.c @@ -68,7 +68,9 @@ RCSID("$OpenBSD: clientloop.c,v 1.155 2006/02/22 00:04:44 stevesk Exp $"); #include #include +#ifdef HAVE_PATHS_H #include +#endif #include #include diff --git a/includes.h b/includes.h index 800d23e90..431fa2d13 100644 --- a/includes.h +++ b/includes.h @@ -103,6 +103,7 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg } #ifdef HAVE_STDINT_H # include #endif +#include #ifdef HAVE_SYS_BITYPES_H # include /* For u_intXX_t */ #endif diff --git a/monitor.c b/monitor.c index 30849a371..502d54efa 100644 --- a/monitor.c +++ b/monitor.c @@ -30,7 +30,9 @@ RCSID("$OpenBSD: monitor.c,v 1.69 2006/03/07 09:07:40 djm Exp $"); #include #include +#ifdef HAVE_PATHS_H #include +#endif #include #ifdef SKEY diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d32b054d7..00482616d 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -16,9 +16,12 @@ */ #include "includes.h" + +#include + #include "xmalloc.h" -RCSID("$Id: bsd-misc.c,v 1.28 2005/11/01 22:07:31 dtucker Exp $"); +RCSID("$Id: bsd-misc.c,v 1.29 2006/03/15 03:42:57 djm Exp $"); #ifndef HAVE___PROGNAME char *__progname; diff --git a/openbsd-compat/bsd-openpty.c b/openbsd-compat/bsd-openpty.c index 8eb62b7a8..28929de67 100644 --- a/openbsd-compat/bsd-openpty.c +++ b/openbsd-compat/bsd-openpty.c @@ -46,6 +46,8 @@ # include #endif +#include + #ifndef O_NOCTTY #define O_NOCTTY 0 #endif diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index f6a04ea3f..fd3d86c4c 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -34,6 +34,9 @@ /* OPENBSD ORIGINAL: lib/libc/gen/glob.c */ #include "includes.h" +#include +#include +#include #include static long diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index 88e04c520..53a50c512 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -35,6 +35,10 @@ #include "includes.h" +#include +#include +#include + #if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) static int _gettemp(char *, int *, int, int); diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index 919c0174a..95e26dcd4 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -27,6 +27,8 @@ #ifndef HAVE_READPASSPHRASE #include +#include +#include #include #ifdef TCSASOFT diff --git a/session.c b/session.c index 6fb63d3ad..8eb1a03e5 100644 --- a/session.c +++ b/session.c @@ -42,7 +42,9 @@ RCSID("$OpenBSD: session.c,v 1.197 2006/02/28 01:10:21 djm Exp $"); #include #include +#ifdef HAVE_PATHS_H #include +#endif #include #include "ssh.h" diff --git a/sftp-client.c b/sftp-client.c index 042ab8879..6637feca4 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -26,6 +26,7 @@ RCSID("$OpenBSD: sftp-client.c,v 1.60 2006/02/20 17:19:54 stevesk Exp $"); #ifdef HAVE_SYS_STAT_H # include #endif +# include #include "openbsd-compat/sys-queue.h" diff --git a/ssh-keysign.c b/ssh-keysign.c index f2ee214e1..aa0260bf8 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -24,7 +24,9 @@ #include "includes.h" RCSID("$OpenBSD: ssh-keysign.c,v 1.20 2006/02/08 12:15:27 stevesk Exp $"); +#ifdef HAVE_PATHS_H #include +#endif #include #include diff --git a/ssh.c b/ssh.c index 6f185b4a7..911231a6c 100644 --- a/ssh.c +++ b/ssh.c @@ -51,7 +51,9 @@ RCSID("$OpenBSD: ssh.c,v 1.266 2006/03/12 04:23:07 djm Exp $"); #include #include +#ifdef HAVE_PATHS_H #include +#endif #include #include diff --git a/sshconnect.c b/sshconnect.c index 9d1c8593c..340270731 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -20,7 +20,9 @@ RCSID("$OpenBSD: sshconnect.c,v 1.176 2006/02/22 00:04:45 stevesk Exp $"); #include #include +#ifdef HAVE_PATHS_H #include +#endif #include "ssh.h" #include "xmalloc.h" diff --git a/sshconnect2.c b/sshconnect2.c index b01a3ca5b..2467d235c 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -27,7 +27,6 @@ RCSID("$OpenBSD: sshconnect2.c,v 1.147 2006/03/07 09:07:40 djm Exp $"); #include #include -#include #include #include "openbsd-compat/sys-queue.h" diff --git a/sshd.c b/sshd.c index 6f458eb3b..aef4db109 100644 --- a/sshd.c +++ b/sshd.c @@ -51,7 +51,9 @@ RCSID("$OpenBSD: sshd.c,v 1.325 2006/03/13 08:16:00 djm Exp $"); #include #include +#ifdef HAVE_PATHS_H #include +#endif #include #include -- cgit v1.2.3 From b0fb6872ed2efe3a116083e43dd4f5f47cd4882b Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 00:03:21 +1100 Subject: - deraadt@cvs.openbsd.org 2006/03/19 18:51:18 [atomicio.c auth-bsdauth.c auth-chall.c auth-krb5.c auth-options.c] [auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c] [auth-shadow.c auth-skey.c auth.c auth1.c auth2-chall.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c] [auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c] [canohost.c channels.c cipher-3des1.c cipher-acss.c cipher-aes.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c entropy.c fatal.c] [groupaccess.c hostfile.c includes.h kex.c kexdh.c kexdhc.c] [kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c loginrec.c] [loginrec.h logintest.c mac.c match.c md-sha256.c md5crypt.c misc.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c] [nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c] [scard.c scp.c servconf.c serverloop.c session.c sftp-client.c] [sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c] [ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] [ssh-rand-helper.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c openbsd-compat/bsd-arc4random.c] [openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-cygwin_util.c] [openbsd-compat/bsd-getpeereid.c openbsd-compat/bsd-misc.c] [openbsd-compat/bsd-nextstep.c openbsd-compat/bsd-snprintf.c] [openbsd-compat/bsd-waitpid.c openbsd-compat/fake-rfc2553.c] RCSID() can die --- ChangeLog | 27 ++++++++++++++++++++++++++- atomicio.c | 1 - auth-bsdauth.c | 1 - auth-chall.c | 1 - auth-krb5.c | 1 - auth-options.c | 1 - auth-pam.c | 1 - auth-passwd.c | 1 - auth-rh-rsa.c | 1 - auth-rhosts.c | 1 - auth-rsa.c | 1 - auth-shadow.c | 1 - auth-skey.c | 1 - auth.c | 1 - auth1.c | 1 - auth2-chall.c | 1 - auth2-hostbased.c | 1 - auth2-kbdint.c | 1 - auth2-none.c | 1 - auth2-passwd.c | 1 - auth2-pubkey.c | 1 - auth2.c | 1 - authfd.c | 1 - authfile.c | 1 - bufaux.c | 1 - buffer.c | 1 - canohost.c | 1 - channels.c | 1 - cipher-3des1.c | 1 - cipher-acss.c | 2 -- cipher-aes.c | 1 - cipher-bf1.c | 1 - cipher-ctr.c | 1 - cipher.c | 1 - cleanup.c | 1 - clientloop.c | 1 - compat.c | 1 - compress.c | 1 - deattack.c | 1 - dh.c | 1 - dispatch.c | 1 - dns.c | 3 +-- entropy.c | 2 -- fatal.c | 1 - groupaccess.c | 1 - hostfile.c | 1 - includes.h | 5 +---- kex.c | 1 - kexdh.c | 1 - kexdhc.c | 1 - kexdhs.c | 1 - kexgex.c | 1 - kexgexc.c | 1 - kexgexs.c | 1 - key.c | 1 - log.c | 1 - loginrec.c | 2 -- loginrec.h | 2 -- logintest.c | 2 -- mac.c | 1 - match.c | 1 - md-sha256.c | 2 -- md5crypt.c | 2 -- misc.c | 1 - monitor.c | 1 - monitor_fdpass.c | 1 - monitor_mm.c | 1 - monitor_wrap.c | 1 - msg.c | 1 - nchan.c | 1 - openbsd-compat/bsd-arc4random.c | 2 -- openbsd-compat/bsd-closefrom.c | 2 -- openbsd-compat/bsd-cygwin_util.c | 2 -- openbsd-compat/bsd-getpeereid.c | 2 -- openbsd-compat/bsd-misc.c | 2 -- openbsd-compat/bsd-nextstep.c | 2 -- openbsd-compat/bsd-snprintf.c | 2 -- openbsd-compat/bsd-waitpid.c | 2 -- openbsd-compat/fake-rfc2553.c | 2 -- packet.c | 1 - progressmeter.c | 1 - readconf.c | 1 - readpass.c | 1 - rsa.c | 1 - scard.c | 1 - scp.c | 1 - servconf.c | 1 - serverloop.c | 1 - session.c | 1 - sftp-client.c | 1 - sftp-common.c | 1 - sftp-glob.c | 1 - sftp-server.c | 1 - sftp.c | 1 - ssh-add.c | 1 - ssh-agent.c | 1 - ssh-dss.c | 1 - ssh-keygen.c | 1 - ssh-keyscan.c | 1 - ssh-keysign.c | 1 - ssh-rand-helper.c | 2 -- ssh-rsa.c | 1 - ssh.c | 1 - sshconnect.c | 1 - sshconnect1.c | 1 - sshconnect2.c | 1 - sshd.c | 1 - sshlogin.c | 1 - sshpty.c | 1 - sshtty.c | 1 - ttymodes.c | 1 - uidswap.c | 1 - uuencode.c | 1 - xmalloc.c | 1 - 114 files changed, 28 insertions(+), 135 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 2281accdc..64a20a4c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,31 @@ [ssh.1] Add RFC4419 (Diffie-Hellman group exchange KEX) to the list of SSH RFCs that OpenSSH supports + - deraadt@cvs.openbsd.org 2006/03/19 18:51:18 + [atomicio.c auth-bsdauth.c auth-chall.c auth-krb5.c auth-options.c] + [auth-pam.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c] + [auth-shadow.c auth-skey.c auth.c auth1.c auth2-chall.c] + [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c] + [auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c] + [canohost.c channels.c cipher-3des1.c cipher-acss.c cipher-aes.c] + [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] + [compress.c deattack.c dh.c dispatch.c dns.c entropy.c fatal.c] + [groupaccess.c hostfile.c includes.h kex.c kexdh.c kexdhc.c] + [kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c loginrec.c] + [loginrec.h logintest.c mac.c match.c md-sha256.c md5crypt.c misc.c] + [monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c] + [nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c] + [scard.c scp.c servconf.c serverloop.c session.c sftp-client.c] + [sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c] + [ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c] + [ssh-rand-helper.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] + [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] + [uidswap.c uuencode.c xmalloc.c openbsd-compat/bsd-arc4random.c] + [openbsd-compat/bsd-closefrom.c openbsd-compat/bsd-cygwin_util.c] + [openbsd-compat/bsd-getpeereid.c openbsd-compat/bsd-misc.c] + [openbsd-compat/bsd-nextstep.c openbsd-compat/bsd-snprintf.c] + [openbsd-compat/bsd-waitpid.c openbsd-compat/fake-rfc2553.c] + RCSID() can die 20060318 - (djm) [auth-pam.c] Fix memleak in error path, from Coverity via @@ -4196,4 +4221,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4231 2006/03/25 12:39:29 djm Exp $ +$Id: ChangeLog,v 1.4232 2006/03/25 13:03:21 djm Exp $ diff --git a/atomicio.c b/atomicio.c index 8dd271b6d..afe306b1b 100644 --- a/atomicio.c +++ b/atomicio.c @@ -25,7 +25,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: atomicio.c,v 1.14 2006/02/11 19:31:18 otto Exp $"); #include "atomicio.h" diff --git a/auth-bsdauth.c b/auth-bsdauth.c index 920c977d8..f48b43174 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.c @@ -22,7 +22,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth-bsdauth.c,v 1.6 2005/01/19 13:11:47 dtucker Exp $"); #ifdef BSD_AUTH #include "xmalloc.h" diff --git a/auth-chall.c b/auth-chall.c index e4f783096..7707023a4 100644 --- a/auth-chall.c +++ b/auth-chall.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-chall.c,v 1.9 2003/11/03 09:03:37 djm Exp $"); #include "auth.h" #include "log.h" diff --git a/auth-krb5.c b/auth-krb5.c index 64d613543..8bdc64edf 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -28,7 +28,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-krb5.c,v 1.16 2005/11/21 09:42:10 dtucker Exp $"); #include "ssh.h" #include "ssh1.h" diff --git a/auth-options.c b/auth-options.c index ad97e6129..77488a49d 100644 --- a/auth-options.c +++ b/auth-options.c @@ -10,7 +10,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-options.c,v 1.33 2005/12/08 18:34:11 reyk Exp $"); #include "xmalloc.h" #include "match.h" diff --git a/auth-pam.c b/auth-pam.c index 2d975c394..3d64de76a 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -47,7 +47,6 @@ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ #include "includes.h" -RCSID("$Id: auth-pam.c,v 1.130 2006/03/18 12:04:49 djm Exp $"); #include #include diff --git a/auth-passwd.c b/auth-passwd.c index 6e6d0d76a..df202dde3 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -36,7 +36,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-passwd.c,v 1.34 2005/07/19 15:32:26 otto Exp $"); #include "packet.h" #include "buffer.h" diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c index c31f2b97b..f9c386dba 100644 --- a/auth-rh-rsa.c +++ b/auth-rh-rsa.c @@ -13,7 +13,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rh-rsa.c,v 1.38 2005/07/17 07:17:54 djm Exp $"); #include "packet.h" #include "uidswap.h" diff --git a/auth-rhosts.c b/auth-rhosts.c index 1deeb30b9..098893563 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -14,7 +14,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rhosts.c,v 1.35 2006/02/20 17:19:53 stevesk Exp $"); #include #include diff --git a/auth-rsa.c b/auth-rsa.c index 275c0b67b..effff5d2a 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -14,7 +14,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth-rsa.c,v 1.64 2006/02/20 17:19:53 stevesk Exp $"); #include #include diff --git a/auth-shadow.c b/auth-shadow.c index 59737b93c..c8d5dd3c1 100644 --- a/auth-shadow.c +++ b/auth-shadow.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$Id: auth-shadow.c,v 1.7 2005/07/17 07:04:47 djm Exp $"); #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) #include diff --git a/auth-skey.c b/auth-skey.c index f676dbec9..ce8c1a809 100644 --- a/auth-skey.c +++ b/auth-skey.c @@ -22,7 +22,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth-skey.c,v 1.20 2002/06/30 21:59:45 deraadt Exp $"); #ifdef SKEY diff --git a/auth.c b/auth.c index fca373b80..35bc5ea1d 100644 --- a/auth.c +++ b/auth.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth.c,v 1.62 2006/02/20 17:19:53 stevesk Exp $"); #include #include diff --git a/auth1.c b/auth1.c index 4bc2bf76d..cc1092abf 100644 --- a/auth1.c +++ b/auth1.c @@ -10,7 +10,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth1.c,v 1.62 2005/07/16 01:35:24 djm Exp $"); #include "xmalloc.h" #include "rsa.h" diff --git a/auth2-chall.c b/auth2-chall.c index b147cadf3..8860a94c5 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -23,7 +23,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: auth2-chall.c,v 1.24 2005/07/17 07:17:54 djm Exp $"); #include "ssh2.h" #include "auth.h" diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 1111ed67a..251828496 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-hostbased.c,v 1.6 2004/01/19 21:25:15 markus Exp $"); #include "ssh2.h" #include "xmalloc.h" diff --git a/auth2-kbdint.c b/auth2-kbdint.c index fa8364975..1b902e4cb 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-kbdint.c,v 1.2 2002/05/31 11:35:15 markus Exp $"); #include "packet.h" #include "auth.h" diff --git a/auth2-none.c b/auth2-none.c index 2eb27a914..19cc2b1b7 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-none.c,v 1.8 2006/02/20 17:19:54 stevesk Exp $"); #include #include diff --git a/auth2-passwd.c b/auth2-passwd.c index 2321ef47b..41507af1d 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-passwd.c,v 1.5 2003/12/31 00:24:50 dtucker Exp $"); #include "xmalloc.h" #include "packet.h" diff --git a/auth2-pubkey.c b/auth2-pubkey.c index ea1367070..a59c37993 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2-pubkey.c,v 1.10 2006/02/20 17:19:54 stevesk Exp $"); #include #include diff --git a/auth2.c b/auth2.c index d255242ed..b49cc79c7 100644 --- a/auth2.c +++ b/auth2.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: auth2.c,v 1.107 2004/07/28 09:40:29 markus Exp $"); #include "ssh2.h" #include "xmalloc.h" diff --git a/authfd.c b/authfd.c index 06e6d4a4c..a3f22cfc7 100644 --- a/authfd.c +++ b/authfd.c @@ -35,7 +35,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfd.c,v 1.67 2006/02/20 16:36:14 stevesk Exp $"); #include #include diff --git a/authfile.c b/authfile.c index 0656262d0..d529c8340 100644 --- a/authfile.c +++ b/authfile.c @@ -36,7 +36,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfile.c,v 1.63 2006/03/13 10:26:52 dtucker Exp $"); #include #include diff --git a/bufaux.c b/bufaux.c index 106a3a0c7..19f6708f0 100644 --- a/bufaux.c +++ b/bufaux.c @@ -37,7 +37,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: bufaux.c,v 1.37 2005/11/05 05:01:15 djm Exp $"); #include #include "bufaux.h" diff --git a/buffer.c b/buffer.c index 487e08105..08682e0f1 100644 --- a/buffer.c +++ b/buffer.c @@ -12,7 +12,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: buffer.c,v 1.23 2005/03/14 11:46:56 markus Exp $"); #include "xmalloc.h" #include "buffer.h" diff --git a/canohost.c b/canohost.c index f15aecb62..4fafb0b82 100644 --- a/canohost.c +++ b/canohost.c @@ -12,7 +12,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: canohost.c,v 1.50 2006/03/14 00:15:39 djm Exp $"); #include diff --git a/channels.c b/channels.c index 7161b9413..30c6d3870 100644 --- a/channels.c +++ b/channels.c @@ -39,7 +39,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: channels.c,v 1.235 2006/02/20 16:36:14 stevesk Exp $"); #include #include diff --git a/cipher-3des1.c b/cipher-3des1.c index f815e8ae5..53b5a2958 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher-3des1.c,v 1.2 2003/12/22 20:29:55 markus Exp $"); #include #include "xmalloc.h" diff --git a/cipher-acss.c b/cipher-acss.c index a95fa6747..90b51a4d1 100644 --- a/cipher-acss.c +++ b/cipher-acss.c @@ -17,8 +17,6 @@ #include "includes.h" #include -RCSID("$Id: cipher-acss.c,v 1.3 2005/07/17 07:04:47 djm Exp $"); - #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) #include "acss.h" diff --git a/cipher-aes.c b/cipher-aes.c index 228ddb104..99e9eea92 100644 --- a/cipher-aes.c +++ b/cipher-aes.c @@ -28,7 +28,6 @@ #include "openbsd-compat/openssl-compat.h" #ifdef USE_BUILTIN_RIJNDAEL -RCSID("$OpenBSD: cipher-aes.c,v 1.2 2003/11/26 21:44:29 djm Exp $"); #include #include "rijndael.h" diff --git a/cipher-bf1.c b/cipher-bf1.c index 5af695c17..e7246650b 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher-bf1.c,v 1.1 2003/05/15 03:08:29 markus Exp $"); #include #include "xmalloc.h" diff --git a/cipher-ctr.c b/cipher-ctr.c index 8a98f3c42..9615f5aa6 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -14,7 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -RCSID("$OpenBSD: cipher-ctr.c,v 1.6 2005/07/17 07:17:55 djm Exp $"); #include diff --git a/cipher.c b/cipher.c index 1434d5524..15397db03 100644 --- a/cipher.c +++ b/cipher.c @@ -35,7 +35,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: cipher.c,v 1.77 2005/07/16 01:35:24 djm Exp $"); #include "xmalloc.h" #include "log.h" diff --git a/cleanup.c b/cleanup.c index 11d1d4d9a..7b40ca781 100644 --- a/cleanup.c +++ b/cleanup.c @@ -14,7 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -RCSID("$OpenBSD: cleanup.c,v 1.1 2003/09/23 20:17:11 markus Exp $"); #include "log.h" diff --git a/clientloop.c b/clientloop.c index 83706c297..6d58a5afb 100644 --- a/clientloop.c +++ b/clientloop.c @@ -59,7 +59,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: clientloop.c,v 1.155 2006/02/22 00:04:44 stevesk Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/compat.c b/compat.c index 4086e853e..24d9a7f38 100644 --- a/compat.c +++ b/compat.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: compat.c,v 1.71 2005/03/01 10:09:52 djm Exp $"); #include "buffer.h" #include "packet.h" diff --git a/compress.c b/compress.c index 0d1c7e55e..6f8d6b775 100644 --- a/compress.c +++ b/compress.c @@ -12,7 +12,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: compress.c,v 1.21 2004/01/13 19:45:15 markus Exp $"); #include "log.h" #include "buffer.h" diff --git a/deattack.c b/deattack.c index 0cf1e1c54..3d48afc89 100644 --- a/deattack.c +++ b/deattack.c @@ -18,7 +18,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: deattack.c,v 1.20 2006/02/07 03:59:20 stevesk Exp $"); #include "deattack.h" #include "log.h" diff --git a/dh.c b/dh.c index 044d869fb..a30b704fb 100644 --- a/dh.c +++ b/dh.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: dh.c,v 1.31 2004/08/04 10:37:52 djm Exp $"); #include "xmalloc.h" diff --git a/dispatch.c b/dispatch.c index c5ff65031..3f96c726b 100644 --- a/dispatch.c +++ b/dispatch.c @@ -22,7 +22,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: dispatch.c,v 1.16 2003/04/08 20:21:28 itojun Exp $"); #include "ssh1.h" #include "ssh2.h" diff --git a/dns.c b/dns.c index a71dd9bff..e9270798d 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $ */ +/* $OpenBSD: dns.c,v 1.17 2006/03/19 18:51:18 deraadt Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -26,7 +26,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $"); #include diff --git a/entropy.c b/entropy.c index 91724273e..d60583b34 100644 --- a/entropy.c +++ b/entropy.c @@ -51,8 +51,6 @@ * XXX: we should tell the child how many bytes we need. */ -RCSID("$Id: entropy.c,v 1.53 2006/03/15 20:21:35 dtucker Exp $"); - #ifndef OPENSSL_PRNG_ONLY #define RANDOM_SEED_SIZE 48 static uid_t original_uid, original_euid; diff --git a/fatal.c b/fatal.c index ae1aaac6e..8eea85a03 100644 --- a/fatal.c +++ b/fatal.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: fatal.c,v 1.2 2003/09/23 20:17:11 markus Exp $"); #include "log.h" diff --git a/groupaccess.c b/groupaccess.c index f50879f83..2328bf453 100644 --- a/groupaccess.c +++ b/groupaccess.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: groupaccess.c,v 1.6 2003/04/08 20:21:28 itojun Exp $"); #include "groupaccess.h" #include "xmalloc.h" diff --git a/hostfile.c b/hostfile.c index 5cb55dd3c..85fbcf7ce 100644 --- a/hostfile.c +++ b/hostfile.c @@ -36,7 +36,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: hostfile.c,v 1.37 2006/02/07 03:47:05 stevesk Exp $"); #include diff --git a/includes.h b/includes.h index 65c34c496..363be3ac5 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.37 2006/02/22 00:04:44 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.38 2006/03/19 18:51:18 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,9 +16,6 @@ #ifndef INCLUDES_H #define INCLUDES_H -#define RCSID(msg) \ -static /**/const char *const rcsid[] = { (const char *)rcsid, "\100(#)" msg } - #include "config.h" #define _GNU_SOURCE /* activate extra prototypes for glibc */ diff --git a/kex.c b/kex.c index 23d8d2923..ced56e668 100644 --- a/kex.c +++ b/kex.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: kex.c,v 1.66 2006/03/07 09:07:40 djm Exp $"); #include diff --git a/kexdh.c b/kexdh.c index f79d8781d..f34214062 100644 --- a/kexdh.c +++ b/kexdh.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdh.c,v 1.20 2005/11/04 05:15:59 djm Exp $"); #include diff --git a/kexdhc.c b/kexdhc.c index d8a2fa3b7..23abeb50d 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdhc.c,v 1.3 2005/11/04 05:15:59 djm Exp $"); #include "xmalloc.h" #include "key.h" diff --git a/kexdhs.c b/kexdhs.c index 26c8cdfd6..be815e46b 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdhs.c,v 1.3 2005/11/04 05:15:59 djm Exp $"); #include "xmalloc.h" #include "key.h" diff --git a/kexgex.c b/kexgex.c index 705484a47..b306821cc 100644 --- a/kexgex.c +++ b/kexgex.c @@ -24,7 +24,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexgex.c,v 1.24 2005/11/04 05:15:59 djm Exp $"); #include diff --git a/kexgexc.c b/kexgexc.c index a6ff8757d..50c5a32e5 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -24,7 +24,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexgexc.c,v 1.3 2005/11/04 05:15:59 djm Exp $"); #include "xmalloc.h" #include "key.h" diff --git a/kexgexs.c b/kexgexs.c index c48b27af9..e3d0eacc5 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -24,7 +24,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexgexs.c,v 1.2 2005/11/04 05:15:59 djm Exp $"); #include "xmalloc.h" #include "key.h" diff --git a/key.c b/key.c index 08c158b59..5cb54c13b 100644 --- a/key.c +++ b/key.c @@ -32,7 +32,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: key.c,v 1.58 2005/06/17 02:44:32 djm Exp $"); #include diff --git a/log.c b/log.c index 96ab24b04..58ba8591c 100644 --- a/log.c +++ b/log.c @@ -34,7 +34,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: log.c,v 1.29 2003/09/23 20:17:11 markus Exp $"); #include "log.h" #include "xmalloc.h" diff --git a/loginrec.c b/loginrec.c index 9f9eb69a7..c2498e1e3 100644 --- a/loginrec.c +++ b/loginrec.c @@ -168,8 +168,6 @@ # include #endif -RCSID("$Id: loginrec.c,v 1.72 2006/03/15 03:01:11 djm Exp $"); - /** ** prototypes for helper functions in this file **/ diff --git a/loginrec.h b/loginrec.h index 8e3390178..4fe24ac2a 100644 --- a/loginrec.h +++ b/loginrec.h @@ -35,8 +35,6 @@ #include #include -/* RCSID("$Id: loginrec.h,v 1.10 2005/06/19 00:19:44 djm Exp $"); */ - /** ** you should use the login_* calls to work around platform dependencies **/ diff --git a/logintest.c b/logintest.c index 95cce5a3a..1159274f8 100644 --- a/logintest.c +++ b/logintest.c @@ -43,8 +43,6 @@ #include "loginrec.h" -RCSID("$Id: logintest.c,v 1.11 2004/07/17 04:07:42 dtucker Exp $"); - extern char *__progname; #define PAUSE_BEFORE_LOGOUT 3 diff --git a/mac.c b/mac.c index 2bda5a1b9..f03100ac9 100644 --- a/mac.c +++ b/mac.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: mac.c,v 1.7 2005/06/17 02:44:32 djm Exp $"); #include diff --git a/match.c b/match.c index 51407b818..736047df1 100644 --- a/match.c +++ b/match.c @@ -35,7 +35,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: match.c,v 1.21 2006/02/22 00:04:44 stevesk Exp $"); #include diff --git a/md-sha256.c b/md-sha256.c index 064228a4a..8ea0ac433 100644 --- a/md-sha256.c +++ b/md-sha256.c @@ -31,8 +31,6 @@ # endif #endif -RCSID("$OpenBSD: md-sha256.c,v 1.1 2006/03/07 09:07:40 djm Exp $"); - const EVP_MD *evp_ssh_sha256(void); static int diff --git a/md5crypt.c b/md5crypt.c index 8f2523e62..253fdfdf2 100644 --- a/md5crypt.c +++ b/md5crypt.c @@ -13,8 +13,6 @@ #if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) #include -RCSID("$Id: md5crypt.c,v 1.9 2003/11/21 12:56:47 djm Exp $"); - /* 0 ... 63 => ascii - 64 */ static unsigned char itoa64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; diff --git a/misc.c b/misc.c index 662480e9e..66b762b5a 100644 --- a/misc.c +++ b/misc.c @@ -24,7 +24,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: misc.c,v 1.46 2006/03/13 10:14:29 dtucker Exp $"); #include #include diff --git a/monitor.c b/monitor.c index 502d54efa..e34d006d7 100644 --- a/monitor.c +++ b/monitor.c @@ -25,7 +25,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor.c,v 1.69 2006/03/07 09:07:40 djm Exp $"); #include #include diff --git a/monitor_fdpass.c b/monitor_fdpass.c index dd1a13984..dec90d18b 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -24,7 +24,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_fdpass.c,v 1.6 2004/08/13 02:51:48 djm Exp $"); #include diff --git a/monitor_mm.c b/monitor_mm.c index b0ec37cff..e8de71fea 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -24,7 +24,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_mm.c,v 1.9 2004/05/11 19:01:43 deraadt Exp $"); #ifdef HAVE_SYS_MMAN_H #include diff --git a/monitor_wrap.c b/monitor_wrap.c index 3b50753de..7536bf305 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -25,7 +25,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: monitor_wrap.c,v 1.40 2005/05/24 17:32:43 avsm Exp $"); #include #include diff --git a/msg.c b/msg.c index 3e4c2882c..662db4cdb 100644 --- a/msg.c +++ b/msg.c @@ -22,7 +22,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: msg.c,v 1.8 2005/05/24 17:32:43 avsm Exp $"); #include "buffer.h" #include "getput.h" diff --git a/nchan.c b/nchan.c index aee3f37b0..ca9a56b59 100644 --- a/nchan.c +++ b/nchan.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: nchan.c,v 1.51 2004/07/11 17:48:47 deraadt Exp $"); #include "ssh1.h" #include "ssh2.h" diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c index 1eeb6953b..46e0a020f 100644 --- a/openbsd-compat/bsd-arc4random.c +++ b/openbsd-compat/bsd-arc4random.c @@ -17,8 +17,6 @@ #include "includes.h" #include "log.h" -RCSID("$Id: bsd-arc4random.c,v 1.10 2005/02/16 02:01:28 djm Exp $"); - #ifndef HAVE_ARC4RANDOM #include diff --git a/openbsd-compat/bsd-closefrom.c b/openbsd-compat/bsd-closefrom.c index 5b7b94ae4..7509d2835 100644 --- a/openbsd-compat/bsd-closefrom.c +++ b/openbsd-compat/bsd-closefrom.c @@ -46,8 +46,6 @@ # define OPEN_MAX 256 #endif -RCSID("$Id: bsd-closefrom.c,v 1.2 2005/11/10 08:29:13 dtucker Exp $"); - #ifndef lint static const char sudorcsid[] = "$Sudo: closefrom.c,v 1.6 2004/06/01 20:51:56 millert Exp $"; #endif /* lint */ diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c index 96be7fecd..8f3acee26 100644 --- a/openbsd-compat/bsd-cygwin_util.c +++ b/openbsd-compat/bsd-cygwin_util.c @@ -29,8 +29,6 @@ #include "includes.h" -RCSID("$Id: bsd-cygwin_util.c,v 1.15 2006/02/12 00:59:09 dtucker Exp $"); - #ifdef HAVE_CYGWIN #include diff --git a/openbsd-compat/bsd-getpeereid.c b/openbsd-compat/bsd-getpeereid.c index fe2edad71..d94489d1d 100644 --- a/openbsd-compat/bsd-getpeereid.c +++ b/openbsd-compat/bsd-getpeereid.c @@ -16,8 +16,6 @@ #include "includes.h" -RCSID("$Id: bsd-getpeereid.c,v 1.3 2004/02/17 05:49:55 djm Exp $"); - #if !defined(HAVE_GETPEEREID) #if defined(SO_PEERCRED) diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index 00482616d..d2d9ad771 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -21,8 +21,6 @@ #include "xmalloc.h" -RCSID("$Id: bsd-misc.c,v 1.29 2006/03/15 03:42:57 djm Exp $"); - #ifndef HAVE___PROGNAME char *__progname; #endif diff --git a/openbsd-compat/bsd-nextstep.c b/openbsd-compat/bsd-nextstep.c index bd35a3afc..8195af88a 100644 --- a/openbsd-compat/bsd-nextstep.c +++ b/openbsd-compat/bsd-nextstep.c @@ -24,8 +24,6 @@ #include "includes.h" -RCSID("$Id: bsd-nextstep.c,v 1.6 2003/06/01 03:23:57 mouring Exp $"); - #ifdef HAVE_NEXT #include #include diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c index 571c61fc0..c30cd1223 100644 --- a/openbsd-compat/bsd-snprintf.c +++ b/openbsd-compat/bsd-snprintf.c @@ -89,8 +89,6 @@ #include "includes.h" -RCSID("$Id: bsd-snprintf.c,v 1.12 2006/03/18 13:07:07 dtucker Exp $"); - #if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */ # undef HAVE_SNPRINTF # undef HAVE_VSNPRINTF diff --git a/openbsd-compat/bsd-waitpid.c b/openbsd-compat/bsd-waitpid.c index 93c9ec35e..40e6ffaa8 100644 --- a/openbsd-compat/bsd-waitpid.c +++ b/openbsd-compat/bsd-waitpid.c @@ -24,8 +24,6 @@ #include "includes.h" -RCSID("$Id: bsd-waitpid.c,v 1.5 2003/06/01 03:23:57 mouring Exp $"); - #ifndef HAVE_WAITPID #include #include diff --git a/openbsd-compat/fake-rfc2553.c b/openbsd-compat/fake-rfc2553.c index 0186b5300..aae016bf7 100644 --- a/openbsd-compat/fake-rfc2553.c +++ b/openbsd-compat/fake-rfc2553.c @@ -37,8 +37,6 @@ #include "includes.h" -RCSID("$Id: fake-rfc2553.c,v 1.5 2003/09/22 02:08:23 dtucker Exp $"); - #ifndef HAVE_GETNAMEINFO int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags) diff --git a/packet.c b/packet.c index ca6861e55..a1e7d32f6 100644 --- a/packet.c +++ b/packet.c @@ -37,7 +37,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: packet.c,v 1.122 2006/03/13 08:33:00 dtucker Exp $"); #include "openbsd-compat/sys-queue.h" #include diff --git a/progressmeter.c b/progressmeter.c index 5ae02493b..26b34a3e9 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: progressmeter.c,v 1.26 2006/02/20 17:02:44 stevesk Exp $"); #include diff --git a/readconf.c b/readconf.c index 392fc52c2..1112d0d86 100644 --- a/readconf.c +++ b/readconf.c @@ -12,7 +12,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.148 2006/02/22 00:04:44 stevesk Exp $"); #include #include diff --git a/readpass.c b/readpass.c index 811cfa231..4236c43c7 100644 --- a/readpass.c +++ b/readpass.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: readpass.c,v 1.35 2006/02/10 01:44:26 stevesk Exp $"); #include #include diff --git a/rsa.c b/rsa.c index 66561a421..507b73c9c 100644 --- a/rsa.c +++ b/rsa.c @@ -60,7 +60,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: rsa.c,v 1.24 2001/12/27 18:22:16 markus Exp $"); #include "rsa.h" #include "log.h" diff --git a/scard.c b/scard.c index b3d25058a..7cffc2d4e 100644 --- a/scard.c +++ b/scard.c @@ -24,7 +24,6 @@ #include "includes.h" #if defined(SMARTCARD) && defined(USE_SECTOK) -RCSID("$OpenBSD: scard.c,v 1.29 2004/05/08 00:21:31 djm Exp $"); #include #include diff --git a/scp.c b/scp.c index af9317645..43fd50c9e 100644 --- a/scp.c +++ b/scp.c @@ -71,7 +71,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: scp.c,v 1.135 2006/02/22 00:04:44 stevesk Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/servconf.c b/servconf.c index 81953bb80..2ae93d4c3 100644 --- a/servconf.c +++ b/servconf.c @@ -10,7 +10,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.146 2005/12/08 18:34:11 reyk Exp $"); #include "ssh.h" #include "log.h" diff --git a/serverloop.c b/serverloop.c index f4fb6b7b5..2ad0bcf2b 100644 --- a/serverloop.c +++ b/serverloop.c @@ -35,7 +35,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: serverloop.c,v 1.128 2006/03/04 04:12:58 djm Exp $"); #include #include diff --git a/session.c b/session.c index 8eb1a03e5..6efaf659d 100644 --- a/session.c +++ b/session.c @@ -33,7 +33,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.197 2006/02/28 01:10:21 djm Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/sftp-client.c b/sftp-client.c index 6637feca4..c34f919a4 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -20,7 +20,6 @@ /* XXX: copy between two remote sites */ #include "includes.h" -RCSID("$OpenBSD: sftp-client.c,v 1.60 2006/02/20 17:19:54 stevesk Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/sftp-common.c b/sftp-common.c index aa0757561..4222f58d6 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -24,7 +24,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp-common.c,v 1.11 2006/02/20 17:19:54 stevesk Exp $"); #include #include diff --git a/sftp-glob.c b/sftp-glob.c index baa84aa71..cee44fc4c 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -15,7 +15,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp-glob.c,v 1.17 2006/02/20 17:19:54 stevesk Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/sftp-server.c b/sftp-server.c index 30bd1b0ee..cf3458120 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -14,7 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -RCSID("$OpenBSD: sftp-server.c,v 1.52 2006/02/20 17:19:54 stevesk Exp $"); #include #include diff --git a/sftp.c b/sftp.c index c4f027846..d676a3771 100644 --- a/sftp.c +++ b/sftp.c @@ -15,7 +15,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.75 2006/02/20 17:19:54 stevesk Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/ssh-add.c b/ssh-add.c index 59933012d..4c5cc5727 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -35,7 +35,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.76 2006/03/13 10:26:52 dtucker Exp $"); #include #include diff --git a/ssh-agent.c b/ssh-agent.c index b09ce86f2..17914410c 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -34,7 +34,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-agent.c,v 1.129 2006/02/20 17:02:44 stevesk Exp $"); #include #include diff --git a/ssh-dss.c b/ssh-dss.c index 381b7dedb..8250266fa 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-dss.c,v 1.19 2003/11/10 16:23:41 jakob Exp $"); #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index bea4ed59b..c527252b9 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -12,7 +12,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.137 2006/03/13 08:43:16 dtucker Exp $"); #include #include diff --git a/ssh-keyscan.c b/ssh-keyscan.c index f05c4697c..fee6406be 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -7,7 +7,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.60 2006/03/07 09:07:40 djm Exp $"); #include "openbsd-compat/sys-queue.h" #include diff --git a/ssh-keysign.c b/ssh-keysign.c index aa0260bf8..a96babfa5 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -22,7 +22,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: ssh-keysign.c,v 1.20 2006/02/08 12:15:27 stevesk Exp $"); #ifdef HAVE_PATHS_H #include diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index d6e631317..bdf73ec48 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -50,8 +50,6 @@ #include "pathnames.h" #include "log.h" -RCSID("$Id: ssh-rand-helper.c,v 1.27 2006/03/15 03:02:36 djm Exp $"); - /* Number of bytes we write out */ #define OUTPUT_SEED_SIZE 48 diff --git a/ssh-rsa.c b/ssh-rsa.c index eb422d07e..48607c4fb 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -14,7 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -RCSID("$OpenBSD: ssh-rsa.c,v 1.32 2005/06/17 02:44:33 djm Exp $"); #include #include diff --git a/ssh.c b/ssh.c index 911231a6c..9402491e3 100644 --- a/ssh.c +++ b/ssh.c @@ -40,7 +40,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.266 2006/03/12 04:23:07 djm Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/sshconnect.c b/sshconnect.c index 340270731..53b5200ff 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -13,7 +13,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect.c,v 1.176 2006/02/22 00:04:45 stevesk Exp $"); #include #include diff --git a/sshconnect1.c b/sshconnect1.c index 440d7c5bd..a39441120 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -13,7 +13,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect1.c,v 1.62 2005/10/30 08:52:18 djm Exp $"); #include #include diff --git a/sshconnect2.c b/sshconnect2.c index 2467d235c..b7aa96e39 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.147 2006/03/07 09:07:40 djm Exp $"); #include #include diff --git a/sshd.c b/sshd.c index aef4db109..e6b1f5496 100644 --- a/sshd.c +++ b/sshd.c @@ -42,7 +42,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.325 2006/03/13 08:16:00 djm Exp $"); #include #ifdef HAVE_SYS_STAT_H diff --git a/sshlogin.c b/sshlogin.c index 15eb916d1..718c9c412 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -39,7 +39,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshlogin.c,v 1.13 2004/08/12 09:18:24 djm Exp $"); #include "loginrec.h" #include "log.h" diff --git a/sshpty.c b/sshpty.c index 7241580a8..2e42aee11 100644 --- a/sshpty.c +++ b/sshpty.c @@ -12,7 +12,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshpty.c,v 1.16 2006/02/20 17:19:54 stevesk Exp $"); #include #include diff --git a/sshtty.c b/sshtty.c index 844a5c063..528177b4b 100644 --- a/sshtty.c +++ b/sshtty.c @@ -35,7 +35,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshtty.c,v 1.8 2006/02/07 01:52:50 stevesk Exp $"); #include diff --git a/ttymodes.c b/ttymodes.c index 7f621e30e..2c95938d9 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -43,7 +43,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: ttymodes.c,v 1.20 2006/02/07 01:42:00 stevesk Exp $"); #include diff --git a/uidswap.c b/uidswap.c index aab7064eb..ca0894806 100644 --- a/uidswap.c +++ b/uidswap.c @@ -12,7 +12,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: uidswap.c,v 1.24 2003/05/29 16:58:45 deraadt Exp $"); #include "log.h" #include "uidswap.h" diff --git a/uuencode.c b/uuencode.c index 0a7c8d16a..314eb92f3 100644 --- a/uuencode.c +++ b/uuencode.c @@ -23,7 +23,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: uuencode.c,v 1.17 2003/11/10 16:23:41 jakob Exp $"); #include "xmalloc.h" #include "uuencode.h" diff --git a/xmalloc.c b/xmalloc.c index 99c6ac330..64e439853 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -13,7 +13,6 @@ */ #include "includes.h" -RCSID("$OpenBSD: xmalloc.c,v 1.16 2001/07/23 18:21:46 stevesk Exp $"); #include "xmalloc.h" #include "log.h" -- cgit v1.2.3 From 5790b5910bfc3de69e0886953f9c09341f3fd951 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 13:54:03 +1100 Subject: - djm@cvs.openbsd.org 2006/03/19 07:41:30 [sshconnect2.c] memory leaks detected by Coverity via elad AT netbsd.org; deraadt@ ok --- ChangeLog | 6 +++++- sshconnect2.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 19425d867..5a46102ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,10 @@ [dh.c readconf.c servconf.c] potential NULL pointer dereferences detected by Coverity via elad AT netbsd.org; ok deraadt@ + - djm@cvs.openbsd.org 2006/03/19 07:41:30 + [sshconnect2.c] + memory leaks detected by Coverity via elad AT netbsd.org; + deraadt@ ok 20060325 - OpenBSD CVS Sync @@ -4287,4 +4291,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4249 2006/03/26 02:53:32 djm Exp $ +$Id: ChangeLog,v 1.4250 2006/03/26 02:54:12 djm Exp $ diff --git a/sshconnect2.c b/sshconnect2.c index b7aa96e39..f8d21489e 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -513,8 +513,10 @@ userauth_gssapi(Authctxt *authctxt) } } - if (!ok) + if (!ok) { + ssh_gssapi_delete_ctx(&gssctxt); return 0; + } authctxt->methoddata=(void *)gssctxt; @@ -1330,6 +1332,7 @@ userauth_hostbased(Authctxt *authctxt) if (p == NULL) { error("userauth_hostbased: cannot get local ipaddr/name"); key_free(private); + xfree(blob); return 0; } len = strlen(p) + 2; @@ -1368,6 +1371,7 @@ userauth_hostbased(Authctxt *authctxt) error("key_sign failed"); xfree(chost); xfree(pkalg); + xfree(blob); return 0; } packet_start(SSH2_MSG_USERAUTH_REQUEST); @@ -1383,6 +1387,7 @@ userauth_hostbased(Authctxt *authctxt) xfree(signature); xfree(chost); xfree(pkalg); + xfree(blob); packet_send(); return 1; -- cgit v1.2.3 From 07d86bec5eeaf19fe33dca99c8ebcbe9a77c3938 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 14:19:21 +1100 Subject: - djm@cvs.openbsd.org 2006/03/25 00:05:41 [auth-bsdauth.c auth-skey.c auth.c auth2-chall.c channels.c] [clientloop.c deattack.c gss-genr.c kex.c key.c misc.c moduli.c] [monitor.c monitor_wrap.c packet.c scard.c sftp-server.c ssh-agent.c] [ssh-keyscan.c ssh.c sshconnect.c sshconnect2.c sshd.c uuencode.c] [xmalloc.c xmalloc.h] introduce xcalloc() and xasprintf() failure-checked allocations functions and use them throughout openssh xcalloc is particularly important because malloc(nmemb * size) is a dangerous idiom (subject to integer overflow) and it is time for it to die feedback and ok deraadt@ --- ChangeLog | 16 +++++++++++++++- auth-bsdauth.c | 5 ++--- auth-skey.c | 11 +++-------- auth.c | 12 +++++------- auth2-chall.c | 2 +- channels.c | 7 +++---- clientloop.c | 5 ++--- deattack.c | 2 +- gss-genr.c | 6 ++---- kex.c | 8 +++----- key.c | 10 ++++------ misc.c | 6 ++---- moduli.c | 17 +++-------------- monitor.c | 6 ++---- monitor_wrap.c | 10 +++------- packet.c | 4 ++-- scard.c | 2 +- sftp-server.c | 2 +- ssh-agent.c | 9 +++------ ssh-keyscan.c | 18 ++++++++---------- ssh.c | 5 +++-- sshconnect.c | 17 +++++------------ sshconnect2.c | 10 +++------- sshd.c | 16 +++++++--------- uuencode.c | 7 ++++++- xmalloc.c | 32 ++++++++++++++++++++++++++++++++ xmalloc.h | 6 +++++- 27 files changed, 127 insertions(+), 124 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 04275b22c..20d034a6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -104,6 +104,20 @@ - deraadt@cvs.openbsd.org 2006/03/20 21:11:53 [ttymodes.c] spacing + - djm@cvs.openbsd.org 2006/03/25 00:05:41 + [auth-bsdauth.c auth-skey.c auth.c auth2-chall.c channels.c] + [clientloop.c deattack.c gss-genr.c kex.c key.c misc.c moduli.c] + [monitor.c monitor_wrap.c packet.c scard.c sftp-server.c ssh-agent.c] + [ssh-keyscan.c ssh.c sshconnect.c sshconnect2.c sshd.c uuencode.c] + [xmalloc.c xmalloc.h] + introduce xcalloc() and xasprintf() failure-checked allocations + functions and use them throughout openssh + + xcalloc is particularly important because malloc(nmemb * size) is a + dangerous idiom (subject to integer overflow) and it is time for it + to die + + feedback and ok deraadt@ 20060325 - OpenBSD CVS Sync @@ -4361,4 +4375,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4272 2006/03/26 03:10:34 djm Exp $ +$Id: ChangeLog,v 1.4273 2006/03/26 03:19:21 djm Exp $ diff --git a/auth-bsdauth.c b/auth-bsdauth.c index f48b43174..2ccbc9d43 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.c @@ -68,9 +68,8 @@ bsdauth_query(void *ctx, char **name, char **infotxt, *name = xstrdup(""); *infotxt = xstrdup(""); *numprompts = 1; - *prompts = xmalloc(*numprompts * sizeof(char *)); - *echo_on = xmalloc(*numprompts * sizeof(u_int)); - (*echo_on)[0] = 0; + *prompts = xcalloc(*numprompts, sizeof(char *)); + *echo_on = xcalloc(*numprompts, sizeof(u_int)); (*prompts)[0] = xstrdup(challenge); return 0; diff --git a/auth-skey.c b/auth-skey.c index ce8c1a809..3e6a06db7 100644 --- a/auth-skey.c +++ b/auth-skey.c @@ -53,15 +53,10 @@ skey_query(void *ctx, char **name, char **infotxt, *name = xstrdup(""); *infotxt = xstrdup(""); *numprompts = 1; - *prompts = xmalloc(*numprompts * sizeof(char *)); - *echo_on = xmalloc(*numprompts * sizeof(u_int)); - (*echo_on)[0] = 0; + *prompts = xcalloc(*numprompts, sizeof(char *)); + *echo_on = xcalloc(*numprompts, sizeof(u_int)); - len = strlen(challenge) + strlen(SKEY_PROMPT) + 1; - p = xmalloc(len); - strlcpy(p, challenge, len); - strlcat(p, SKEY_PROMPT, len); - (*prompts)[0] = p; + xasprintf(*prompts, "%s%s", challenge, SKEY_PROMPT); return 0; } diff --git a/auth.c b/auth.c index 85c6f8d1d..aa6d66075 100644 --- a/auth.c +++ b/auth.c @@ -340,7 +340,8 @@ auth_root_allowed(char *method) static char * expand_authorized_keys(const char *filename, struct passwd *pw) { - char *file, *ret; + char *file, ret[MAXPATHLEN]; + int i; file = percent_expand(filename, "h", pw->pw_dir, "u", pw->pw_name, (char *)NULL); @@ -352,14 +353,11 @@ expand_authorized_keys(const char *filename, struct passwd *pw) if (*file == '/') return (file); - ret = xmalloc(MAXPATHLEN); - if (strlcpy(ret, pw->pw_dir, MAXPATHLEN) >= MAXPATHLEN || - strlcat(ret, "/", MAXPATHLEN) >= MAXPATHLEN || - strlcat(ret, file, MAXPATHLEN) >= MAXPATHLEN) + i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file); + if (i < 0 || (size_t)i >= sizeof(ret)) fatal("expand_authorized_keys: path too long"); - xfree(file); - return (ret); + return (xstrdup(ret)); } char * diff --git a/auth2-chall.c b/auth2-chall.c index 8860a94c5..d54ee2856 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -290,7 +290,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt) if (nresp > 100) fatal("input_userauth_info_response: too many replies"); if (nresp > 0) { - response = xmalloc(nresp * sizeof(char *)); + response = xcalloc(nresp, sizeof(char *)); for (i = 0; i < nresp; i++) response[i] = packet_get_string(NULL); } diff --git a/channels.c b/channels.c index 1ff7152a8..0e7d5cf58 100644 --- a/channels.c +++ b/channels.c @@ -249,7 +249,7 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd, /* Do initial allocation if this is the first call. */ if (channels_alloc == 0) { channels_alloc = 10; - channels = xmalloc(channels_alloc * sizeof(Channel *)); + channels = xcalloc(channels_alloc, sizeof(Channel *)); for (i = 0; i < channels_alloc; i++) channels[i] = NULL; } @@ -274,8 +274,7 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd, channels[i] = NULL; } /* Initialize and return new channel. */ - c = channels[found] = xmalloc(sizeof(Channel)); - memset(c, 0, sizeof(Channel)); + c = channels[found] = xcalloc(1, sizeof(Channel)); buffer_init(&c->input); buffer_init(&c->output); buffer_init(&c->extended); @@ -2842,7 +2841,7 @@ x11_create_display_inet(int x11_display_offset, int x11_use_localhost, } /* Allocate a channel for each socket. */ - *chanids = xmalloc(sizeof(**chanids) * (num_socks + 1)); + *chanids = xcalloc(num_socks + 1, sizeof(**chanids)); for (n = 0; n < num_socks; n++) { sock = socks[n]; nc = channel_new("x11 listener", diff --git a/clientloop.c b/clientloop.c index 36a4a64ae..aa4ebb3aa 100644 --- a/clientloop.c +++ b/clientloop.c @@ -820,8 +820,7 @@ client_process_control(fd_set * readset) return; } - cctx = xmalloc(sizeof(*cctx)); - memset(cctx, 0, sizeof(*cctx)); + cctx = xcalloc(1, sizeof(*cctx)); cctx->want_tty = (flags & SSHMUX_FLAG_TTY) != 0; cctx->want_subsys = (flags & SSHMUX_FLAG_SUBSYS) != 0; cctx->want_x_fwd = (flags & SSHMUX_FLAG_X11_FWD) != 0; @@ -836,7 +835,7 @@ client_process_control(fd_set * readset) env_len = MIN(env_len, 4096); debug3("%s: receiving %d env vars", __func__, env_len); if (env_len != 0) { - cctx->env = xmalloc(sizeof(*cctx->env) * (env_len + 1)); + cctx->env = xcalloc(env_len + 1, sizeof(*cctx->env)); for (i = 0; i < env_len; i++) cctx->env[i] = buffer_get_string(&m, &len); cctx->env[i] = NULL; diff --git a/deattack.c b/deattack.c index bf4451b88..746ff5d43 100644 --- a/deattack.c +++ b/deattack.c @@ -93,7 +93,7 @@ detect_attack(u_char *buf, u_int32_t len) if (h == NULL) { debug("Installing crc compensation attack detector."); - h = (u_int16_t *) xmalloc(l * HASH_ENTRYSIZE); + h = (u_int16_t *) xcalloc(l, HASH_ENTRYSIZE); n = l; } else { if (l > n) { diff --git a/gss-genr.c b/gss-genr.c index 8d75ee5c7..9cedfcdc3 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-genr.c,v 1.7 2006/03/20 04:07:49 djm Exp $ */ +/* $OpenBSD: gss-genr.c,v 1.8 2006/03/25 00:05:41 djm Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -135,9 +135,7 @@ ssh_gssapi_last_error(Gssctxt *ctxt, OM_uint32 *major_status, void ssh_gssapi_build_ctx(Gssctxt **ctx) { - *ctx = xmalloc(sizeof (Gssctxt)); - (*ctx)->major = 0; - (*ctx)->minor = 0; + *ctx = xcalloc(1, sizeof (Gssctxt)); (*ctx)->context = GSS_C_NO_CONTEXT; (*ctx)->name = GSS_C_NO_NAME; (*ctx)->oid = GSS_C_NO_OID; diff --git a/kex.c b/kex.c index 91081b18e..030df6be0 100644 --- a/kex.c +++ b/kex.c @@ -82,7 +82,7 @@ kex_buf2prop(Buffer *raw, int *first_kex_follows) int i; char **proposal; - proposal = xmalloc(PROPOSAL_MAX * sizeof(char *)); + proposal = xcalloc(PROPOSAL_MAX, sizeof(char *)); buffer_init(&b); buffer_append(&b, buffer_ptr(raw), buffer_len(raw)); @@ -217,8 +217,7 @@ kex_setup(char *proposal[PROPOSAL_MAX]) { Kex *kex; - kex = xmalloc(sizeof(*kex)); - memset(kex, 0, sizeof(*kex)); + kex = xcalloc(1, sizeof(*kex)); buffer_init(&kex->peer); buffer_init(&kex->my); kex_prop2buf(&kex->my, proposal); @@ -379,8 +378,7 @@ kex_choose_conf(Kex *kex) /* Algorithm Negotiation */ for (mode = 0; mode < MODE_MAX; mode++) { - newkeys = xmalloc(sizeof(*newkeys)); - memset(newkeys, 0, sizeof(*newkeys)); + newkeys = xcalloc(1, sizeof(*newkeys)); kex->newkeys[mode] = newkeys; ctos = (!kex->server && mode == MODE_OUT) || (kex->server && mode == MODE_IN); nenc = ctos ? PROPOSAL_ENC_ALGS_CTOS : PROPOSAL_ENC_ALGS_STOC; diff --git a/key.c b/key.c index d6dd3abea..0d29593b0 100644 --- a/key.c +++ b/key.c @@ -49,9 +49,8 @@ key_new(int type) Key *k; RSA *rsa; DSA *dsa; - k = xmalloc(sizeof(*k)); + k = xcalloc(1, sizeof(*k)); k->type = type; - k->flags = 0; k->dsa = NULL; k->rsa = NULL; switch (k->type) { @@ -231,8 +230,7 @@ key_fingerprint_hex(u_char *dgst_raw, u_int dgst_raw_len) char *retval; u_int i; - retval = xmalloc(dgst_raw_len * 3 + 1); - retval[0] = '\0'; + retval = xcalloc(1, dgst_raw_len * 3 + 1); for (i = 0; i < dgst_raw_len; i++) { char hex[4]; snprintf(hex, sizeof(hex), "%02x:", dgst_raw[i]); @@ -254,7 +252,7 @@ key_fingerprint_bubblebabble(u_char *dgst_raw, u_int dgst_raw_len) char *retval; rounds = (dgst_raw_len / 2) + 1; - retval = xmalloc(sizeof(char) * (rounds*6)); + retval = xcalloc((rounds * 6), sizeof(char)); retval[j++] = 'x'; for (i = 0; i < rounds; i++) { u_int idx0, idx1, idx2, idx3, idx4; @@ -824,7 +822,7 @@ key_demote(const Key *k) { Key *pk; - pk = xmalloc(sizeof(*pk)); + pk = xcalloc(1, sizeof(*pk)); pk->type = k->type; pk->flags = k->flags; pk->dsa = NULL; diff --git a/misc.c b/misc.c index 1949dd4b3..bf7b1ed66 100644 --- a/misc.c +++ b/misc.c @@ -172,9 +172,8 @@ strdelim(char **s) struct passwd * pwcopy(struct passwd *pw) { - struct passwd *copy = xmalloc(sizeof(*copy)); + struct passwd *copy = xcalloc(1, sizeof(*copy)); - memset(copy, 0, sizeof(*copy)); copy->pw_name = xstrdup(pw->pw_name); copy->pw_passwd = xstrdup(pw->pw_passwd); copy->pw_gecos = xstrdup(pw->pw_gecos); @@ -697,8 +696,7 @@ tohex(const u_char *d, u_int l) u_int i, hl; hl = l * 2 + 1; - r = xmalloc(hl); - *r = '\0'; + r = xcalloc(1, hl); for (i = 0; i < l; i++) { snprintf(b, sizeof(b), "%02x", d[i]); strlcat(r, b, hl); diff --git a/moduli.c b/moduli.c index d53806ea6..f6f15a2a4 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.12 2005/07/17 07:17:55 djm Exp $ */ +/* $OpenBSD: moduli.c,v 1.13 2006/03/25 00:05:41 djm Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -301,21 +301,10 @@ gen_candidates(FILE *out, u_int32_t memory, u_int32_t power, BIGNUM *start) largewords = (largememory << SHIFT_MEGAWORD); } - TinySieve = calloc(tinywords, sizeof(u_int32_t)); - if (TinySieve == NULL) { - error("Insufficient memory for tiny sieve: need %u bytes", - tinywords << SHIFT_BYTE); - exit(1); - } + TinySieve = xcalloc(tinywords, sizeof(u_int32_t)); tinybits = tinywords << SHIFT_WORD; - SmallSieve = calloc(smallwords, sizeof(u_int32_t)); - if (SmallSieve == NULL) { - error("Insufficient memory for small sieve: need %u bytes", - smallwords << SHIFT_BYTE); - xfree(TinySieve); - exit(1); - } + SmallSieve = xcalloc(smallwords, sizeof(u_int32_t)); smallbits = smallwords << SHIFT_WORD; /* diff --git a/monitor.c b/monitor.c index 97b420fc3..7409be32b 100644 --- a/monitor.c +++ b/monitor.c @@ -1625,8 +1625,7 @@ mm_get_kex(Buffer *m) void *blob; u_int bloblen; - kex = xmalloc(sizeof(*kex)); - memset(kex, 0, sizeof(*kex)); + kex = xcalloc(1, sizeof(*kex)); kex->session_id = buffer_get_string(m, &kex->session_id_len); if ((session_id2 == NULL) || (kex->session_id_len != session_id2_len) || @@ -1796,9 +1795,8 @@ monitor_init(void) struct monitor *mon; int pair[2]; - mon = xmalloc(sizeof(*mon)); + mon = xcalloc(1, sizeof(*mon)); - mon->m_pid = 0; monitor_socketpair(pair); mon->m_recvfd = pair[0]; diff --git a/monitor_wrap.c b/monitor_wrap.c index e5a65491d..cd340360a 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -859,8 +859,8 @@ mm_chall_setup(char **name, char **infotxt, u_int *numprompts, *name = xstrdup(""); *infotxt = xstrdup(""); *numprompts = 1; - *prompts = xmalloc(*numprompts * sizeof(char *)); - *echo_on = xmalloc(*numprompts * sizeof(u_int)); + *prompts = xcalloc(*numprompts, sizeof(char *)); + *echo_on = xcalloc(*numprompts, sizeof(u_int)); (*echo_on)[0] = 0; } @@ -953,11 +953,7 @@ mm_skey_query(void *ctx, char **name, char **infotxt, mm_chall_setup(name, infotxt, numprompts, prompts, echo_on); - len = strlen(challenge) + strlen(SKEY_PROMPT) + 1; - p = xmalloc(len); - strlcpy(p, challenge, len); - strlcat(p, SKEY_PROMPT, len); - (*prompts)[0] = p; + xasprintf(*prompts, "%s%s", challenge, SKEY_PROMPT); xfree(challenge); return (0); diff --git a/packet.c b/packet.c index 0121f8aee..40c6b1d2b 100644 --- a/packet.c +++ b/packet.c @@ -877,7 +877,7 @@ packet_read_seqnr(u_int32_t *seqnr_p) char buf[8192]; DBG(debug("packet_read()")); - setp = (fd_set *)xmalloc(howmany(connection_in+1, NFDBITS) * + setp = (fd_set *)xcalloc(howmany(connection_in+1, NFDBITS), sizeof(fd_mask)); /* Since we are blocking, ensure that all written packets have been sent. */ @@ -1419,7 +1419,7 @@ packet_write_wait(void) { fd_set *setp; - setp = (fd_set *)xmalloc(howmany(connection_out + 1, NFDBITS) * + setp = (fd_set *)xcalloc(howmany(connection_out + 1, NFDBITS), sizeof(fd_mask)); packet_write_poll(); while (packet_have_data_to_write()) { diff --git a/scard.c b/scard.c index 7cffc2d4e..c0c22aa73 100644 --- a/scard.c +++ b/scard.c @@ -382,7 +382,7 @@ sc_get_keys(const char *id, const char *pin) key_free(k); return NULL; } - keys = xmalloc((nkeys+1) * sizeof(Key *)); + keys = xcalloc((nkeys+1), sizeof(Key *)); n = key_new(KEY_RSA1); BN_copy(n->rsa->n, k->rsa->n); diff --git a/sftp-server.c b/sftp-server.c index cf3458120..a6add52aa 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -712,7 +712,7 @@ process_readdir(void) Stat *stats; int nstats = 10, count = 0, i; - stats = xmalloc(nstats * sizeof(Stat)); + stats = xcalloc(nstats, sizeof(Stat)); while ((dp = readdir(dirp)) != NULL) { if (count >= nstats) { nstats *= 2; diff --git a/ssh-agent.c b/ssh-agent.c index 7feb898dd..67bde5560 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -109,8 +109,8 @@ int max_fd = 0; pid_t parent_pid = -1; /* pathname and directory for AUTH_SOCKET */ -char socket_name[1024]; -char socket_dir[1024]; +char socket_name[MAXPATHLEN]; +char socket_dir[MAXPATHLEN]; /* locking */ int locked = 0; @@ -803,10 +803,7 @@ new_socket(sock_type type, int fd) } old_alloc = sockets_alloc; new_alloc = sockets_alloc + 10; - if (sockets) - sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0])); - else - sockets = xmalloc(new_alloc * sizeof(sockets[0])); + sockets = xrealloc(sockets, new_alloc * sizeof(sockets[0])); for (i = old_alloc; i < new_alloc; i++) sockets[i].type = AUTH_UNUSED; sockets_alloc = new_alloc; diff --git a/ssh-keyscan.c b/ssh-keyscan.c index c7296938b..07b679442 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -54,7 +54,7 @@ int maxfd; extern char *__progname; fd_set *read_wait; -size_t read_wait_size; +size_t read_wait_nfdset; int ncon; int nonfatal_fatal = 0; jmp_buf kexjmp; @@ -634,10 +634,10 @@ conloop(void) } else seltime.tv_sec = seltime.tv_usec = 0; - r = xmalloc(read_wait_size); - memcpy(r, read_wait, read_wait_size); - e = xmalloc(read_wait_size); - memcpy(e, read_wait, read_wait_size); + r = xcalloc(read_wait_nfdset, sizeof(fd_mask)); + e = xcalloc(read_wait_nfdset, sizeof(fd_mask)); + memcpy(r, read_wait, read_wait_nfdset * sizeof(fd_mask)); + memcpy(e, read_wait, read_wait_nfdset * sizeof(fd_mask)); while (select(maxfd, r, NULL, e, &seltime) == -1 && (errno == EAGAIN || errno == EINTR)) @@ -804,12 +804,10 @@ main(int argc, char **argv) fatal("%s: not enough file descriptors", __progname); if (maxfd > fdlim_get(0)) fdlim_set(maxfd); - fdcon = xmalloc(maxfd * sizeof(con)); - memset(fdcon, 0, maxfd * sizeof(con)); + fdcon = xcalloc(maxfd, sizeof(con)); - read_wait_size = howmany(maxfd, NFDBITS) * sizeof(fd_mask); - read_wait = xmalloc(read_wait_size); - memset(read_wait, 0, read_wait_size); + read_wait_nfdset = howmany(maxfd, NFDBITS); + read_wait = xcalloc(read_wait_nfdset, sizeof(fd_mask)); if (fopt_count) { Linebuf *lb; diff --git a/ssh.c b/ssh.c index 0c950745b..f34be679c 100644 --- a/ssh.c +++ b/ssh.c @@ -687,7 +687,7 @@ main(int ac, char **av) if (options.rhosts_rsa_authentication || options.hostbased_authentication) { sensitive_data.nkeys = 3; - sensitive_data.keys = xmalloc(sensitive_data.nkeys * + sensitive_data.keys = xcalloc(sensitive_data.nkeys, sizeof(Key)); PRIV_START; @@ -1250,7 +1250,8 @@ env_permitted(char *env) int i; char name[1024], *cp; - strlcpy(name, env, sizeof(name)); + if (strlcpy(name, env, sizeof(name)) >= sizeof(name)) + fatal("env_permitted: name too long"); if ((cp = strchr(name, '=')) == NULL) return (0); diff --git a/sshconnect.c b/sshconnect.c index 33961e4dc..8d4928a82 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -68,7 +68,6 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) int pin[2], pout[2]; pid_t pid; char strport[NI_MAXSERV]; - size_t len; /* Convert the port number into a string. */ snprintf(strport, sizeof strport, "%hu", port); @@ -80,10 +79,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) * Use "exec" to avoid "sh -c" processes on some platforms * (e.g. Solaris) */ - len = strlen(proxy_command) + 6; - tmp = xmalloc(len); - strlcpy(tmp, "exec ", len); - strlcat(tmp, proxy_command, len); + xasprintf(&tmp, "exec %s", proxy_command); command_string = percent_expand(tmp, "h", host, "p", strport, (char *)NULL); xfree(tmp); @@ -211,7 +207,7 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr, fd_set *fdset; struct timeval tv; socklen_t optlen; - int fdsetsz, optval, rc, result = -1; + int optval, rc, result = -1; if (timeout <= 0) return (connect(sockfd, serv_addr, addrlen)); @@ -225,10 +221,8 @@ timeout_connect(int sockfd, const struct sockaddr *serv_addr, if (errno != EINPROGRESS) return (-1); - fdsetsz = howmany(sockfd + 1, NFDBITS) * sizeof(fd_mask); - fdset = (fd_set *)xmalloc(fdsetsz); - - memset(fdset, 0, fdsetsz); + fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS), + sizeof(fd_mask)); FD_SET(sockfd, fdset); tv.tv_sec = timeout; tv.tv_usec = 0; @@ -957,8 +951,7 @@ ssh_put_password(char *password) return; } size = roundup(strlen(password) + 1, 32); - padded = xmalloc(size); - memset(padded, 0, size); + padded = xcalloc(1, size); strlcpy(padded, password, size); packet_put_string(padded, size); memset(padded, 0, size); diff --git a/sshconnect2.c b/sshconnect2.c index f8d21489e..c3501c2a5 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1029,8 +1029,7 @@ pubkey_prepare(Authctxt *authctxt) if (key && key->type == KEY_RSA1) continue; options.identity_keys[i] = NULL; - id = xmalloc(sizeof(*id)); - memset(id, 0, sizeof(*id)); + id = xcalloc(1, sizeof(*id)); id->key = key; id->filename = xstrdup(options.identity_files[i]); TAILQ_INSERT_TAIL(&files, id, next); @@ -1054,8 +1053,7 @@ pubkey_prepare(Authctxt *authctxt) } } if (!found && !options.identities_only) { - id = xmalloc(sizeof(*id)); - memset(id, 0, sizeof(*id)); + id = xcalloc(1, sizeof(*id)); id->key = key; id->filename = comment; id->ac = ac; @@ -1336,9 +1334,7 @@ userauth_hostbased(Authctxt *authctxt) return 0; } len = strlen(p) + 2; - chost = xmalloc(len); - strlcpy(chost, p, len); - strlcat(chost, ".", len); + xasprintf(&chost, "%s.", p); debug2("userauth_hostbased: chost %s", chost); xfree(p); diff --git a/sshd.c b/sshd.c index bb830161e..28e8c1aa3 100644 --- a/sshd.c +++ b/sshd.c @@ -891,7 +891,7 @@ main(int ac, char **av) { extern char *optarg; extern int optind; - int opt, j, i, fdsetsz, on = 1; + int opt, j, i, on = 1; int sock_in = -1, sock_out = -1, newsock = -1; pid_t pid; socklen_t fromlen; @@ -1110,7 +1110,7 @@ main(int ac, char **av) debug("sshd version %.100s", SSH_RELEASE); /* load private host keys */ - sensitive_data.host_keys = xmalloc(options.num_host_key_files * + sensitive_data.host_keys = xcalloc(options.num_host_key_files, sizeof(Key *)); for (i = 0; i < options.num_host_key_files; i++) sensitive_data.host_keys[i] = NULL; @@ -1212,7 +1212,7 @@ main(int ac, char **av) debug("setgroups() failed: %.200s", strerror(errno)); if (rexec_flag) { - rexec_argv = xmalloc(sizeof(char *) * (rexec_argc + 2)); + rexec_argv = xcalloc(rexec_argc + 2, sizeof(char *)); for (i = 0; i < rexec_argc; i++) { debug("rexec_argv[%d]='%s'", i, saved_argv[i]); rexec_argv[i] = saved_argv[i]; @@ -1391,7 +1391,7 @@ main(int ac, char **av) if (listen_socks[i] > maxfd) maxfd = listen_socks[i]; /* pipes connected to unauthenticated childs */ - startup_pipes = xmalloc(options.max_startups * sizeof(int)); + startup_pipes = xcalloc(options.max_startups, sizeof(int)); for (i = 0; i < options.max_startups; i++) startup_pipes[i] = -1; @@ -1404,9 +1404,8 @@ main(int ac, char **av) sighup_restart(); if (fdset != NULL) xfree(fdset); - fdsetsz = howmany(maxfd+1, NFDBITS) * sizeof(fd_mask); - fdset = (fd_set *)xmalloc(fdsetsz); - memset(fdset, 0, fdsetsz); + fdset = (fd_set *)xcalloc(howmany(maxfd + 1, NFDBITS), + sizeof(fd_mask)); for (i = 0; i < num_listen_socks; i++) FD_SET(listen_socks[i], fdset); @@ -1713,8 +1712,7 @@ main(int ac, char **av) packet_set_nonblocking(); /* allocate authentication context */ - authctxt = xmalloc(sizeof(*authctxt)); - memset(authctxt, 0, sizeof(*authctxt)); + authctxt = xcalloc(1, sizeof(*authctxt)); authctxt->loginmsg = &loginmsg; diff --git a/uuencode.c b/uuencode.c index 314eb92f3..feda6a016 100644 --- a/uuencode.c +++ b/uuencode.c @@ -57,9 +57,14 @@ uudecode(const char *src, u_char *target, size_t targsize) void dump_base64(FILE *fp, u_char *data, u_int len) { - char *buf = xmalloc(2*len); + char *buf;; int i, n; + if (len > 65536) { + fprintf(fp, "dump_base64: len > 65536\n"); + return; + } + buf = xmalloc(2*len); n = uuencode(data, len, buf, 2*len); for (i = 0; i < n; i++) { fprintf(fp, "%c", buf[i]); diff --git a/xmalloc.c b/xmalloc.c index 64e439853..6d56781d9 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -30,6 +30,22 @@ xmalloc(size_t size) return ptr; } +void * +xcalloc(size_t nmemb, size_t size) +{ + void *ptr; + + if (nmemb && size && SIZE_T_MAX / nmemb < size) + fatal("xcalloc: nmemb * size > SIZE_T_MAX"); + if (size == 0 || nmemb == 0) + fatal("xcalloc: zero size"); + ptr = calloc(nmemb, size); + if (ptr == NULL) + fatal("xcalloc: out of memory (allocating %lu bytes)", + (u_long)(size * nmemb)); + return ptr; +} + void * xrealloc(void *ptr, size_t new_size) { @@ -65,3 +81,19 @@ xstrdup(const char *str) strlcpy(cp, str, len); return cp; } + +int +xasprintf(char **ret, const char *fmt, ...) +{ + va_list ap; + int i; + + va_start(ap, fmt); + i = vasprintf(ret, fmt, ap); + va_end(ap); + + if (i < 0 || *ret == NULL) + fatal("xasprintf: could not allocate memory"); + + return (i); +} diff --git a/xmalloc.h b/xmalloc.h index 7ac4b13d6..b6d521a66 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.h,v 1.9 2002/06/19 00:27:55 deraadt Exp $ */ +/* $OpenBSD: xmalloc.h,v 1.10 2006/03/25 00:05:41 djm Exp $ */ /* * Author: Tatu Ylonen @@ -20,8 +20,12 @@ #define XMALLOC_H void *xmalloc(size_t); +void *xcalloc(size_t, size_t); void *xrealloc(void *, size_t); void xfree(void *); char *xstrdup(const char *); +int xasprintf(char **, const char *, ...) + __attribute__((__format__ (printf, 2, 3))) + __attribute__((__nonnull__ (2))); #endif /* XMALLOC_H */ -- cgit v1.2.3 From 57c30117c1c97c069bc38af45b4a504a39866e74 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 26 Mar 2006 14:24:48 +1100 Subject: - djm@cvs.openbsd.org 2006/03/25 13:17:03 [atomicio.c auth-bsdauth.c auth-chall.c auth-options.c auth-passwd.c] [auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth-skey.c auth.c auth1.c] [auth2-chall.c auth2-hostbased.c auth2-kbdint.c auth2-none.c] [auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c] [buffer.c canohost.c channels.c cipher-3des1.c cipher-bf1.c] [cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c compress.c] [deattack.c dh.c dispatch.c fatal.c groupaccess.c hostfile.c kex.c] [kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c progressmeter.c] [readconf.c readpass.c rsa.c scard.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c] [sftp.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c] [sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c] [uidswap.c uuencode.c xmalloc.c] Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that Theo nuked - our scripts to sync -portable need them in the files --- ChangeLog | 6 +++++- atomicio.c | 1 + auth-bsdauth.c | 1 + auth-chall.c | 1 + auth-options.c | 1 + auth-passwd.c | 1 + auth-rh-rsa.c | 1 + auth-rhosts.c | 1 + auth-rsa.c | 1 + auth-skey.c | 1 + auth.c | 1 + auth1.c | 1 + auth2-chall.c | 1 + auth2-hostbased.c | 1 + auth2-kbdint.c | 1 + auth2-none.c | 1 + auth2-passwd.c | 1 + auth2-pubkey.c | 1 + auth2.c | 1 + authfd.c | 1 + authfile.c | 1 + bufaux.c | 1 + buffer.c | 1 + canohost.c | 1 + channels.c | 1 + cipher-3des1.c | 1 + cipher-bf1.c | 1 + cipher-ctr.c | 1 + cipher.c | 1 + cleanup.c | 1 + clientloop.c | 1 + compat.c | 1 + compress.c | 1 + deattack.c | 1 + dh.c | 1 + dispatch.c | 1 + fatal.c | 1 + groupaccess.c | 1 + hostfile.c | 1 + kex.c | 1 + kexdh.c | 1 + kexdhc.c | 1 + kexdhs.c | 1 + kexgex.c | 1 + kexgexc.c | 1 + kexgexs.c | 1 + key.c | 1 + log.c | 1 + mac.c | 1 + match.c | 1 + md-sha256.c | 1 + misc.c | 1 + monitor.c | 1 + monitor_fdpass.c | 1 + monitor_mm.c | 1 + monitor_wrap.c | 1 + msg.c | 1 + nchan.c | 1 + packet.c | 1 + progressmeter.c | 1 + readconf.c | 1 + readpass.c | 1 + rsa.c | 1 + scard.c | 1 + scp.c | 1 + servconf.c | 1 + serverloop.c | 1 + session.c | 1 + sftp-client.c | 1 + sftp-common.c | 1 + sftp-glob.c | 1 + sftp-server.c | 1 + sftp.c | 1 + ssh-add.c | 1 + ssh-agent.c | 1 + ssh-dss.c | 1 + ssh-keygen.c | 1 + ssh-keyscan.c | 1 + ssh-keysign.c | 1 + ssh-rsa.c | 1 + ssh.c | 1 + sshconnect.c | 1 + sshconnect1.c | 1 + sshconnect2.c | 1 + sshd.c | 1 + sshlogin.c | 1 + sshpty.c | 1 + sshtty.c | 1 + ttymodes.c | 1 + uidswap.c | 1 + uuencode.c | 1 + xmalloc.c | 1 + 92 files changed, 96 insertions(+), 1 deletion(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 62ffb4690..98b6cc356 100644 --- a/ChangeLog +++ b/ChangeLog @@ -131,6 +131,10 @@ - djm@cvs.openbsd.org 2006/03/25 01:30:23 [sftp.c] "abormally" is a perfectly cromulent word, but "abnormally" is better + - djm@cvs.openbsd.org 2006/03/25 13:17:03 + [atomicio.c auth-bsdauth.c auth-chall.c auth-options.c auth-passwd.c auth-rh-rsa.c auth-rhosts.c auth-rsa.c auth-skey.c auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfile.c bufaux.c buffer.c canohost.c channels.c cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c compress.c deattack.c dh.c dispatch.c fatal.c groupaccess.c hostfile.c kex.c kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c log.c mac.c match.c md-sha256.c misc.c monitor.c monitor_fdpass.c monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c progressmeter.c readconf.c readpass.c rsa.c scard.c scp.c servconf.c serverloop.c session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshpty.c sshtty.c ttymodes.c uidswap.c uuencode.c xmalloc.c] + Put $OpenBSD$ tags back (as comments) to replace the RCSID()s that + Theo nuked - our scripts to sync -portable need them in the files 20060325 - OpenBSD CVS Sync @@ -4388,4 +4392,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4275 2006/03/26 03:23:17 djm Exp $ +$Id: ChangeLog,v 1.4276 2006/03/26 03:24:48 djm Exp $ diff --git a/atomicio.c b/atomicio.c index afe306b1b..87fb9fe75 100644 --- a/atomicio.c +++ b/atomicio.c @@ -1,3 +1,4 @@ +/* $OpenBSD: atomicio.c,v 1.16 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. * Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. diff --git a/auth-bsdauth.c b/auth-bsdauth.c index 2ccbc9d43..c309e4a11 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-bsdauth.c,v 1.9 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/auth-chall.c b/auth-chall.c index 7707023a4..023e7ee01 100644 --- a/auth-chall.c +++ b/auth-chall.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-chall.c,v 1.11 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/auth-options.c b/auth-options.c index 77488a49d..56d598412 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-options.c,v 1.35 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-passwd.c b/auth-passwd.c index df202dde3..2ebcc5fc4 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-passwd.c,v 1.36 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c index f9c386dba..c8bdfa26c 100644 --- a/auth-rh-rsa.c +++ b/auth-rh-rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-rh-rsa.c,v 1.40 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-rhosts.c b/auth-rhosts.c index 098893563..ce72adb7d 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-rhosts.c,v 1.37 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-rsa.c b/auth-rsa.c index effff5d2a..a906eb2d6 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-rsa.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/auth-skey.c b/auth-skey.c index 3e6a06db7..9c981ec83 100644 --- a/auth-skey.c +++ b/auth-skey.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth-skey.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/auth.c b/auth.c index aa6d66075..bf2948a84 100644 --- a/auth.c +++ b/auth.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth1.c b/auth1.c index 2f8e13e05..6a6cff862 100644 --- a/auth1.c +++ b/auth1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth1.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved diff --git a/auth2-chall.c b/auth2-chall.c index d54ee2856..09412aa4a 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-chall.c,v 1.27 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 251828496..8d5f38353 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-hostbased.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-kbdint.c b/auth2-kbdint.c index 1b902e4cb..796714eec 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-kbdint.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-none.c b/auth2-none.c index 19cc2b1b7..3fdf09a3a 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-none.c,v 1.10 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-passwd.c b/auth2-passwd.c index 41507af1d..a1e77c41c 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-passwd.c,v 1.7 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2-pubkey.c b/auth2-pubkey.c index a59c37993..8786014f2 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2-pubkey.c,v 1.12 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/auth2.c b/auth2.c index 9d3263e55..8f7ec0d6d 100644 --- a/auth2.c +++ b/auth2.c @@ -1,3 +1,4 @@ +/* $OpenBSD: auth2.c,v 1.110 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/authfd.c b/authfd.c index fc322b983..935143765 100644 --- a/authfd.c +++ b/authfd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: authfd.c,v 1.72 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/authfile.c b/authfile.c index 55c66d1e3..b95b9470b 100644 --- a/authfile.c +++ b/authfile.c @@ -1,3 +1,4 @@ +/* $OpenBSD: authfile.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/bufaux.c b/bufaux.c index 19f6708f0..b7c9f2ecd 100644 --- a/bufaux.c +++ b/bufaux.c @@ -1,3 +1,4 @@ +/* $OpenBSD: bufaux.c,v 1.39 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/buffer.c b/buffer.c index 1666f742e..de404e602 100644 --- a/buffer.c +++ b/buffer.c @@ -1,3 +1,4 @@ +/* $OpenBSD: buffer.c,v 1.26 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/canohost.c b/canohost.c index b1c35e99e..35ae9bede 100644 --- a/canohost.c +++ b/canohost.c @@ -1,3 +1,4 @@ +/* $OpenBSD: canohost.c,v 1.53 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/channels.c b/channels.c index 5706833a9..c838b8534 100644 --- a/channels.c +++ b/channels.c @@ -1,3 +1,4 @@ +/* $OpenBSD: channels.c,v 1.244 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/cipher-3des1.c b/cipher-3des1.c index 53b5a2958..c2c0bf811 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher-3des1.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * diff --git a/cipher-bf1.c b/cipher-bf1.c index e7246650b..b6aa0152a 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher-bf1.c,v 1.3 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * diff --git a/cipher-ctr.c b/cipher-ctr.c index 9615f5aa6..be82fd3a9 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher-ctr.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl * diff --git a/cipher.c b/cipher.c index 15397db03..c42963897 100644 --- a/cipher.c +++ b/cipher.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cipher.c,v 1.79 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/cleanup.c b/cleanup.c index 7b40ca781..dcf456830 100644 --- a/cleanup.c +++ b/cleanup.c @@ -1,3 +1,4 @@ +/* $OpenBSD: cleanup.c,v 1.3 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl * diff --git a/clientloop.c b/clientloop.c index aa4ebb3aa..c136dae37 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,3 +1,4 @@ +/* $OpenBSD: clientloop.c,v 1.160 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/compat.c b/compat.c index 24d9a7f38..1573ed64e 100644 --- a/compat.c +++ b/compat.c @@ -1,3 +1,4 @@ +/* $OpenBSD: compat.c,v 1.73 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * diff --git a/compress.c b/compress.c index 6f8d6b775..8aba84efa 100644 --- a/compress.c +++ b/compress.c @@ -1,3 +1,4 @@ +/* $OpenBSD: compress.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/deattack.c b/deattack.c index ff9ca4dd5..2adf185e8 100644 --- a/deattack.c +++ b/deattack.c @@ -1,3 +1,4 @@ +/* $OpenBSD: deattack.c,v 1.26 2006/03/25 13:17:01 djm Exp $ */ /* * Cryptographic attack detector for ssh - source code * diff --git a/dh.c b/dh.c index e8ce3d1a9..4db3b0b2a 100644 --- a/dh.c +++ b/dh.c @@ -1,3 +1,4 @@ +/* $OpenBSD: dh.c,v 1.34 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * diff --git a/dispatch.c b/dispatch.c index 3f96c726b..eac07b1b3 100644 --- a/dispatch.c +++ b/dispatch.c @@ -1,3 +1,4 @@ +/* $OpenBSD: dispatch.c,v 1.18 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/fatal.c b/fatal.c index 78b51cd8b..7f58970fb 100644 --- a/fatal.c +++ b/fatal.c @@ -1,3 +1,4 @@ +/* $OpenBSD: fatal.c,v 1.5 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * diff --git a/groupaccess.c b/groupaccess.c index 2328bf453..83c573def 100644 --- a/groupaccess.c +++ b/groupaccess.c @@ -1,3 +1,4 @@ +/* $OpenBSD: groupaccess.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. * diff --git a/hostfile.c b/hostfile.c index c80578440..39ff197a7 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,3 +1,4 @@ +/* $OpenBSD: hostfile.c,v 1.40 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/kex.c b/kex.c index 030df6be0..6a5fd264b 100644 --- a/kex.c +++ b/kex.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kex.c,v 1.71 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * diff --git a/kexdh.c b/kexdh.c index f34214062..2d13127b8 100644 --- a/kexdh.c +++ b/kexdh.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexdh.c,v 1.22 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/kexdhc.c b/kexdhc.c index 23abeb50d..1f1c5ea4f 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexdhc.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/kexdhs.c b/kexdhs.c index be815e46b..d139f5c7b 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexdhs.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/kexgex.c b/kexgex.c index b306821cc..5ab6745a3 100644 --- a/kexgex.c +++ b/kexgex.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexgex.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. diff --git a/kexgexc.c b/kexgexc.c index 50c5a32e5..f871f972e 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexgexc.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. diff --git a/kexgexs.c b/kexgexs.c index e3d0eacc5..0141c6d0f 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,3 +1,4 @@ +/* $OpenBSD: kexgexs.c,v 1.4 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. diff --git a/key.c b/key.c index 0d29593b0..8e6ccc2bf 100644 --- a/key.c +++ b/key.c @@ -1,3 +1,4 @@ +/* $OpenBSD: key.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/log.c b/log.c index 58ba8591c..3a404918b 100644 --- a/log.c +++ b/log.c @@ -1,3 +1,4 @@ +/* $OpenBSD: log.c,v 1.31 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/mac.c b/mac.c index f03100ac9..c155dbd3f 100644 --- a/mac.c +++ b/mac.c @@ -1,3 +1,4 @@ +/* $OpenBSD: mac.c,v 1.9 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/match.c b/match.c index e08afdeb0..c0e5bf424 100644 --- a/match.c +++ b/match.c @@ -1,3 +1,4 @@ +/* $OpenBSD: match.c,v 1.24 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/md-sha256.c b/md-sha256.c index 8ea0ac433..33deb780a 100644 --- a/md-sha256.c +++ b/md-sha256.c @@ -1,3 +1,4 @@ +/* $OpenBSD: md-sha256.c,v 1.3 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2005 Damien Miller * diff --git a/misc.c b/misc.c index 96d90dec9..daeb86c82 100644 --- a/misc.c +++ b/misc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: misc.c,v 1.51 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005 Damien Miller. All rights reserved. diff --git a/monitor.c b/monitor.c index 7409be32b..d672aeb72 100644 --- a/monitor.c +++ b/monitor.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor.c,v 1.76 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl diff --git a/monitor_fdpass.c b/monitor_fdpass.c index dec90d18b..4ce9eae19 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor_fdpass.c,v 1.8 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. diff --git a/monitor_mm.c b/monitor_mm.c index e8de71fea..222751628 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor_mm.c,v 1.11 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. diff --git a/monitor_wrap.c b/monitor_wrap.c index cd340360a..f2fbd99ee 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,3 +1,4 @@ +/* $OpenBSD: monitor_wrap.c,v 1.44 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl diff --git a/msg.c b/msg.c index 662db4cdb..2c0a67269 100644 --- a/msg.c +++ b/msg.c @@ -1,3 +1,4 @@ +/* $OpenBSD: msg.c,v 1.10 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * diff --git a/nchan.c b/nchan.c index ca9a56b59..1f4b39671 100644 --- a/nchan.c +++ b/nchan.c @@ -1,3 +1,4 @@ +/* $OpenBSD: nchan.c,v 1.53 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * diff --git a/packet.c b/packet.c index 40c6b1d2b..71da5454e 100644 --- a/packet.c +++ b/packet.c @@ -1,3 +1,4 @@ +/* $OpenBSD: packet.c,v 1.128 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/progressmeter.c b/progressmeter.c index ff99acf71..d145a724a 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,3 +1,4 @@ +/* $OpenBSD: progressmeter.c,v 1.29 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * diff --git a/readconf.c b/readconf.c index e2e10d9d6..87e41e0c4 100644 --- a/readconf.c +++ b/readconf.c @@ -1,3 +1,4 @@ +/* $OpenBSD: readconf.c,v 1.151 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/readpass.c b/readpass.c index 4236c43c7..c3d36a028 100644 --- a/readpass.c +++ b/readpass.c @@ -1,3 +1,4 @@ +/* $OpenBSD: readpass.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/rsa.c b/rsa.c index 507b73c9c..6ca05b3d2 100644 --- a/rsa.c +++ b/rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: rsa.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/scard.c b/scard.c index c0c22aa73..0a6ec816d 100644 --- a/scard.c +++ b/scard.c @@ -1,3 +1,4 @@ +/* $OpenBSD: scard.c,v 1.32 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/scp.c b/scp.c index 3068b8d32..2f89aa49e 100644 --- a/scp.c +++ b/scp.c @@ -1,3 +1,4 @@ +/* $OpenBSD: scp.c,v 1.139 2006/03/25 13:17:02 djm Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). diff --git a/servconf.c b/servconf.c index 1443e832e..43372e20f 100644 --- a/servconf.c +++ b/servconf.c @@ -1,3 +1,4 @@ +/* $OpenBSD: servconf.c,v 1.150 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved diff --git a/serverloop.c b/serverloop.c index 36c40ec59..97ad65b26 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,3 +1,4 @@ +/* $OpenBSD: serverloop.c,v 1.134 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/session.c b/session.c index f0a0bdd2f..8b837d07d 100644 --- a/session.c +++ b/session.c @@ -1,3 +1,4 @@ +/* $OpenBSD: session.c,v 1.202 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved diff --git a/sftp-client.c b/sftp-client.c index 8b4d67b58..5788aa6ad 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-client.c,v 1.63 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * diff --git a/sftp-common.c b/sftp-common.c index 4222f58d6..2e680e9f3 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-common.c,v 1.13 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. diff --git a/sftp-glob.c b/sftp-glob.c index cee44fc4c..3d092d133 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-glob.c,v 1.19 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * diff --git a/sftp-server.c b/sftp-server.c index 52b7323c2..e58aa59c8 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp-server.c,v 1.56 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * diff --git a/sftp.c b/sftp.c index 868794a76..f5212ed4f 100644 --- a/sftp.c +++ b/sftp.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sftp.c,v 1.79 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * diff --git a/ssh-add.c b/ssh-add.c index 2944cceeb..ff85af031 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-add.c,v 1.79 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/ssh-agent.c b/ssh-agent.c index 042b18f54..c169d226f 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-agent.c,v 1.134 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/ssh-dss.c b/ssh-dss.c index 8250266fa..d16f75e63 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-dss.c,v 1.21 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/ssh-keygen.c b/ssh-keygen.c index e8a1d4b4b..84f13c42f 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-keygen.c,v 1.141 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 07b679442..dc47a9576 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-keyscan.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * diff --git a/ssh-keysign.c b/ssh-keysign.c index a96babfa5..1f78c7a05 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-keysign.c,v 1.22 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * diff --git a/ssh-rsa.c b/ssh-rsa.c index 55fb7ba59..4580c0644 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-rsa.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000, 2003 Markus Friedl * diff --git a/ssh.c b/ssh.c index f34be679c..00995e5dc 100644 --- a/ssh.c +++ b/ssh.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh.c,v 1.273 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshconnect.c b/sshconnect.c index 8d4928a82..5cf107794 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshconnect.c,v 1.180 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshconnect1.c b/sshconnect1.c index a39441120..9b86c7ce1 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshconnect1.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshconnect2.c b/sshconnect2.c index c3501c2a5..a826ad0f4 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshconnect2.c,v 1.151 2006/03/25 13:17:02 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/sshd.c b/sshd.c index 28e8c1aa3..a206db245 100644 --- a/sshd.c +++ b/sshd.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshd.c,v 1.330 2006/03/25 13:17:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshlogin.c b/sshlogin.c index 95b850acb..72c8252d1 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshlogin.c,v 1.16 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshpty.c b/sshpty.c index 9ac4903ef..a15df0414 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshpty.c,v 1.19 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/sshtty.c b/sshtty.c index 528177b4b..7cb848d2c 100644 --- a/sshtty.c +++ b/sshtty.c @@ -1,3 +1,4 @@ +/* $OpenBSD: sshtty.c,v 1.10 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/ttymodes.c b/ttymodes.c index 40d536e2c..92fecb415 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -1,3 +1,4 @@ +/* $OpenBSD: ttymodes.c,v 1.23 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/uidswap.c b/uidswap.c index 305895a44..6208be5bd 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,3 +1,4 @@ +/* $OpenBSD: uidswap.c,v 1.26 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland diff --git a/uuencode.c b/uuencode.c index feda6a016..7dde55967 100644 --- a/uuencode.c +++ b/uuencode.c @@ -1,3 +1,4 @@ +/* $OpenBSD: uuencode.c,v 1.20 2006/03/25 13:17:03 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * diff --git a/xmalloc.c b/xmalloc.c index d5d7b6bc5..9bfa9e6f8 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: xmalloc.c,v 1.20 2006/03/25 13:17:03 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland -- cgit v1.2.3 From 232b76f9f8b883db9ff7e7a3a9942ad7a28119e0 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 6 May 2006 17:41:51 +1000 Subject: - dtucker@cvs.openbsd.org 2006/04/25 08:02:27 [authfile.c authfile.h sshconnect2.c ssh.c sshconnect1.c] Prevent ssh from trying to open private keys with bad permissions more than once or prompting for their passphrases (which it subsequently ignores anyway), similar to a previous change in ssh-add. bz #1186, ok djm@ --- ChangeLog | 10 +++++++++- authfile.c | 8 ++++++-- authfile.h | 4 ++-- ssh.c | 8 ++++---- sshconnect1.c | 13 +++++++------ sshconnect2.c | 12 +++++++----- 6 files changed, 35 insertions(+), 20 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index fe0536a78..d99a94176 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +20050506 + - (dtucker) OpenBSD CVS Syn + - dtucker@cvs.openbsd.org 2006/04/25 08:02:27 + [authfile.c authfile.h sshconnect2.c ssh.c sshconnect1.c] + Prevent ssh from trying to open private keys with bad permissions more than + once or prompting for their passphrases (which it subsequently ignores + anyway), similar to a previous change in ssh-add. bz #1186, ok djm@ + 20060504 - (dtucker) [auth-pam.c groupaccess.c monitor.c monitor_wrap.c scard-opensc.c session.c ssh-rand-helper.c sshd.c openbsd-compat/bsd-cygwin_util.c @@ -4594,4 +4602,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4320 2006/05/04 06:24:34 dtucker Exp $ +$Id: ChangeLog,v 1.4321 2006/05/06 07:41:51 dtucker Exp $ diff --git a/authfile.c b/authfile.c index b95b9470b..b1a28528f 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: authfile.c,v 1.67 2006/04/25 08:02:27 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -538,7 +538,7 @@ key_perm_ok(int fd, const char *filename) Key * key_load_private_type(int type, const char *filename, const char *passphrase, - char **commentp) + char **commentp, int *perm_ok) { int fd; @@ -546,10 +546,14 @@ key_load_private_type(int type, const char *filename, const char *passphrase, if (fd < 0) return NULL; if (!key_perm_ok(fd, filename)) { + if (perm_ok != NULL) + *perm_ok = 0; error("bad permissions: ignore key: %s", filename); close(fd); return NULL; } + if (perm_ok != NULL) + *perm_ok = 1; switch (type) { case KEY_RSA1: return key_load_private_rsa1(fd, filename, passphrase, diff --git a/authfile.h b/authfile.h index 967f582d4..a6c74934d 100644 --- a/authfile.h +++ b/authfile.h @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.h,v 1.12 2006/03/25 22:22:42 djm Exp $ */ +/* $OpenBSD: authfile.h,v 1.13 2006/04/25 08:02:27 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -19,7 +19,7 @@ int key_save_private(Key *, const char *, const char *, const char *); Key *key_load_public(const char *, char **); Key *key_load_public_type(int, const char *, char **); Key *key_load_private(const char *, const char *, char **); -Key *key_load_private_type(int, const char *, const char *, char **); +Key *key_load_private_type(int, const char *, const char *, char **, int *); Key *key_load_private_pem(int, int, const char *, char **); int key_perm_ok(int, const char *); diff --git a/ssh.c b/ssh.c index 5eddd41d5..01303dc97 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.275 2006/03/30 10:41:25 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.276 2006/04/25 08:02:27 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -693,11 +693,11 @@ main(int ac, char **av) PRIV_START; sensitive_data.keys[0] = key_load_private_type(KEY_RSA1, - _PATH_HOST_KEY_FILE, "", NULL); + _PATH_HOST_KEY_FILE, "", NULL, NULL); sensitive_data.keys[1] = key_load_private_type(KEY_DSA, - _PATH_HOST_DSA_KEY_FILE, "", NULL); + _PATH_HOST_DSA_KEY_FILE, "", NULL, NULL); sensitive_data.keys[2] = key_load_private_type(KEY_RSA, - _PATH_HOST_RSA_KEY_FILE, "", NULL); + _PATH_HOST_RSA_KEY_FILE, "", NULL, NULL); PRIV_END; if (options.hostbased_authentication == 1 && diff --git a/sshconnect1.c b/sshconnect1.c index 9b86c7ce1..5467f04bf 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.65 2006/04/25 08:02:27 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -197,7 +197,7 @@ try_rsa_authentication(int idx) BIGNUM *challenge; Key *public, *private; char buf[300], *passphrase, *comment, *authfile; - int i, type, quit; + int i, perm_ok = 1, type, quit; public = options.identity_keys[idx]; authfile = options.identity_files[idx]; @@ -243,15 +243,16 @@ try_rsa_authentication(int idx) if (public->flags & KEY_FLAG_EXT) private = public; else - private = key_load_private_type(KEY_RSA1, authfile, "", NULL); - if (private == NULL && !options.batch_mode) { + private = key_load_private_type(KEY_RSA1, authfile, "", NULL, + &perm_ok); + if (private == NULL && !options.batch_mode && perm_ok) { snprintf(buf, sizeof(buf), "Enter passphrase for RSA key '%.100s': ", comment); for (i = 0; i < options.number_of_password_prompts; i++) { passphrase = read_passphrase(buf, 0); if (strcmp(passphrase, "") != 0) { private = key_load_private_type(KEY_RSA1, - authfile, passphrase, NULL); + authfile, passphrase, NULL, NULL); quit = 0; } else { debug2("no passphrase given, try next key"); @@ -268,7 +269,7 @@ try_rsa_authentication(int idx) xfree(comment); if (private == NULL) { - if (!options.batch_mode) + if (!options.batch_mode && perm_ok) error("Bad passphrase."); /* Send a dummy response packet to avoid protocol error. */ diff --git a/sshconnect2.c b/sshconnect2.c index a826ad0f4..6fdcf8a1c 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.151 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.152 2006/04/25 08:02:27 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -970,14 +970,16 @@ load_identity_file(char *filename) { Key *private; char prompt[300], *passphrase; - int quit, i; + int perm_ok, quit, i; struct stat st; if (stat(filename, &st) < 0) { debug3("no such identity: %s", filename); return NULL; } - private = key_load_private_type(KEY_UNSPEC, filename, "", NULL); + private = key_load_private_type(KEY_UNSPEC, filename, "", NULL, &perm_ok); + if (!perm_ok) + return NULL; if (private == NULL) { if (options.batch_mode) return NULL; @@ -986,8 +988,8 @@ load_identity_file(char *filename) for (i = 0; i < options.number_of_password_prompts; i++) { passphrase = read_passphrase(prompt, 0); if (strcmp(passphrase, "") != 0) { - private = key_load_private_type(KEY_UNSPEC, filename, - passphrase, NULL); + private = key_load_private_type(KEY_UNSPEC, + filename, passphrase, NULL, NULL); quit = 0; } else { debug2("no passphrase given, try next key"); -- cgit v1.2.3 From e250a94e697134f463eb51fbe9c8a22e1973198d Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 13 Jun 2006 12:59:53 +1000 Subject: - djm@cvs.openbsd.org 2006/05/08 10:49:48 [sshconnect2.c] uint32_t -> u_int32_t (which we use everywhere else) (Id sync only - portable already had this) --- ChangeLog | 9 ++++++++- sshconnect2.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 767208bf3..6b5c74b5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +20060613 + - OpenBSD CVS Sync + - djm@cvs.openbsd.org 2006/05/08 10:49:48 + [sshconnect2.c] + uint32_t -> u_int32_t (which we use everywhere else) + (Id sync only - portable already had this) + 20060521 - (dtucker) [auth.c monitor.c] Now that we don't log from both the monitor and slave, we can remove the special-case handling in the audit hook in @@ -4630,4 +4637,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4330 2006/05/21 08:26:40 dtucker Exp $ +$Id: ChangeLog,v 1.4331 2006/06/13 02:59:53 djm Exp $ diff --git a/sshconnect2.c b/sshconnect2.c index 6fdcf8a1c..53cf25762 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.152 2006/04/25 08:02:27 dtucker Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.153 2006/05/08 10:49:48 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * -- cgit v1.2.3 From 6b4069ad563ce578cbfa6f90e76b462d26483e67 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 13 Jun 2006 13:05:15 +1000 Subject: - markus@cvs.openbsd.org 2006/06/06 10:20:20 [readpass.c sshconnect.c sshconnect.h sshconnect2.c uidswap.c] replace remaining setuid() calls with permanently_set_uid() and check seteuid() return values; report Marcus Meissner; ok dtucker djm --- ChangeLog | 6 +++++- readpass.c | 6 +++--- sshconnect.c | 5 ++--- sshconnect.h | 22 +++++++++++++--------- sshconnect2.c | 6 +++--- uidswap.c | 4 +++- 6 files changed, 29 insertions(+), 20 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 7dfcb45e5..7c30a33ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,10 @@ [sshd.c] call get_remote_ipaddr() early; fixes logging after client disconnects; report mpf@; ok dtucker@ + - markus@cvs.openbsd.org 2006/06/06 10:20:20 + [readpass.c sshconnect.c sshconnect.h sshconnect2.c uidswap.c] + replace remaining setuid() calls with permanently_set_uid() and + check seteuid() return values; report Marcus Meissner; ok dtucker djm 20060521 - (dtucker) [auth.c monitor.c] Now that we don't log from both the monitor @@ -4671,4 +4675,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4340 2006/06/13 03:03:53 djm Exp $ +$Id: ChangeLog,v 1.4341 2006/06/13 03:05:15 djm Exp $ diff --git a/readpass.c b/readpass.c index c3d36a028..60e4a902f 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: readpass.c,v 1.38 2006/06/06 10:20:20 markus Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -37,6 +37,7 @@ #include "pathnames.h" #include "log.h" #include "ssh.h" +#include "uidswap.h" static char * ssh_askpass(char *askpass, const char *msg) @@ -60,8 +61,7 @@ ssh_askpass(char *askpass, const char *msg) return NULL; } if (pid == 0) { - seteuid(getuid()); - setuid(getuid()); + permanently_set_uid(getpwuid(getuid())); close(p[0]); if (dup2(p[1], STDOUT_FILENO) < 0) fatal("ssh_askpass: dup2: %s", strerror(errno)); diff --git a/sshconnect.c b/sshconnect.c index e855f1926..41ad82f9f 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.182 2006/05/17 12:43:34 markus Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.183 2006/06/06 10:20:20 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -97,8 +97,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) char *argv[10]; /* Child. Permanently give up superuser privileges. */ - seteuid(original_real_uid); - setuid(original_real_uid); + permanently_set_uid(getpwuid(original_real_uid)); /* Redirect stdin and stdout. */ close(pin[1]); diff --git a/sshconnect.h b/sshconnect.h index 3786ba56e..692d27567 100644 --- a/sshconnect.h +++ b/sshconnect.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.h,v 1.19 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: sshconnect.h,v 1.20 2006/06/06 10:20:20 markus Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -54,16 +54,20 @@ int ssh_local_cmd(const char *); /* * Macros to raise/lower permissions. */ -#define PRIV_START do { \ - int save_errno = errno; \ - (void)seteuid(original_effective_uid); \ - errno = save_errno; \ +#define PRIV_START do { \ + int save_errno = errno; \ + if (seteuid(original_effective_uid) != 0) \ + fatal("PRIV_START: seteuid: %s", \ + strerror(errno)); \ + errno = save_errno; \ } while (0) -#define PRIV_END do { \ - int save_errno = errno; \ - (void)seteuid(original_real_uid); \ - errno = save_errno; \ +#define PRIV_END do { \ + int save_errno = errno; \ + if (seteuid(original_real_uid) != 0) \ + fatal("PRIV_END: seteuid: %s", \ + strerror(errno)); \ + errno = save_errno; \ } while (0) #endif diff --git a/sshconnect2.c b/sshconnect2.c index 53cf25762..c97738c7b 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.153 2006/05/08 10:49:48 djm Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.154 2006/06/06 10:20:20 markus Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -53,6 +53,7 @@ #include "canohost.h" #include "msg.h" #include "pathnames.h" +#include "uidswap.h" #ifdef GSSAPI #include "ssh-gss.h" @@ -1252,8 +1253,7 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp, return -1; } if (pid == 0) { - seteuid(getuid()); - setuid(getuid()); + permanently_set_uid(getpwuid(getuid())); close(from[0]); if (dup2(from[1], STDOUT_FILENO) < 0) fatal("ssh_keysign: dup2: %s", strerror(errno)); diff --git a/uidswap.c b/uidswap.c index 6dc1680db..ba2d20942 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.27 2006/04/22 04:06:51 djm Exp $ */ +/* $OpenBSD: uidswap.c,v 1.28 2006/06/06 10:20:20 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -169,6 +169,8 @@ permanently_set_uid(struct passwd *pw) uid_t old_uid = getuid(); gid_t old_gid = getgid(); + if (pw == NULL) + fatal("permanently_set_uid: no user given"); if (temporarily_use_uid_effective) fatal("permanently_set_uid: temporarily_use_uid effective"); debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid, -- cgit v1.2.3 From 2e5fe88ebe5a09477a655a36b047063282bfd86c Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 13 Jun 2006 13:10:00 +1000 Subject: - markus@cvs.openbsd.org 2006/06/08 14:45:49 [readpass.c sshconnect.c sshconnect2.c uidswap.c uidswap.h] do not set the gid, noted by solar; ok djm --- ChangeLog | 5 ++++- readpass.c | 4 ++-- sshconnect.c | 4 ++-- sshconnect2.c | 4 ++-- uidswap.c | 37 ++++++++++++++++++++++++++++++++++++- uidswap.h | 3 ++- 6 files changed, 48 insertions(+), 9 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 7c30a33ac..0ce7f8c6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,6 +42,9 @@ [readpass.c sshconnect.c sshconnect.h sshconnect2.c uidswap.c] replace remaining setuid() calls with permanently_set_uid() and check seteuid() return values; report Marcus Meissner; ok dtucker djm + - markus@cvs.openbsd.org 2006/06/08 14:45:49 + [readpass.c sshconnect.c sshconnect2.c uidswap.c uidswap.h] + do not set the gid, noted by solar; ok djm 20060521 - (dtucker) [auth.c monitor.c] Now that we don't log from both the monitor @@ -4675,4 +4678,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4341 2006/06/13 03:05:15 djm Exp $ +$Id: ChangeLog,v 1.4342 2006/06/13 03:10:00 djm Exp $ diff --git a/readpass.c b/readpass.c index 60e4a902f..34d70b07a 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.38 2006/06/06 10:20:20 markus Exp $ */ +/* $OpenBSD: readpass.c,v 1.39 2006/06/08 14:45:49 markus Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -61,7 +61,7 @@ ssh_askpass(char *askpass, const char *msg) return NULL; } if (pid == 0) { - permanently_set_uid(getpwuid(getuid())); + permanently_drop_suid(getuid()); close(p[0]); if (dup2(p[1], STDOUT_FILENO) < 0) fatal("ssh_askpass: dup2: %s", strerror(errno)); diff --git a/sshconnect.c b/sshconnect.c index 41ad82f9f..c76572662 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.183 2006/06/06 10:20:20 markus Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.184 2006/06/08 14:45:49 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -97,7 +97,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) char *argv[10]; /* Child. Permanently give up superuser privileges. */ - permanently_set_uid(getpwuid(original_real_uid)); + permanently_drop_suid(original_real_uid); /* Redirect stdin and stdout. */ close(pin[1]); diff --git a/sshconnect2.c b/sshconnect2.c index c97738c7b..4f96dcfc4 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.154 2006/06/06 10:20:20 markus Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.155 2006/06/08 14:45:49 markus Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -1253,7 +1253,7 @@ ssh_keysign(Key *key, u_char **sigp, u_int *lenp, return -1; } if (pid == 0) { - permanently_set_uid(getpwuid(getuid())); + permanently_drop_suid(getuid()); close(from[0]); if (dup2(from[1], STDOUT_FILENO) < 0) fatal("ssh_keysign: dup2: %s", strerror(errno)); diff --git a/uidswap.c b/uidswap.c index ba2d20942..e5b0595ac 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.28 2006/06/06 10:20:20 markus Exp $ */ +/* $OpenBSD: uidswap.c,v 1.29 2006/06/08 14:45:49 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -123,6 +123,41 @@ temporarily_use_uid(struct passwd *pw) strerror(errno)); } +void +permanently_drop_suid(uid_t uid) +{ + uid_t old_uid = getuid(); + + debug("permanently_drop_suid: %u", (u_int)uid); +#if defined(HAVE_SETRESUID) && !defined(BROKEN_SETRESUID) + if (setresuid(uid, uid, uid) < 0) + fatal("setresuid %u: %.100s", (u_int)uid, strerror(errno)); +#elif defined(HAVE_SETREUID) && !defined(BROKEN_SETREUID) + if (setreuid(uid, uid) < 0) + fatal("setreuid %u: %.100s", (u_int)uid, strerror(errno)); +#else +# ifndef SETEUID_BREAKS_SETUID + if (seteuid(uid) < 0) + fatal("seteuid %u: %.100s", (u_int)uid, strerror(errno)); +# endif + if (setuid(uid) < 0) + fatal("setuid %u: %.100s", (u_int)uid, strerror(errno)); +#endif + +#ifndef HAVE_CYGWIN + /* Try restoration of UID if changed (test clearing of saved uid) */ + if (old_uid != uid && + (setuid(old_uid) != -1 || seteuid(old_uid) != -1)) + fatal("%s: was able to restore old [e]uid", __func__); +#endif + + /* Verify UID drop was successful */ + if (getuid() != uid || geteuid() != uid) { + fatal("%s: euid incorrect uid:%u euid:%u (should be %u)", + __func__, (u_int)getuid(), (u_int)geteuid(), (u_int)uid); + } +} + /* * Restores to the original (privileged) uid. */ diff --git a/uidswap.h b/uidswap.h index 967ea9c4d..f827782d5 100644 --- a/uidswap.h +++ b/uidswap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.h,v 1.10 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: uidswap.h,v 1.11 2006/06/08 14:45:49 markus Exp $ */ /* * Author: Tatu Ylonen @@ -18,5 +18,6 @@ void temporarily_use_uid(struct passwd *); void restore_uid(void); void permanently_set_uid(struct passwd *); +void permanently_drop_suid(uid_t); #endif /* UIDSWAP_H */ -- cgit v1.2.3 From 39972493467dd9a32a117e85bcbff9aa1e7f3c8d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 12 Jul 2006 22:22:46 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/11 20:07:25 [scp.c auth.c monitor.c serverloop.c sftp-server.c sshpty.c readpass.c sshd.c monitor_wrap.c monitor_fdpass.c ssh-agent.c ttymodes.c atomicio.c includes.h session.c sshlogin.c monitor_mm.c packet.c sshconnect2.c sftp-client.c nchan.c clientloop.c sftp.c misc.c canohost.c channels.c ssh-keygen.c progressmeter.c uidswap.c msg.c readconf.c sshconnect.c] move #include out of includes.h; ok markus@ --- ChangeLog | 9 ++++++++- atomicio.c | 4 +++- auth.c | 3 ++- canohost.c | 3 ++- channels.c | 3 ++- clientloop.c | 3 ++- includes.h | 3 +-- misc.c | 3 ++- monitor.c | 3 ++- monitor_fdpass.c | 4 +++- monitor_mm.c | 4 +++- monitor_wrap.c | 3 ++- msg.c | 4 +++- nchan.c | 4 +++- packet.c | 3 ++- progressmeter.c | 3 ++- readconf.c | 3 ++- readpass.c | 3 ++- scp.c | 3 ++- serverloop.c | 3 ++- session.c | 3 ++- sftp-client.c | 3 ++- sftp-server.c | 3 ++- sftp.c | 4 +++- ssh-agent.c | 3 ++- ssh-keygen.c | 3 ++- sshconnect.c | 3 ++- sshconnect2.c | 4 +++- sshd.c | 3 ++- sshlogin.c | 3 ++- sshpty.c | 3 ++- ttymodes.c | 3 ++- uidswap.c | 3 ++- 33 files changed, 78 insertions(+), 34 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 74bfb0d3b..32603360d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,13 @@ add ExitOnForwardFailure: terminate the connection if ssh(1) cannot set up all requested dynamic, local, and remote port forwardings. ok djm, dtucker, stevesk, jmc + - stevesk@cvs.openbsd.org 2006/07/11 20:07:25 + [scp.c auth.c monitor.c serverloop.c sftp-server.c sshpty.c readpass.c + sshd.c monitor_wrap.c monitor_fdpass.c ssh-agent.c ttymodes.c atomicio.c + includes.h session.c sshlogin.c monitor_mm.c packet.c sshconnect2.c + sftp-client.c nchan.c clientloop.c sftp.c misc.c canohost.c channels.c + ssh-keygen.c progressmeter.c uidswap.c msg.c readconf.c sshconnect.c] + move #include out of includes.h; ok markus@ 20060711 - (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c @@ -4878,4 +4885,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4396 2006/07/12 12:17:10 dtucker Exp $ +$Id: ChangeLog,v 1.4397 2006/07/12 12:22:46 dtucker Exp $ diff --git a/atomicio.c b/atomicio.c index 3939785df..bf1c0fd18 100644 --- a/atomicio.c +++ b/atomicio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.c,v 1.19 2006/04/16 07:59:00 djm Exp $ */ +/* $OpenBSD: atomicio.c,v 1.20 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. @@ -28,6 +28,8 @@ #include "includes.h" +#include + #include "atomicio.h" /* diff --git a/auth.c b/auth.c index 6901c936a..e5ddc79da 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.69 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: auth.c,v 1.70 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include +#include #ifdef HAVE_PATHS_H # include #endif diff --git a/canohost.c b/canohost.c index 538b141b1..4566e2ab1 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.55 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.56 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -20,6 +20,7 @@ #include #include +#include #include "packet.h" #include "xmalloc.h" diff --git a/channels.c b/channels.c index 51718578b..555067255 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.253 2006/07/11 18:50:47 markus Exp $ */ +/* $OpenBSD: channels.c,v 1.254 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -49,6 +49,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/clientloop.c b/clientloop.c index 6cb2a7ac7..978289b61 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.167 2006/07/11 18:50:47 markus Exp $ */ +/* $OpenBSD: clientloop.c,v 1.168 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -69,6 +69,7 @@ #include #include +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/includes.h b/includes.h index 22a2c5944..08d34486b 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.48 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.49 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -21,7 +21,6 @@ #define _GNU_SOURCE /* activate extra prototypes for glibc */ #include -#include #include #include #include diff --git a/misc.c b/misc.c index 4d6576ad6..fba085d9b 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.57 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.58 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -35,6 +35,7 @@ #include #include +#include #include #ifdef HAVE_PATHS_H # include diff --git a/monitor.c b/monitor.c index b06cecf7d..a5263d746 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.80 2006/07/09 15:15:10 stevesk Exp $ */ +/* $OpenBSD: monitor.c,v 1.81 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -31,6 +31,7 @@ #include #include +#include #include #ifdef HAVE_PATHS_H #include diff --git a/monitor_fdpass.c b/monitor_fdpass.c index 546f7010f..9d319ac1a 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.9 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.10 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. @@ -30,6 +30,8 @@ #include #include +#include + #include "log.h" #include "monitor_fdpass.h" diff --git a/monitor_mm.c b/monitor_mm.c index 222751628..dc0dbda76 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.c,v 1.11 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: monitor_mm.c,v 1.12 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. @@ -26,6 +26,8 @@ #include "includes.h" +#include + #ifdef HAVE_SYS_MMAN_H #include #endif diff --git a/monitor_wrap.c b/monitor_wrap.c index 22b1fe854..9ec60b6af 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.46 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.47 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -32,6 +32,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/msg.c b/msg.c index fb08df548..4344a1312 100644 --- a/msg.c +++ b/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.11 2006/03/30 09:58:15 djm Exp $ */ +/* $OpenBSD: msg.c,v 1.12 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -24,6 +24,8 @@ */ #include "includes.h" +#include + #include "buffer.h" #include "log.h" #include "atomicio.h" diff --git a/nchan.c b/nchan.c index 58b0e98d5..43816a65b 100644 --- a/nchan.c +++ b/nchan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nchan.c,v 1.54 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: nchan.c,v 1.55 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -28,6 +28,8 @@ #include #include +#include + #include "ssh1.h" #include "ssh2.h" #include "buffer.h" diff --git a/packet.c b/packet.c index b4f3aea14..e153a7c1b 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.134 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.135 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -47,6 +47,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/progressmeter.c b/progressmeter.c index d145a724a..98a30e11b 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.29 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.30 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -27,6 +27,7 @@ #include +#include #include #include "progressmeter.h" diff --git a/readconf.c b/readconf.c index d25f93012..d2e172303 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.153 2006/07/11 18:50:48 markus Exp $ */ +/* $OpenBSD: readconf.c,v 1.154 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -21,6 +21,7 @@ #include #include +#include #include "ssh.h" #include "xmalloc.h" diff --git a/readpass.c b/readpass.c index 0da75ac11..63197c915 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.41 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.42 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include +#include #include #ifdef HAVE_PATHS_H # include diff --git a/scp.c b/scp.c index c15fbbc2a..5e3a93ed5 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.146 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.147 2006/07/11 20:07:25 stevesk Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -81,6 +81,7 @@ #include #include +#include #include #include #include diff --git a/serverloop.c b/serverloop.c index 09063ab8c..83138aec2 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.138 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: serverloop.c,v 1.139 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,6 +43,7 @@ #include +#include #include #include #include diff --git a/session.c b/session.c index 33be91545..5441a4762 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.208 2006/07/11 18:50:48 markus Exp $ */ +/* $OpenBSD: session.c,v 1.209 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -43,6 +43,7 @@ #include #include +#include #include #ifdef HAVE_PATHS_H #include diff --git a/sftp-client.c b/sftp-client.c index e10361e93..8fe0c0fe5 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.66 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.67 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -27,6 +27,7 @@ # include #endif +#include #include #include diff --git a/sftp-server.c b/sftp-server.c index e7193859e..29503246e 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.61 2006/07/10 11:25:53 djm Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.62 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -20,6 +20,7 @@ #include #include +#include #include #include diff --git a/sftp.c b/sftp.c index 27099ef06..649f08e5d 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.84 2006/07/10 16:01:57 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.85 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -25,6 +25,8 @@ #include #include +#include + #ifdef HAVE_PATHS_H # include #endif diff --git a/ssh-agent.c b/ssh-agent.c index 57c7380f3..4421fa424 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.142 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.143 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,7 @@ #include "openbsd-compat/sys-queue.h" #include +#include #include #ifdef HAVE_PATHS_H # include diff --git a/ssh-keygen.c b/ssh-keygen.c index 4e42d0cfc..1c506059c 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.147 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.148 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -21,6 +21,7 @@ #include #include +#include #include #ifdef HAVE_PATHS_H # include diff --git a/sshconnect.c b/sshconnect.c index f8450eadf..c9d6221d8 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.189 2006/07/10 12:46:51 dtucker Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.190 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ #include #include +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/sshconnect2.c b/sshconnect2.c index 4f96dcfc4..04ea8dfc1 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.155 2006/06/08 14:45:49 markus Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.156 2006/07/11 20:07:25 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -29,6 +29,8 @@ #include #include +#include + #include "openbsd-compat/sys-queue.h" #include "ssh.h" diff --git a/sshd.c b/sshd.c index 602116edf..f3fe9d184 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.335 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.336 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -52,6 +52,7 @@ #include #include +#include #include #ifdef HAVE_PATHS_H #include diff --git a/sshlogin.c b/sshlogin.c index 9b5ce1fde..808ad605e 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.18 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.19 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,6 +41,7 @@ #include "includes.h" +#include #include #include "loginrec.h" diff --git a/sshpty.c b/sshpty.c index 7f4e8bc16..10dae0328 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.22 2006/07/09 15:15:11 stevesk Exp $ */ +/* $OpenBSD: sshpty.c,v 1.23 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -19,6 +19,7 @@ #include #include +#include #include #include #ifdef HAVE_PATHS_H diff --git a/ttymodes.c b/ttymodes.c index 92fecb415..b46305430 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymodes.c,v 1.23 2006/03/25 13:17:03 djm Exp $ */ +/* $OpenBSD: ttymodes.c,v 1.24 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,7 @@ #include "includes.h" +#include #include #include "packet.h" diff --git a/uidswap.c b/uidswap.c index 2ac5d7f91..e97cd7059 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.30 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: uidswap.c,v 1.31 2006/07/11 20:07:25 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -16,6 +16,7 @@ #include +#include #include #include -- cgit v1.2.3 From 1cdde6f536ec50d7165ff56843c99655c95a68eb Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:07:35 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/20 15:26:15 [auth1.c serverloop.c session.c sshconnect2.c] missed some needed #include when KERBEROS5=no; issue from massimo@cedoc.mo.it --- ChangeLog | 6 +++++- auth1.c | 6 +++++- serverloop.c | 3 ++- session.c | 6 ++++-- sshconnect2.c | 3 ++- 5 files changed, 18 insertions(+), 6 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 0ae5d3f6c..50937e3b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,6 +61,10 @@ Add ForceCommand keyword to sshd_config, equivalent to the "command=" key option, man page entry and example in sshd_config. Feedback & ok djm@, man page corrections & ok jmc@ + - stevesk@cvs.openbsd.org 2006/07/20 15:26:15 + [auth1.c serverloop.c session.c sshconnect2.c] + missed some needed #include when KERBEROS5=no; issue from + massimo@cedoc.mo.it 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4979,4 +4983,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4422 2006/07/24 04:06:47 djm Exp $ +$Id: ChangeLog,v 1.4423 2006/07/24 04:07:35 djm Exp $ diff --git a/auth1.c b/auth1.c index 6a6cff862..089291882 100644 --- a/auth1.c +++ b/auth1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.66 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth1.c,v 1.67 2006/07/20 15:26:14 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -12,6 +12,10 @@ #include "includes.h" +#include + +#include + #include "xmalloc.h" #include "rsa.h" #include "ssh1.h" diff --git a/serverloop.c b/serverloop.c index 83138aec2..1ca3e673f 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.139 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: serverloop.c,v 1.140 2006/07/20 15:26:15 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -48,6 +48,7 @@ #include #include #include +#include #include "xmalloc.h" #include "packet.h" diff --git a/session.c b/session.c index e189acdf2..be65086ae 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.210 2006/07/19 13:07:10 dtucker Exp $ */ +/* $OpenBSD: session.c,v 1.211 2006/07/20 15:26:15 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -43,6 +43,8 @@ #include #include +#include + #include #include #ifdef HAVE_PATHS_H @@ -50,7 +52,7 @@ #endif #include #include -#include +#include #include "ssh.h" #include "ssh1.h" diff --git a/sshconnect2.c b/sshconnect2.c index 04ea8dfc1..f55002bdf 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.156 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.157 2006/07/20 15:26:15 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include "openbsd-compat/sys-queue.h" -- cgit v1.2.3 From e3476ed03bf9beca3ad0e5447dc9422a546d19ec Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:13:33 +1000 Subject: - stevesk@cvs.openbsd.org 2006/07/22 20:48:23 [atomicio.c auth-options.c auth-passwd.c auth-rhosts.c auth-rsa.c] [auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-passwd.c auth2.c] [authfd.c authfile.c bufaux.c bufbn.c buffer.c canohost.c channels.c] [cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c clientloop.c] [compat.c deattack.c dh.c dns.c gss-genr.c gss-serv.c hostfile.c] [includes.h kex.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c log.c] [mac.c match.c md-sha256.c misc.c moduli.c monitor.c monitor_fdpass.c] [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c rsa.c] [progressmeter.c readconf.c readpass.c scp.c servconf.c serverloop.c] [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshpty.c ttymodes.c uidswap.c xmalloc.c] move #include out of includes.h --- ChangeLog | 17 ++++++++++++++++- atomicio.c | 3 ++- auth-options.c | 3 ++- auth-passwd.c | 3 ++- auth-rhosts.c | 3 ++- auth-rsa.c | 3 ++- auth.c | 3 ++- auth1.c | 3 ++- auth2-chall.c | 4 +++- auth2-hostbased.c | 3 ++- auth2-passwd.c | 4 +++- auth2.c | 3 ++- authfd.c | 3 ++- authfile.c | 3 ++- bufaux.c | 5 ++++- bufbn.c | 5 ++++- buffer.c | 4 +++- canohost.c | 3 ++- channels.c | 3 ++- cipher-3des1.c | 5 ++++- cipher-bf1.c | 5 ++++- cipher-ctr.c | 4 +++- cipher.c | 8 +++++--- clientloop.c | 3 ++- compat.c | 4 +++- deattack.c | 4 +++- dh.c | 4 +++- dns.c | 3 ++- gss-genr.c | 4 +++- gss-serv.c | 4 +++- hostfile.c | 3 ++- includes.h | 3 +-- kex.c | 4 +++- kexdhc.c | 4 +++- kexdhs.c | 4 +++- kexgexc.c | 4 +++- kexgexs.c | 4 +++- key.c | 4 +++- log.c | 3 ++- mac.c | 4 +++- match.c | 3 ++- md-sha256.c | 2 +- misc.c | 3 ++- moduli.c | 3 ++- monitor.c | 3 ++- monitor_fdpass.c | 3 ++- monitor_mm.c | 3 ++- monitor_wrap.c | 3 ++- msg.c | 3 ++- nchan.c | 3 ++- packet.c | 3 ++- progressmeter.c | 3 ++- readconf.c | 3 ++- readpass.c | 3 ++- rsa.c | 4 +++- scp.c | 3 ++- servconf.c | 3 ++- serverloop.c | 3 ++- session.c | 3 ++- sftp-client.c | 3 ++- sftp-common.c | 3 ++- sftp-glob.c | 5 +++-- sftp-server.c | 5 +++-- sftp.c | 3 ++- ssh-add.c | 3 ++- ssh-agent.c | 9 +++++---- ssh-dss.c | 4 +++- ssh-keygen.c | 3 ++- ssh-keyscan.c | 8 +++++--- ssh-keysign.c | 3 ++- ssh-rsa.c | 4 +++- ssh.c | 3 ++- sshconnect.c | 3 ++- sshconnect1.c | 4 +++- sshconnect2.c | 3 ++- sshd.c | 3 ++- sshlogin.c | 3 ++- sshpty.c | 3 ++- ttymodes.c | 3 ++- uidswap.c | 3 ++- xmalloc.c | 3 ++- 81 files changed, 213 insertions(+), 91 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 636d309b9..000c57828 100644 --- a/ChangeLog +++ b/ChangeLog @@ -80,6 +80,21 @@ [includes.h moduli.c progressmeter.c scp.c sftp-common.c] [sftp-server.c ssh-agent.c sshlogin.c] move #include out of includes.h + - stevesk@cvs.openbsd.org 2006/07/22 20:48:23 + [atomicio.c auth-options.c auth-passwd.c auth-rhosts.c auth-rsa.c] + [auth.c auth1.c auth2-chall.c auth2-hostbased.c auth2-passwd.c auth2.c] + [authfd.c authfile.c bufaux.c bufbn.c buffer.c canohost.c channels.c] + [cipher-3des1.c cipher-bf1.c cipher-ctr.c cipher.c clientloop.c] + [compat.c deattack.c dh.c dns.c gss-genr.c gss-serv.c hostfile.c] + [includes.h kex.c kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c log.c] + [mac.c match.c md-sha256.c misc.c moduli.c monitor.c monitor_fdpass.c] + [monitor_mm.c monitor_wrap.c msg.c nchan.c packet.c rsa.c] + [progressmeter.c readconf.c readpass.c scp.c servconf.c serverloop.c] + [session.c sftp-client.c sftp-common.c sftp-glob.c sftp-server.c sftp.c] + [ssh-add.c ssh-agent.c ssh-dss.c ssh-keygen.c ssh-keyscan.c] + [ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c sshconnect1.c sshconnect2.c] + [sshd.c sshlogin.c sshpty.c ttymodes.c uidswap.c xmalloc.c] + move #include out of includes.h 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -4998,4 +5013,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4427 2006/07/24 04:09:40 djm Exp $ +$Id: ChangeLog,v 1.4428 2006/07/24 04:13:33 djm Exp $ diff --git a/atomicio.c b/atomicio.c index bf1c0fd18..009ce1d11 100644 --- a/atomicio.c +++ b/atomicio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.c,v 1.20 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: atomicio.c,v 1.21 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. @@ -29,6 +29,7 @@ #include "includes.h" #include +#include #include "atomicio.h" diff --git a/auth-options.c b/auth-options.c index 7e6bfeb40..33c62641b 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.38 2006/07/17 12:02:24 dtucker Exp $ */ +/* $OpenBSD: auth-options.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ # include #endif #include +#include #include "xmalloc.h" #include "match.h" diff --git a/auth-passwd.c b/auth-passwd.c index 3cf86dcbd..e5edc9336 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.37 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.38 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,6 +41,7 @@ #include #include +#include #include "packet.h" #include "buffer.h" diff --git a/auth-rhosts.c b/auth-rhosts.c index d50ea3a01..c14604dc4 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rhosts.c,v 1.38 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-rhosts.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ # include #endif #include +#include #include "packet.h" #include "uidswap.h" diff --git a/auth-rsa.c b/auth-rsa.c index 867597642..65c77805f 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.68 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.69 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ #include #include +#include #include "rsa.h" #include "packet.h" diff --git a/auth.c b/auth.c index 3bca8dc21..0f1d530e7 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.71 2006/07/12 11:34:58 dtucker Exp $ */ +/* $OpenBSD: auth.c,v 1.72 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -43,6 +43,7 @@ #include #endif #include +#include #include "xmalloc.h" #include "match.h" diff --git a/auth1.c b/auth1.c index 089291882..034010fda 100644 --- a/auth1.c +++ b/auth1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.67 2006/07/20 15:26:14 stevesk Exp $ */ +/* $OpenBSD: auth1.c,v 1.68 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -14,6 +14,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/auth2-chall.c b/auth2-chall.c index 09412aa4a..ad6b7233f 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.27 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.28 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -25,6 +25,8 @@ */ #include "includes.h" +#include + #include "ssh2.h" #include "auth.h" #include "buffer.h" diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 56bf0be13..5cb617e1c 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-hostbased.c,v 1.9 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth2-hostbased.c,v 1.10 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include +#include #include "ssh2.h" #include "xmalloc.h" diff --git a/auth2-passwd.c b/auth2-passwd.c index a1e77c41c..a1b65da50 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-passwd.c,v 1.7 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth2-passwd.c,v 1.8 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "packet.h" #include "log.h" diff --git a/auth2.c b/auth2.c index ad57c64e6..83d5224c9 100644 --- a/auth2.c +++ b/auth2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2.c,v 1.111 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth2.c,v 1.112 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include +#include #include "ssh2.h" #include "xmalloc.h" diff --git a/authfd.c b/authfd.c index f8b7ed71f..52766bcd2 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.77 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: authfd.c,v 1.78 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -44,6 +44,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/authfile.c b/authfile.c index 53397ea53..8421665b8 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.70 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.71 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -47,6 +47,7 @@ #include #include +#include #include #include "cipher.h" diff --git a/bufaux.c b/bufaux.c index 4c9cb662c..a384cc685 100644 --- a/bufaux.c +++ b/bufaux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.42 2006/04/18 10:44:28 dtucker Exp $ */ +/* $OpenBSD: bufaux.c,v 1.43 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -40,6 +40,9 @@ #include "includes.h" #include + +#include + #include "bufaux.h" #include "xmalloc.h" #include "log.h" diff --git a/bufbn.c b/bufbn.c index 56f4f6d5b..aa42ea62b 100644 --- a/bufbn.c +++ b/bufbn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufbn.c,v 1.1 2006/04/18 10:44:28 dtucker Exp $*/ +/* $OpenBSD: bufbn.c,v 1.2 2006/07/22 20:48:22 stevesk Exp $*/ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -40,6 +40,9 @@ #include "includes.h" #include + +#include + #include "bufaux.h" #include "xmalloc.h" #include "log.h" diff --git a/buffer.c b/buffer.c index ba718daf2..8c9f534f8 100644 --- a/buffer.c +++ b/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.27 2006/04/16 00:48:52 djm Exp $ */ +/* $OpenBSD: buffer.c,v 1.28 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,6 +14,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "buffer.h" #include "log.h" diff --git a/canohost.c b/canohost.c index da5131de3..97b5a78f9 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.57 2006/07/12 22:28:51 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.58 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -24,6 +24,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include "packet.h" #include "xmalloc.h" diff --git a/channels.c b/channels.c index e44a2ab4f..8cf4242fe 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.259 2006/07/21 21:13:30 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.260 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -53,6 +53,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include #include diff --git a/cipher-3des1.c b/cipher-3des1.c index c2c0bf811..2e8735d54 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-3des1.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher-3des1.c,v 1.5 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -26,6 +26,9 @@ #include "includes.h" #include + +#include + #include "xmalloc.h" #include "log.h" diff --git a/cipher-bf1.c b/cipher-bf1.c index b6aa0152a..95b4e5e93 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-bf1.c,v 1.3 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher-bf1.c,v 1.4 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -26,6 +26,9 @@ #include "includes.h" #include + +#include + #include "xmalloc.h" #include "log.h" diff --git a/cipher-ctr.c b/cipher-ctr.c index be82fd3a9..105d0bd5b 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-ctr.c,v 1.8 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher-ctr.c,v 1.9 2006/07/22 20:48:22 stevesk Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -16,6 +16,8 @@ */ #include "includes.h" +#include + #include #include "log.h" diff --git a/cipher.c b/cipher.c index c42963897..20fa59c6a 100644 --- a/cipher.c +++ b/cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.79 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: cipher.c,v 1.80 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,12 +37,14 @@ #include "includes.h" +#include + +#include + #include "xmalloc.h" #include "log.h" #include "cipher.h" -#include - /* compatibility with old or broken OpenSSL versions */ #include "openbsd-compat/openssl-compat.h" diff --git a/clientloop.c b/clientloop.c index 9398dc989..0c700dbd4 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.169 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.170 2006/07/22 20:48:22 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -74,6 +74,7 @@ #include #endif #include +#include #include #include diff --git a/compat.c b/compat.c index 1573ed64e..35e429a5f 100644 --- a/compat.c +++ b/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.73 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: compat.c,v 1.74 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "buffer.h" #include "packet.h" #include "xmalloc.h" diff --git a/deattack.c b/deattack.c index fa397e6e8..57a747da5 100644 --- a/deattack.c +++ b/deattack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: deattack.c,v 1.27 2006/03/30 09:58:15 djm Exp $ */ +/* $OpenBSD: deattack.c,v 1.28 2006/07/22 20:48:23 stevesk Exp $ */ /* * Cryptographic attack detector for ssh - source code * @@ -20,6 +20,8 @@ #include "includes.h" +#include + #include "deattack.h" #include "log.h" #include "crc32.h" diff --git a/dh.c b/dh.c index ff31ca991..b37195f41 100644 --- a/dh.c +++ b/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.37 2006/07/18 22:27:55 stevesk Exp $ */ +/* $OpenBSD: dh.c,v 1.38 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -28,6 +28,8 @@ #include #include +#include + #include "dh.h" #include "pathnames.h" #include "log.h" diff --git a/dns.c b/dns.c index 16954a6a1..5f123a2ee 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.20 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: dns.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -33,6 +33,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include "xmalloc.h" #include "key.h" diff --git a/gss-genr.c b/gss-genr.c index 3d630ab82..0497657c0 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-genr.c,v 1.10 2006/04/03 07:10:38 djm Exp $ */ +/* $OpenBSD: gss-genr.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,6 +28,8 @@ #ifdef GSSAPI +#include + #include "xmalloc.h" #include "bufaux.h" #include "log.h" diff --git a/gss-serv.c b/gss-serv.c index 4ce536d99..c033aad4f 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv.c,v 1.18 2006/07/02 18:36:47 stevesk Exp $ */ +/* $OpenBSD: gss-serv.c,v 1.19 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,6 +28,8 @@ #ifdef GSSAPI +#include + #include "bufaux.h" #include "auth.h" #include "log.h" diff --git a/hostfile.c b/hostfile.c index a6714b6e1..c067f5e11 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.41 2006/07/05 02:42:09 stevesk Exp $ */ +/* $OpenBSD: hostfile.c,v 1.42 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,6 +43,7 @@ #include #include +#include #include #include diff --git a/includes.h b/includes.h index da526bc72..7a7bd8176 100644 --- a/includes.h +++ b/includes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: includes.h,v 1.53 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: includes.h,v 1.54 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -22,7 +22,6 @@ #include #include -#include #ifdef HAVE_LIMITS_H # include /* For PATH_MAX */ diff --git a/kex.c b/kex.c index 6a5fd264b..007173388 100644 --- a/kex.c +++ b/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.71 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kex.c,v 1.72 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -27,6 +27,8 @@ #include +#include + #include "ssh2.h" #include "xmalloc.h" #include "buffer.h" diff --git a/kexdhc.c b/kexdhc.c index f5f01196f..dbbd9bbd0 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhc.c,v 1.6 2006/05/18 21:27:25 miod Exp $ */ +/* $OpenBSD: kexdhc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/kexdhs.c b/kexdhs.c index d139f5c7b..c64cd77cb 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhs.c,v 1.5 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexdhs.c,v 1.6 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/kexgexc.c b/kexgexc.c index 9da184488..fb2049ea7 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexc.c,v 1.6 2006/05/18 21:27:25 miod Exp $ */ +/* $OpenBSD: kexgexc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,6 +26,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/kexgexs.c b/kexgexs.c index 0141c6d0f..72b66230f 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexs.c,v 1.4 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexgexs.c,v 1.5 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,6 +26,8 @@ #include "includes.h" +#include + #include "xmalloc.h" #include "key.h" #include "kex.h" diff --git a/key.c b/key.c index 8e6ccc2bf..e6868de6d 100644 --- a/key.c +++ b/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.64 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: key.c,v 1.65 2006/07/22 20:48:23 stevesk Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,6 +36,8 @@ #include +#include + #include "xmalloc.h" #include "key.h" #include "rsa.h" diff --git a/log.c b/log.c index 4ad7cfff7..8a308c2f8 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.34 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.35 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #include #include #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) diff --git a/mac.c b/mac.c index 02bcc31ed..a59e7edf1 100644 --- a/mac.c +++ b/mac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mac.c,v 1.10 2006/03/30 09:58:15 djm Exp $ */ +/* $OpenBSD: mac.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -27,6 +27,8 @@ #include +#include + #include "xmalloc.h" #include "log.h" #include "cipher.h" diff --git a/match.c b/match.c index c0e5bf424..8f12ef539 100644 --- a/match.c +++ b/match.c @@ -1,4 +1,4 @@ -/* $OpenBSD: match.c,v 1.24 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: match.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -38,6 +38,7 @@ #include "includes.h" #include +#include #include "match.h" #include "xmalloc.h" diff --git a/md-sha256.c b/md-sha256.c index 33deb780a..063a1014f 100644 --- a/md-sha256.c +++ b/md-sha256.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md-sha256.c,v 1.3 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: md-sha256.c,v 1.4 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2005 Damien Miller * diff --git a/misc.c b/misc.c index e9c5ddf8b..4c202db2a 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.59 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.60 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/moduli.c b/moduli.c index 9d4aedd5b..4d5576a1f 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.14 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: moduli.c,v 1.15 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -43,6 +43,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/monitor.c b/monitor.c index a5263d746..3799d8862 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.81 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor.c,v 1.82 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -38,6 +38,7 @@ #endif #include #include +#include #ifdef SKEY #include diff --git a/monitor_fdpass.c b/monitor_fdpass.c index 9d319ac1a..d3e65cbaa 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.10 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include "log.h" #include "monitor_fdpass.h" diff --git a/monitor_mm.c b/monitor_mm.c index dc0dbda76..b6da6927f 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.c,v 1.12 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor_mm.c,v 1.13 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. @@ -27,6 +27,7 @@ #include "includes.h" #include +#include #ifdef HAVE_SYS_MMAN_H #include diff --git a/monitor_wrap.c b/monitor_wrap.c index 9ec60b6af..3728e5f55 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.47 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.48 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -34,6 +34,7 @@ #include #include +#include #include "ssh.h" #include "dh.h" diff --git a/msg.c b/msg.c index 5c535d1af..322472668 100644 --- a/msg.c +++ b/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.13 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: msg.c,v 1.14 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -27,6 +27,7 @@ #include #include +#include #include #include "buffer.h" diff --git a/nchan.c b/nchan.c index 43816a65b..78908c3c6 100644 --- a/nchan.c +++ b/nchan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nchan.c,v 1.55 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: nchan.c,v 1.56 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #include +#include #include "ssh1.h" #include "ssh2.h" diff --git a/packet.c b/packet.c index ce652cfd8..8250b3bc8 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.136 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.137 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -49,6 +49,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/progressmeter.c b/progressmeter.c index c70e9939a..19dc917c9 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.33 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.34 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/readconf.c b/readconf.c index 73271e84e..432b80ed0 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.156 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.157 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,6 +25,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include #include "ssh.h" diff --git a/readpass.c b/readpass.c index 725ae5789..1982fb6c5 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.43 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.44 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -34,6 +34,7 @@ # include #endif #include +#include #include #include "xmalloc.h" diff --git a/rsa.c b/rsa.c index 6ca05b3d2..c656291ed 100644 --- a/rsa.c +++ b/rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: rsa.c,v 1.27 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -62,6 +62,8 @@ #include "includes.h" +#include + #include "rsa.h" #include "log.h" #include "xmalloc.h" diff --git a/scp.c b/scp.c index 72c4ee430..5ff6cac9a 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.149 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.150 2006/07/22 20:48:23 stevesk Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -86,6 +86,7 @@ #include #include #include +#include #include #include diff --git a/servconf.c b/servconf.c index 46558b690..ce44b5f60 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.159 2006/07/21 12:43:36 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.160 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -18,6 +18,7 @@ #if defined(HAVE_NETDB_H) # include #endif +#include #include #include "ssh.h" diff --git a/serverloop.c b/serverloop.c index 1ca3e673f..ba1e0dad7 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.140 2006/07/20 15:26:15 stevesk Exp $ */ +/* $OpenBSD: serverloop.c,v 1.141 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -47,6 +47,7 @@ #include #include #include +#include #include #include diff --git a/session.c b/session.c index be65086ae..c2730a425 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.211 2006/07/20 15:26:15 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.212 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -52,6 +52,7 @@ #endif #include #include +#include #include #include "ssh.h" diff --git a/sftp-client.c b/sftp-client.c index 5ba4f0a9f..84dae58d2 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.68 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.69 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "openbsd-compat/sys-queue.h" diff --git a/sftp-common.c b/sftp-common.c index 6fd0d76b6..2f3a90971 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.c,v 1.16 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: sftp-common.c,v 1.17 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include #include "buffer.h" diff --git a/sftp-glob.c b/sftp-glob.c index 0342de47d..f8549ea76 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-glob.c,v 1.20 2006/07/10 16:01:57 stevesk Exp $ */ +/* $OpenBSD: sftp-glob.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -21,8 +21,9 @@ #ifdef HAVE_SYS_STAT_H # include #endif - + #include +#include #include "xmalloc.h" diff --git a/sftp-server.c b/sftp-server.c index 3c254e332..6067f0203 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.64 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.65 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -23,8 +23,9 @@ #include #include #include -#include +#include #include +#include #include "buffer.h" #include "bufaux.h" diff --git a/sftp.c b/sftp.c index 1a88f33f9..2da6c722f 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.86 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.87 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -36,6 +36,7 @@ typedef void EditLine; #endif #include +#include #include #include "xmalloc.h" diff --git a/ssh-add.c b/ssh-add.c index 974a1629b..f79ffb915 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.84 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.85 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -44,6 +44,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/ssh-agent.c b/ssh-agent.c index a0713b238..5bf4dbc18 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.145 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.146 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,9 @@ #include "openbsd-compat/sys-queue.h" #include +#include +#include + #include #include #ifdef HAVE_PATHS_H @@ -52,11 +55,9 @@ #endif #include #include +#include #include -#include -#include - #include "ssh.h" #include "rsa.h" #include "buffer.h" diff --git a/ssh-dss.c b/ssh-dss.c index d16f75e63..a8d45a2b4 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-dss.c,v 1.21 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: ssh-dss.c,v 1.22 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,6 +28,8 @@ #include #include +#include + #include "xmalloc.h" #include "buffer.h" #include "bufaux.h" diff --git a/ssh-keygen.c b/ssh-keygen.c index 56ad725d8..f2d37129b 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.149 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.150 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -30,6 +30,7 @@ # include #endif #include +#include #include #include "xmalloc.h" diff --git a/ssh-keyscan.c b/ssh-keyscan.c index fd71f7224..30df75166 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.68 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.69 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -11,16 +11,18 @@ #include "openbsd-compat/sys-queue.h" #include + +#include + #if defined(HAVE_NETDB_H) # include #endif #include #include #include +#include #include -#include - #include "xmalloc.h" #include "ssh.h" #include "ssh1.h" diff --git a/ssh-keysign.c b/ssh-keysign.c index b558e54f7..435b839fa 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.26 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.27 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #endif #include +#include #include #include diff --git a/ssh-rsa.c b/ssh-rsa.c index 4580c0644..236f77aac 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-rsa.c,v 1.37 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: ssh-rsa.c,v 1.38 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000, 2003 Markus Friedl * @@ -19,6 +19,8 @@ #include #include +#include + #include "xmalloc.h" #include "log.h" #include "buffer.h" diff --git a/ssh.c b/ssh.c index e482eb1b5..d0d9457c2 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.288 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.289 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -63,6 +63,7 @@ #include #include #include +#include #include #include diff --git a/sshconnect.c b/sshconnect.c index 1c69044ea..f33cf52b1 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.192 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.193 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -31,6 +31,7 @@ #include #endif #include +#include #include #include "ssh.h" diff --git a/sshconnect1.c b/sshconnect1.c index 5467f04bf..ab5216214 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.65 2006/04/25 08:02:27 dtucker Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.66 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,8 @@ #include #include +#include + #include "ssh.h" #include "ssh1.h" #include "xmalloc.h" diff --git a/sshconnect2.c b/sshconnect2.c index f55002bdf..41be0b91c 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.157 2006/07/20 15:26:15 stevesk Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.158 2006/07/22 20:48:23 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include "openbsd-compat/sys-queue.h" diff --git a/sshd.c b/sshd.c index 3da176da1..6428f42a0 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.338 2006/07/12 22:28:52 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.339 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -63,6 +63,7 @@ #include #include #include +#include #include #include diff --git a/sshlogin.c b/sshlogin.c index ea313e800..8d811facd 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.21 2006/07/22 19:08:54 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.22 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,7 @@ #include #include +#include #include #include diff --git a/sshpty.c b/sshpty.c index 931c91f47..719a79303 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.24 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: sshpty.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -26,6 +26,7 @@ # include #endif #include +#include #include #ifdef HAVE_UTIL_H # include diff --git a/ttymodes.c b/ttymodes.c index b46305430..680909b22 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymodes.c,v 1.24 2006/07/11 20:07:25 stevesk Exp $ */ +/* $OpenBSD: ttymodes.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -46,6 +46,7 @@ #include "includes.h" #include +#include #include #include "packet.h" diff --git a/uidswap.c b/uidswap.c index 2fe5feaed..255f9142c 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.32 2006/07/17 01:31:10 stevesk Exp $ */ +/* $OpenBSD: uidswap.c,v 1.33 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/xmalloc.c b/xmalloc.c index 8f9c3e12e..e7a14866b 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.22 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.23 2006/07/22 20:48:23 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -16,6 +16,7 @@ #include "includes.h" #include +#include #include "xmalloc.h" #include "log.h" -- cgit v1.2.3 From a7a73ee35d030c817b3eea5c6c3a75c765ca8e69 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 5 Aug 2006 11:37:59 +1000 Subject: - stevesk@cvs.openbsd.org 2006/08/01 23:22:48 [auth-passwd.c auth-rhosts.c auth-rsa.c auth.c auth.h auth1.c] [auth2-chall.c auth2-pubkey.c authfile.c buffer.c canohost.c] [channels.c clientloop.c dh.c dns.c dns.h hostfile.c kex.c kexdhc.c] [kexgexc.c kexgexs.c key.c key.h log.c misc.c misc.h moduli.c] [monitor_wrap.c packet.c progressmeter.c readconf.c readpass.c scp.c] [servconf.c session.c sftp-client.c sftp-common.c sftp-server.c sftp.c] [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh.c sshconnect.c] [sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshtty.c uuencode.c] [uuencode.h xmalloc.c] move #include out of includes.h --- ChangeLog | 13 ++++++++++++- auth-passwd.c | 3 ++- auth-rhosts.c | 3 ++- auth-rsa.c | 3 ++- auth.c | 3 ++- auth.h | 3 ++- auth1.c | 3 ++- auth2-chall.c | 3 ++- auth2-pubkey.c | 3 ++- authfile.c | 3 ++- buffer.c | 3 ++- canohost.c | 3 ++- channels.c | 3 ++- clientloop.c | 3 ++- dh.c | 3 ++- dns.c | 3 ++- dns.h | 4 +++- hostfile.c | 3 ++- includes.h | 1 - kex.c | 3 ++- kexdhc.c | 3 ++- kexgexc.c | 3 ++- kexgexs.c | 3 ++- key.c | 3 ++- key.h | 4 +++- log.c | 3 ++- misc.c | 3 ++- misc.h | 3 ++- moduli.c | 3 ++- monitor_wrap.c | 3 ++- packet.c | 3 ++- progressmeter.c | 3 ++- readconf.c | 3 ++- readpass.c | 3 ++- scp.c | 3 ++- servconf.c | 3 ++- session.c | 3 ++- sftp-client.c | 3 ++- sftp-common.c | 3 ++- sftp-server.c | 3 ++- sftp.c | 3 ++- ssh-add.c | 3 ++- ssh-agent.c | 3 ++- ssh-keygen.c | 3 ++- ssh-keyscan.c | 3 ++- ssh.c | 3 ++- sshconnect.c | 3 ++- sshconnect1.c | 3 ++- sshconnect2.c | 3 ++- sshd.c | 3 ++- sshlogin.c | 3 ++- sshtty.c | 3 ++- uuencode.c | 3 ++- uuencode.h | 5 ++++- xmalloc.c | 3 ++- 55 files changed, 122 insertions(+), 55 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index a97e77aaf..de401547e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,6 +40,17 @@ Allow fallback to known_hosts entries without port qualifiers for non-standard ports too, so that all existing known_hosts entries will be recognised. Requested by, feedback and ok markus@ + - stevesk@cvs.openbsd.org 2006/08/01 23:22:48 + [auth-passwd.c auth-rhosts.c auth-rsa.c auth.c auth.h auth1.c] + [auth2-chall.c auth2-pubkey.c authfile.c buffer.c canohost.c] + [channels.c clientloop.c dh.c dns.c dns.h hostfile.c kex.c kexdhc.c] + [kexgexc.c kexgexs.c key.c key.h log.c misc.c misc.h moduli.c] + [monitor_wrap.c packet.c progressmeter.c readconf.c readpass.c scp.c] + [servconf.c session.c sftp-client.c sftp-common.c sftp-server.c sftp.c] + [ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c ssh.c sshconnect.c] + [sshconnect1.c sshconnect2.c sshd.c sshlogin.c sshtty.c uuencode.c] + [uuencode.h xmalloc.c] + move #include out of includes.h 20060804 - (dtucker) [configure.ac] The "crippled AES" test does not work on recent @@ -5110,4 +5121,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4449 2006/08/05 01:35:45 djm Exp $ +$Id: ChangeLog,v 1.4450 2006/08/05 01:37:59 djm Exp $ diff --git a/auth-passwd.c b/auth-passwd.c index e5edc9336..f8df17e6a 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.38 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.39 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,6 +41,7 @@ #include #include +#include #include #include "packet.h" diff --git a/auth-rhosts.c b/auth-rhosts.c index c14604dc4..8dc4ede05 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rhosts.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-rhosts.c,v 1.40 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ # include #endif #include +#include #include #include "packet.h" diff --git a/auth-rsa.c b/auth-rsa.c index 65c77805f..f3e27e9fa 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.69 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.70 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ #include #include +#include #include #include "rsa.h" diff --git a/auth.c b/auth.c index 0089a1dd9..88a8e22ef 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.73 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: auth.c,v 1.74 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -44,6 +44,7 @@ #include #endif #include +#include #include #include "xmalloc.h" diff --git a/auth.h b/auth.h index 65250138f..2c7499573 100644 --- a/auth.h +++ b/auth.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.h,v 1.55 2006/07/23 01:11:05 stevesk Exp $ */ +/* $OpenBSD: auth.h,v 1.56 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -33,6 +33,7 @@ #include #include #include +#include #include "buffer.h" #include diff --git a/auth1.c b/auth1.c index 034010fda..2c5585768 100644 --- a/auth1.c +++ b/auth1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.68 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth1.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -14,6 +14,7 @@ #include +#include #include #include diff --git a/auth2-chall.c b/auth2-chall.c index ad6b7233f..89b261e61 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.28 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.29 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -25,6 +25,7 @@ */ #include "includes.h" +#include #include #include "ssh2.h" diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 7962dcef2..41763f763 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-pubkey.c,v 1.13 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth2-pubkey.c,v 1.14 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include #include +#include #include "ssh.h" #include "ssh2.h" diff --git a/authfile.c b/authfile.c index 7231be55f..f1d47b00b 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.73 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.74 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -48,6 +48,7 @@ #include #include +#include #include #include #include diff --git a/buffer.c b/buffer.c index c6e8a8d48..25868b94d 100644 --- a/buffer.c +++ b/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.29 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: buffer.c,v 1.30 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -16,6 +16,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/canohost.c b/canohost.c index 681139cdf..c236617d7 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.59 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.60 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/channels.c b/channels.c index b8c4e7e74..80cb32461 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.262 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.263 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,7 @@ #include #include +#include #include #include #include diff --git a/clientloop.c b/clientloop.c index 46f52e1a2..f9ffa2bb7 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.173 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.174 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -78,6 +78,7 @@ #include #endif #include +#include #include #include #include diff --git a/dh.c b/dh.c index 1ebd3f48e..4ca949138 100644 --- a/dh.c +++ b/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.40 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: dh.c,v 1.41 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/dns.c b/dns.c index c9368b96b..008fc596f 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: dns.c,v 1.22 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -31,6 +31,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/dns.h b/dns.h index 818750384..8f9601824 100644 --- a/dns.h +++ b/dns.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.h,v 1.8 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: dns.h,v 1.9 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -30,6 +30,8 @@ #include #include +#include + #ifndef DNS_H #define DNS_H diff --git a/hostfile.c b/hostfile.c index 33516a64c..7ac69e776 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.43 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: hostfile.c,v 1.44 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -46,6 +46,7 @@ #include #include +#include #include #include diff --git a/includes.h b/includes.h index 215c00879..9b6a63fb3 100644 --- a/includes.h +++ b/includes.h @@ -21,7 +21,6 @@ #define _GNU_SOURCE /* activate extra prototypes for glibc */ #include -#include #ifdef HAVE_LIMITS_H # include /* For PATH_MAX */ diff --git a/kex.c b/kex.c index 4b1dda814..3525307c3 100644 --- a/kex.c +++ b/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.74 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: kex.c,v 1.75 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -29,6 +29,7 @@ #include +#include #include #include diff --git a/kexdhc.c b/kexdhc.c index dbbd9bbd0..9d123e748 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: kexdhc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,6 +25,7 @@ #include "includes.h" +#include #include #include "xmalloc.h" diff --git a/kexgexc.c b/kexgexc.c index fb2049ea7..9c618ec6c 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexc.c,v 1.7 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: kexgexc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,6 +26,7 @@ #include "includes.h" +#include #include #include "xmalloc.h" diff --git a/kexgexs.c b/kexgexs.c index 2bd7ee948..0b01ed800 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexs.c,v 1.6 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: kexgexs.c,v 1.7 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -28,6 +28,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/key.c b/key.c index e6868de6d..745c474f9 100644 --- a/key.c +++ b/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.65 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: key.c,v 1.66 2006/08/01 23:22:47 stevesk Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,6 +36,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/key.h b/key.h index ee78d48d5..57af279b8 100644 --- a/key.h +++ b/key.h @@ -1,4 +1,4 @@ -/* $OpenBSD: key.h,v 1.24 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: key.h,v 1.25 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -29,6 +29,8 @@ #include #include +#include + typedef struct Key Key; enum types { KEY_RSA1, diff --git a/log.c b/log.c index 68cbfc7d9..871bc2c42 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.36 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.37 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #include #include #include diff --git a/misc.c b/misc.c index c251139f0..ef2014f61 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.62 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.63 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/misc.h b/misc.h index 139a62e05..1dded7215 100644 --- a/misc.h +++ b/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.33 2006/07/10 12:46:51 dtucker Exp $ */ +/* $OpenBSD: misc.h,v 1.34 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen @@ -18,6 +18,7 @@ #include #include +#include /* misc.c */ diff --git a/moduli.c b/moduli.c index 7b6a7b89f..a164b4f5d 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.16 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: moduli.c,v 1.17 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -43,6 +43,7 @@ #include +#include #include #include #include diff --git a/monitor_wrap.c b/monitor_wrap.c index 3728e5f55..27e2fc7c3 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.48 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.49 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -34,6 +34,7 @@ #include #include +#include #include #include "ssh.h" diff --git a/packet.c b/packet.c index 2c980d25e..acf72f77e 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.140 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.141 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -53,6 +53,7 @@ #include #include +#include #include #include #include diff --git a/progressmeter.c b/progressmeter.c index 19dc917c9..cbbb34023 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.34 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.35 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include #include diff --git a/readconf.c b/readconf.c index 6fe372796..9975c9d32 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.157 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.158 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/readpass.c b/readpass.c index 78b136f33..8af5d444d 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.45 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.46 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -34,6 +34,7 @@ # include #endif #include +#include #include #include #include diff --git a/scp.c b/scp.c index a807338bf..8d9de0135 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.153 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.154 2006/08/01 23:22:47 stevesk Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -90,6 +90,7 @@ #include #include #include +#include #include #include #include diff --git a/servconf.c b/servconf.c index 05f47355c..4edc80efe 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.161 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.162 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/session.c b/session.c index 2ddc5bd27..a6d5ad257 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.214 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.215 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -53,6 +53,7 @@ #endif #include #include +#include #include #include #include diff --git a/sftp-client.c b/sftp-client.c index 4416afa4c..b7b126d21 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.72 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.73 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/sftp-common.c b/sftp-common.c index da907ff01..3faed373e 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.c,v 1.18 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sftp-common.c,v 1.19 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/sftp-server.c b/sftp-server.c index abc9539e4..c0839782d 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.68 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/sftp.c b/sftp.c index ca91bc50b..82ef58019 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.89 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.90 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -38,6 +38,7 @@ typedef void EditLine; #endif #include #include +#include #include #include diff --git a/ssh-add.c b/ssh-add.c index eccc8ce45..a8d98fd1f 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.87 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.88 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,6 +45,7 @@ #include #include +#include #include #include #include diff --git a/ssh-agent.c b/ssh-agent.c index 478f8d1ee..54c2b9c47 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.149 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.150 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -58,6 +58,7 @@ # include #endif #include +#include #include #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index 6383d7479..d8b793e81 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.152 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.153 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -29,6 +29,7 @@ # include #endif #include +#include #include #include #include diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 3d8cc7e4a..701540841 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.71 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.72 2006/08/01 23:22:47 stevesk Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/ssh.c b/ssh.c index e08239c61..8dc987214 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.290 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.291 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include diff --git a/sshconnect.c b/sshconnect.c index 54e664830..af75bba8d 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.197 2006/08/01 11:34:36 dtucker Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.198 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -32,6 +32,7 @@ #include #endif #include +#include #include #include #include diff --git a/sshconnect1.c b/sshconnect1.c index 37024e750..f0eee3bdf 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.67 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.68 2006/08/01 23:22:47 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include diff --git a/sshconnect2.c b/sshconnect2.c index 41be0b91c..27e5442e9 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.158 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.159 2006/08/01 23:22:48 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/sshd.c b/sshd.c index 9fa179933..5cefd1024 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.341 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.342 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -64,6 +64,7 @@ #include #include #include +#include #include #include diff --git a/sshlogin.c b/sshlogin.c index 4b2808206..b01fde091 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.23 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.24 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/sshtty.c b/sshtty.c index 7cb848d2c..70668afde 100644 --- a/sshtty.c +++ b/sshtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshtty.c,v 1.10 2006/03/25 13:17:03 djm Exp $ */ +/* $OpenBSD: sshtty.c,v 1.11 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,6 +37,7 @@ #include "includes.h" +#include #include #include "sshpty.h" diff --git a/uuencode.c b/uuencode.c index 3128309cc..8a6742e95 100644 --- a/uuencode.c +++ b/uuencode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.c,v 1.22 2006/07/05 02:42:09 stevesk Exp $ */ +/* $OpenBSD: uuencode.c,v 1.23 2006/08/01 23:22:48 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include "xmalloc.h" #include "uuencode.h" diff --git a/uuencode.h b/uuencode.h index bb98bf8d6..df09eb59b 100644 --- a/uuencode.h +++ b/uuencode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.h,v 1.11 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: uuencode.h,v 1.12 2006/08/01 23:22:48 stevesk Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -26,6 +26,9 @@ #ifndef UUENCODE_H #define UUENCODE_H + +#include + int uuencode(const u_char *, u_int, char *, size_t); int uudecode(const char *, u_char *, size_t); void dump_base64(FILE *, u_char *, u_int); diff --git a/xmalloc.c b/xmalloc.c index 77e2d27c7..6aea495ef 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.25 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.26 2006/08/01 23:22:48 stevesk Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include #include -- cgit v1.2.3 From d783435315d8e604998925d5e47b663a500ed252 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 5 Aug 2006 12:39:39 +1000 Subject: - deraadt@cvs.openbsd.org 2006/08/03 03:34:42 [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c] [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c] [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c] [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ] [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c] [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c] [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c] [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c] [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c] [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c] [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c] [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h] [serverloop.c session.c session.h sftp-client.c sftp-common.c] [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c] [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c] [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c] [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h] [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h] almost entirely get rid of the culture of ".h files that include .h files" ok djm, sort of ok stevesk makes the pain stop in one easy step NB. portable commit contains everything *except* removing includes.h, as that will take a fair bit more work as we move headers that are required for portability workarounds to defines.h. (also, this step wasn't "easy") --- ChangeLog | 30 +++++++++++++++++++++++++++++- OVERVIEW | 3 +-- atomicio.c | 3 ++- atomicio.h | 7 +------ auth-bsdauth.c | 11 ++++++++++- auth-chall.c | 8 ++++++-- auth-krb5.c | 11 +++++++++-- auth-options.c | 12 ++++++++++-- auth-options.h | 6 +----- auth-passwd.c | 5 ++++- auth-rh-rsa.c | 8 ++++++-- auth-rhosts.c | 6 +++++- auth-rsa.c | 11 ++++++++--- auth-skey.c | 5 ++++- auth.c | 10 +++++++--- auth.h | 11 +---------- auth1.c | 8 +++++++- auth2-chall.c | 9 +++++++-- auth2-gss.c | 14 +++++++------- auth2-hostbased.c | 12 ++++++++---- auth2-kbdint.c | 9 +++++++-- auth2-none.c | 10 ++++++++-- auth2-passwd.c | 11 ++++++++++- auth2-pubkey.c | 12 ++++++++---- auth2.c | 10 +++++++--- authfd.c | 7 ++++--- authfd.h | 4 +--- authfile.c | 6 +++--- bufaux.c | 7 +++++-- bufbn.c | 7 +++++-- buffer.c | 3 ++- buffer.h | 38 +++++++++++++++++++++++++++++++++++++- canohost.c | 5 +++-- channels.c | 9 +++++---- channels.h | 4 +--- cipher-3des1.c | 4 +++- cipher-bf1.c | 4 +++- cipher-ctr.c | 6 ++++-- cipher.c | 5 ++++- cleanup.c | 5 ++++- clientloop.c | 8 ++++---- compat.c | 7 +++++-- compress.c | 6 +++++- deattack.c | 8 ++++++-- dh.c | 2 +- dispatch.c | 6 +++++- dns.c | 2 +- dns.h | 9 +-------- fatal.c | 4 +++- groupaccess.c | 5 +++-- groupaccess.h | 4 +--- gss-genr.c | 6 ++++-- gss-serv-krb5.c | 9 +++++++-- gss-serv.c | 10 +++++++--- hostfile.c | 4 ++-- includes.h | 3 --- kex.c | 12 ++++++------ kex.h | 8 +------- kexdh.c | 9 +++++++-- kexdhc.c | 7 ++++++- kexdhs.c | 9 ++++++++- kexgex.c | 8 ++++++-- kexgexc.c | 7 ++++++- kexgexs.c | 8 +++++++- key.c | 6 ++++-- key.h | 4 +--- log.c | 6 ++++-- log.h | 8 +------- loginrec.c | 4 +++- loginrec.h | 4 ---- mac.c | 7 ++++++- match.c | 6 ++++-- md-sha256.c | 4 +++- misc.c | 6 +++--- misc.h | 7 +------ moduli.c | 3 ++- monitor.c | 15 ++++++++++----- monitor_fdpass.c | 3 ++- monitor_mm.c | 7 +++++-- monitor_mm.h | 3 +-- monitor_wrap.c | 25 +++++++++++++------------ monitor_wrap.h | 10 +--------- msg.c | 6 +++++- nchan.c | 3 ++- openbsd-compat/port-aix.c | 7 +++++-- openbsd-compat/port-tun.h | 2 -- packet.c | 8 +++----- progressmeter.c | 3 ++- readconf.c | 7 +++++-- readconf.h | 4 +--- readpass.c | 2 +- rsa.c | 6 ++++-- scard.c | 8 +++++--- scard.h | 4 +--- scp.c | 3 ++- servconf.c | 8 ++++++-- servconf.h | 4 +--- serverloop.c | 8 ++++++-- session.c | 15 ++++++++------- session.h | 6 +----- sftp-client.c | 12 ++++++------ sftp-common.c | 6 +++--- sftp-common.h | 7 +------ sftp-glob.c | 4 ++-- sftp-server.c | 12 +++++++----- sftp.c | 6 ++++-- ssh-add.c | 5 +++-- ssh-agent.c | 5 ++--- ssh-dss.c | 5 +++-- ssh-gss.h | 4 +--- ssh-keygen.c | 3 +-- ssh-keyscan.c | 7 ++++--- ssh-keysign.c | 6 +++--- ssh-rsa.c | 6 ++++-- ssh.c | 7 +++---- ssh.h | 16 +--------------- sshconnect.c | 6 ++++-- sshconnect.h | 11 +---------- sshconnect1.c | 14 ++++++++++---- sshconnect2.c | 9 ++++++--- sshd.c | 18 +++++++++++------- sshlogin.c | 4 +++- sshlogin.h | 9 +-------- sshpty.c | 7 ++++--- sshpty.h | 10 +--------- sshtty.c | 4 +++- ttymodes.c | 6 ++++-- uidswap.c | 5 ++--- uidswap.h | 11 +---------- uuencode.c | 4 +--- uuencode.h | 8 +------- xmalloc.c | 3 +-- xmalloc.h | 7 +------ 133 files changed, 584 insertions(+), 412 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index b955ea8a4..7f48d236e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,34 @@ - stevesk@cvs.openbsd.org 2006/08/01 23:36:12 [authfile.c channels.c progressmeter.c scard.c servconf.c ssh.c] clean extra spaces + - deraadt@cvs.openbsd.org 2006/08/03 03:34:42 + [OVERVIEW atomicio.c atomicio.h auth-bsdauth.c auth-chall.c auth-krb5.c] + [auth-options.c auth-options.h auth-passwd.c auth-rh-rsa.c auth-rhosts.c] + [auth-rsa.c auth-skey.c auth.c auth.h auth1.c auth2-chall.c auth2-gss.c] + [auth2-hostbased.c auth2-kbdint.c auth2-none.c auth2-passwd.c ] + [auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufbn.c] + [buffer.c buffer.h canohost.c channels.c channels.h cipher-3des1.c] + [cipher-bf1.c cipher-ctr.c cipher.c cleanup.c clientloop.c compat.c] + [compress.c deattack.c dh.c dispatch.c dns.c dns.h fatal.c groupaccess.c] + [groupaccess.h gss-genr.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] + [kex.h kexdh.c kexdhc.c kexdhs.c kexgex.c kexgexc.c kexgexs.c key.c] + [key.h log.c log.h mac.c match.c md-sha256.c misc.c misc.h moduli.c] + [monitor.c monitor_fdpass.c monitor_mm.c monitor_mm.h monitor_wrap.c] + [monitor_wrap.h msg.c nchan.c packet.c progressmeter.c readconf.c] + [readconf.h readpass.c rsa.c scard.c scard.h scp.c servconf.c servconf.h] + [serverloop.c session.c session.h sftp-client.c sftp-common.c] + [sftp-common.h sftp-glob.c sftp-server.c sftp.c ssh-add.c ssh-agent.c] + [ssh-dss.c ssh-gss.h ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rsa.c] + [ssh.c ssh.h sshconnect.c sshconnect.h sshconnect1.c sshconnect2.c] + [sshd.c sshlogin.c sshlogin.h sshpty.c sshpty.h sshtty.c ttymodes.c] + [uidswap.c uidswap.h uuencode.c uuencode.h xmalloc.c xmalloc.h] + [loginrec.c loginrec.h openbsd-compat/port-aix.c openbsd-compat/port-tun.h] + almost entirely get rid of the culture of ".h files that include .h files" + ok djm, sort of ok stevesk + makes the pain stop in one easy step + NB. portable commit contains everything *except* removing includes.h, as + that will take a fair bit more work as we move headers that are required + for portability workarounds to defines.h. (also, this step wasn't "easy") 20060804 - (dtucker) [configure.ac] The "crippled AES" test does not work on recent @@ -5124,4 +5152,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4451 2006/08/05 01:38:40 djm Exp $ +$Id: ChangeLog,v 1.4452 2006/08/05 02:39:39 djm Exp $ diff --git a/OVERVIEW b/OVERVIEW index 64b6f75fa..2e1cc0ba3 100644 --- a/OVERVIEW +++ b/OVERVIEW @@ -162,8 +162,7 @@ these programs. - There are several other files in the distribution that contain various auxiliary routines: ssh.h the main header file for ssh (various definitions) - includes.h includes most system headers. Lots of #ifdefs. uidswap.c uid-swapping xmalloc.c "safe" malloc routines -$OpenBSD: OVERVIEW,v 1.10 2006/04/01 05:37:46 djm Exp $ +$OpenBSD: OVERVIEW,v 1.11 2006/08/03 03:34:41 deraadt Exp $ diff --git a/atomicio.c b/atomicio.c index 4ff990fd3..f651a292c 100644 --- a/atomicio.c +++ b/atomicio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.c,v 1.22 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: atomicio.c,v 1.23 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. * Copyright (c) 2005 Anil Madhavapeddy. All rights reserved. @@ -29,6 +29,7 @@ #include "includes.h" #include +#include #include #include diff --git a/atomicio.h b/atomicio.h index 05b97ab8b..2fcd25d43 100644 --- a/atomicio.h +++ b/atomicio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atomicio.h,v 1.9 2006/07/30 20:15:19 stevesk Exp $ */ +/* $OpenBSD: atomicio.h,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2006 Damien Miller. All rights reserved. @@ -29,11 +29,6 @@ #ifndef _ATOMICIO_H #define _ATOMICIO_H -#include -#include - -#include - /* * Ensure all of data on socket comes through. f==read || f==vwrite */ diff --git a/auth-bsdauth.c b/auth-bsdauth.c index c309e4a11..f718e5d38 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-bsdauth.c,v 1.9 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth-bsdauth.c,v 1.10 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -22,12 +22,21 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #ifdef BSD_AUTH #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" +#include "buffer.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" static void * diff --git a/auth-chall.c b/auth-chall.c index 023e7ee01..9c1079a17 100644 --- a/auth-chall.c +++ b/auth-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-chall.c,v 1.11 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth-chall.c,v 1.12 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,9 +25,13 @@ #include "includes.h" +#include + +#include "xmalloc.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" -#include "xmalloc.h" #include "servconf.h" /* limited protocol v1 interface to kbd-interactive authentication */ diff --git a/auth-krb5.c b/auth-krb5.c index 676b8ab1f..868288126 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-krb5.c,v 1.18 2006/05/06 08:35:40 dtucker Exp $ */ +/* $OpenBSD: auth-krb5.c,v 1.19 2006/08/03 03:34:41 deraadt Exp $ */ /* * Kerberos v5 authentication and ticket-passing routines. * @@ -30,13 +30,20 @@ #include "includes.h" +#include +#include +#include + +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "packet.h" -#include "xmalloc.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "uidswap.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #ifdef KRB5 diff --git a/auth-options.c b/auth-options.c index cd904967a..ca5e1c931 100644 --- a/auth-options.c +++ b/auth-options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.39 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth-options.c,v 1.40 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -17,17 +17,25 @@ #include #include #include +#include +#include #include "xmalloc.h" #include "match.h" #include "log.h" #include "canohost.h" +#include "buffer.h" #include "channels.h" #include "auth-options.h" #include "servconf.h" #include "misc.h" -#include "monitor_wrap.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif +#include "monitor_wrap.h" /* Flags set authorized_keys flags */ int no_port_forwarding_flag = 0; diff --git a/auth-options.h b/auth-options.h index cd2b030cd..853f8b517 100644 --- a/auth-options.h +++ b/auth-options.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.h,v 1.15 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-options.h,v 1.16 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -15,10 +15,6 @@ #ifndef AUTH_OPTIONS_H #define AUTH_OPTIONS_H -#include - -#include - /* Linked list of custom environment strings */ struct envstring { struct envstring *next; diff --git a/auth-passwd.c b/auth-passwd.c index f8df17e6a..be6283796 100644 --- a/auth-passwd.c +++ b/auth-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-passwd.c,v 1.39 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth-passwd.c,v 1.40 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,11 +43,14 @@ #include #include #include +#include #include "packet.h" #include "buffer.h" #include "log.h" #include "servconf.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "auth-options.h" diff --git a/auth-rh-rsa.c b/auth-rh-rsa.c index 8fa21e12c..eca750275 100644 --- a/auth-rh-rsa.c +++ b/auth-rh-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rh-rsa.c,v 1.41 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: auth-rh-rsa.c,v 1.42 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,17 +18,21 @@ #include #include +#include #include "packet.h" #include "uidswap.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "key.h" #include "hostfile.h" #include "pathnames.h" #include "auth.h" #include "canohost.h" - +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" /* import */ diff --git a/auth-rhosts.c b/auth-rhosts.c index 8dc4ede05..cd0a7967a 100644 --- a/auth-rhosts.c +++ b/auth-rhosts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rhosts.c,v 1.40 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth-rhosts.c,v 1.41 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,13 +25,17 @@ #include #include #include +#include #include "packet.h" +#include "buffer.h" #include "uidswap.h" #include "pathnames.h" #include "log.h" #include "servconf.h" #include "canohost.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" /* import */ diff --git a/auth-rsa.c b/auth-rsa.c index f3e27e9fa..1c66b86a4 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-rsa.c,v 1.70 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth-rsa.c,v 1.71 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -26,18 +26,23 @@ #include #include +#include "xmalloc.h" #include "rsa.h" #include "packet.h" -#include "xmalloc.h" #include "ssh1.h" #include "uidswap.h" #include "match.h" +#include "buffer.h" #include "auth-options.h" #include "pathnames.h" #include "log.h" #include "servconf.h" -#include "auth.h" +#include "key.h" #include "hostfile.h" +#include "auth.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "ssh.h" #include "misc.h" diff --git a/auth-skey.c b/auth-skey.c index 9c981ec83..d49e59b75 100644 --- a/auth-skey.c +++ b/auth-skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-skey.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth-skey.c,v 1.24 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -22,10 +22,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" #ifdef SKEY +#include + #include #include "xmalloc.h" diff --git a/auth.c b/auth.c index 88a8e22ef..fba32eb96 100644 --- a/auth.c +++ b/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.74 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth.c,v 1.75 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -51,17 +51,21 @@ #include "match.h" #include "groupaccess.h" #include "log.h" +#include "buffer.h" #include "servconf.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "auth-options.h" #include "canohost.h" -#include "buffer.h" -#include "bufaux.h" #include "uidswap.h" #include "misc.h" #include "bufaux.h" #include "packet.h" #include "loginrec.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" /* import */ diff --git a/auth.h b/auth.h index 2c7499573..26158b9dd 100644 --- a/auth.h +++ b/auth.h @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.h,v 1.56 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth.h,v 1.57 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -28,14 +28,8 @@ #ifndef AUTH_H #define AUTH_H -#include - -#include -#include #include -#include -#include "buffer.h" #include #ifdef HAVE_LOGIN_CAP @@ -48,9 +42,6 @@ #include #endif -#include "key.h" -#include "hostfile.h" - typedef struct Authctxt Authctxt; typedef struct Authmethod Authmethod; typedef struct KbdintDevice KbdintDevice; diff --git a/auth1.c b/auth1.c index 2c5585768..34dcf6266 100644 --- a/auth1.c +++ b/auth1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth1.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth1.c,v 1.70 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -17,6 +17,7 @@ #include #include #include +#include #include "xmalloc.h" #include "rsa.h" @@ -26,10 +27,15 @@ #include "log.h" #include "servconf.h" #include "compat.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "channels.h" #include "session.h" #include "uidswap.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "buffer.h" diff --git a/auth2-chall.c b/auth2-chall.c index 89b261e61..8358140b9 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.29 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.30 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -23,16 +23,21 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #include #include +#include "xmalloc.h" #include "ssh2.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "buffer.h" #include "packet.h" -#include "xmalloc.h" #include "dispatch.h" #include "log.h" #include "servconf.h" diff --git a/auth2-gss.c b/auth2-gss.c index 03210673b..67144e495 100644 --- a/auth2-gss.c +++ b/auth2-gss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-gss.c,v 1.14 2006/03/25 22:22:42 djm Exp $ */ +/* $OpenBSD: auth2-gss.c,v 1.15 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -26,18 +26,20 @@ #include "includes.h" -#ifdef GSSAPI +#include +#include "xmalloc.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "ssh2.h" -#include "xmalloc.h" #include "log.h" #include "dispatch.h" +#include "buffer.h" #include "servconf.h" #include "packet.h" -#include "monitor_wrap.h" - #include "ssh-gss.h" +#include "monitor_wrap.h" extern ServerOptions options; @@ -291,5 +293,3 @@ Authmethod method_gssapi = { userauth_gssapi, &options.gss_authentication }; - -#endif /* GSSAPI */ diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 5cb617e1c..663dec5d9 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-hostbased.c,v 1.10 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2-hostbased.c,v 1.11 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -29,18 +29,22 @@ #include #include +#include -#include "ssh2.h" #include "xmalloc.h" +#include "ssh2.h" #include "packet.h" #include "buffer.h" #include "log.h" #include "servconf.h" #include "compat.h" -#include "bufaux.h" -#include "auth.h" #include "key.h" +#include "hostfile.h" +#include "auth.h" #include "canohost.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "pathnames.h" diff --git a/auth2-kbdint.c b/auth2-kbdint.c index 796714eec..901596484 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-kbdint.c,v 1.4 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: auth2-kbdint.c,v 1.5 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,11 +25,16 @@ #include "includes.h" +#include + +#include "xmalloc.h" #include "packet.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" +#include "buffer.h" #include "servconf.h" -#include "xmalloc.h" /* import */ extern ServerOptions options; diff --git a/auth2-none.c b/auth2-none.c index d6738175f..1e4afa0e7 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-none.c,v 1.11 2006/07/09 15:15:10 stevesk Exp $ */ +/* $OpenBSD: auth2-none.c,v 1.12 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,14 +30,20 @@ #include -#include "auth.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "auth.h" #include "packet.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "atomicio.h" #include "compat.h" #include "ssh2.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" /* import */ diff --git a/auth2-passwd.c b/auth2-passwd.c index a1b65da50..421c5c25d 100644 --- a/auth2-passwd.c +++ b/auth2-passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-passwd.c,v 1.8 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2-passwd.c,v 1.9 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,12 +25,21 @@ #include "includes.h" +#include + #include +#include #include "xmalloc.h" #include "packet.h" #include "log.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" +#include "buffer.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "servconf.h" diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 41763f763..9863cd9e6 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-pubkey.c,v 1.14 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: auth2-pubkey.c,v 1.15 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -30,22 +30,26 @@ #include #include +#include +#include "xmalloc.h" #include "ssh.h" #include "ssh2.h" -#include "xmalloc.h" #include "packet.h" #include "buffer.h" #include "log.h" #include "servconf.h" #include "compat.h" -#include "bufaux.h" -#include "auth.h" #include "key.h" +#include "hostfile.h" +#include "auth.h" #include "pathnames.h" #include "uidswap.h" #include "auth-options.h" #include "canohost.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "misc.h" diff --git a/auth2.c b/auth2.c index 83d5224c9..2d880b57c 100644 --- a/auth2.c +++ b/auth2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2.c,v 1.112 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: auth2.c,v 1.113 2006/08/03 03:34:41 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -28,23 +28,27 @@ #include #include +#include #include -#include "ssh2.h" #include "xmalloc.h" +#include "ssh2.h" #include "packet.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "compat.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "dispatch.h" #include "pathnames.h" -#include "monitor_wrap.h" #include "buffer.h" #ifdef GSSAPI #include "ssh-gss.h" #endif +#include "monitor_wrap.h" /* import */ extern ServerOptions options; diff --git a/authfd.c b/authfd.c index f8ee8051d..5c910df13 100644 --- a/authfd.c +++ b/authfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.79 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: authfd.c,v 1.80 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,16 +43,17 @@ #include +#include #include #include +#include #include #include +#include "xmalloc.h" #include "ssh.h" #include "rsa.h" #include "buffer.h" -#include "bufaux.h" -#include "xmalloc.h" #include "key.h" #include "authfd.h" #include "cipher.h" diff --git a/authfd.h b/authfd.h index 8ad8f2e71..3da256112 100644 --- a/authfd.h +++ b/authfd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.h,v 1.35 2006/03/25 22:22:42 djm Exp $ */ +/* $OpenBSD: authfd.h,v 1.36 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,8 +16,6 @@ #ifndef AUTHFD_H #define AUTHFD_H -#include "buffer.h" - /* Messages for the authentication agent connection. */ #define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 #define SSH_AGENT_RSA_IDENTITIES_ANSWER 2 diff --git a/authfile.c b/authfile.c index 400e60b39..675085646 100644 --- a/authfile.c +++ b/authfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.75 2006/08/01 23:36:11 stevesk Exp $ */ +/* $OpenBSD: authfile.c,v 1.76 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -53,10 +54,9 @@ #include #include -#include "cipher.h" #include "xmalloc.h" +#include "cipher.h" #include "buffer.h" -#include "bufaux.h" #include "key.h" #include "ssh.h" #include "log.h" diff --git a/bufaux.c b/bufaux.c index a384cc685..cbdc22c64 100644 --- a/bufaux.c +++ b/bufaux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.43 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: bufaux.c,v 1.44 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -39,12 +39,15 @@ #include "includes.h" +#include + #include #include +#include -#include "bufaux.h" #include "xmalloc.h" +#include "buffer.h" #include "log.h" #include "misc.h" diff --git a/bufbn.c b/bufbn.c index aa42ea62b..6cf65d372 100644 --- a/bufbn.c +++ b/bufbn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bufbn.c,v 1.2 2006/07/22 20:48:22 stevesk Exp $*/ +/* $OpenBSD: bufbn.c,v 1.3 2006/08/03 03:34:41 deraadt Exp $*/ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -39,12 +39,15 @@ #include "includes.h" +#include + #include #include +#include -#include "bufaux.h" #include "xmalloc.h" +#include "buffer.h" #include "log.h" #include "misc.h" diff --git a/buffer.c b/buffer.c index 25868b94d..e02e1e35c 100644 --- a/buffer.c +++ b/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.30 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: buffer.c,v 1.31 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,6 +18,7 @@ #include #include +#include #include "xmalloc.h" #include "buffer.h" diff --git a/buffer.h b/buffer.h index 43414ae99..ecc4aea83 100644 --- a/buffer.h +++ b/buffer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.h,v 1.15 2006/04/16 00:48:52 djm Exp $ */ +/* $OpenBSD: buffer.h,v 1.16 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -46,4 +46,40 @@ int buffer_get_ret(Buffer *, void *, u_int); int buffer_consume_ret(Buffer *, u_int); int buffer_consume_end_ret(Buffer *, u_int); +#include + +void buffer_put_bignum(Buffer *, const BIGNUM *); +void buffer_put_bignum2(Buffer *, const BIGNUM *); +void buffer_get_bignum(Buffer *, BIGNUM *); +void buffer_get_bignum2(Buffer *, BIGNUM *); + +u_short buffer_get_short(Buffer *); +void buffer_put_short(Buffer *, u_short); + +u_int buffer_get_int(Buffer *); +void buffer_put_int(Buffer *, u_int); + +u_int64_t buffer_get_int64(Buffer *); +void buffer_put_int64(Buffer *, u_int64_t); + +int buffer_get_char(Buffer *); +void buffer_put_char(Buffer *, int); + +void *buffer_get_string(Buffer *, u_int *); +void buffer_put_string(Buffer *, const void *, u_int); +void buffer_put_cstring(Buffer *, const char *); + +#define buffer_skip_string(b) \ + do { u_int l = buffer_get_int(b); buffer_consume(b, l); } while (0) + +int buffer_put_bignum_ret(Buffer *, const BIGNUM *); +int buffer_get_bignum_ret(Buffer *, BIGNUM *); +int buffer_put_bignum2_ret(Buffer *, const BIGNUM *); +int buffer_get_bignum2_ret(Buffer *, BIGNUM *); +int buffer_get_short_ret(u_short *, Buffer *); +int buffer_get_int_ret(u_int *, Buffer *); +int buffer_get_int64_ret(u_int64_t *, Buffer *); +void *buffer_get_string_ret(Buffer *, u_int *); +int buffer_get_char_ret(char *, Buffer *); + #endif /* BUFFER_H */ diff --git a/canohost.c b/canohost.c index c236617d7..dd3972e8d 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.60 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.61 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -25,9 +25,10 @@ #include #include #include +#include -#include "packet.h" #include "xmalloc.h" +#include "packet.h" #include "log.h" #include "canohost.h" diff --git a/channels.c b/channels.c index fb4d287d6..dfa1e591b 100644 --- a/channels.c +++ b/channels.c @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.264 2006/08/01 23:36:11 stevesk Exp $ */ +/* $OpenBSD: channels.c,v 1.265 2006/08/03 03:34:41 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -41,8 +41,8 @@ #include "includes.h" -#include #include +#include #include #include #ifdef HAVE_SYS_TIME_H @@ -59,21 +59,22 @@ #include #include #include +#include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" #include "packet.h" -#include "xmalloc.h" #include "log.h" #include "misc.h" +#include "buffer.h" #include "channels.h" #include "compat.h" #include "canohost.h" #include "key.h" #include "authfd.h" #include "pathnames.h" -#include "bufaux.h" /* -- channel core */ diff --git a/channels.h b/channels.h index ed719f724..2674f096e 100644 --- a/channels.h +++ b/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.87 2006/07/21 12:43:36 dtucker Exp $ */ +/* $OpenBSD: channels.h,v 1.88 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -38,8 +38,6 @@ #ifndef CHANNEL_H #define CHANNEL_H -#include "buffer.h" - /* Definitions for channel types. */ #define SSH_CHANNEL_X11_LISTENER 1 /* Listening for inet X11 conn. */ #define SSH_CHANNEL_PORT_LISTENER 2 /* Listening on a port. */ diff --git a/cipher-3des1.c b/cipher-3des1.c index 2e8735d54..61798bfde 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-3des1.c,v 1.5 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher-3des1.c,v 1.6 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include diff --git a/cipher-bf1.c b/cipher-bf1.c index 95b4e5e93..eb4c04777 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-bf1.c,v 1.4 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher-bf1.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include diff --git a/cipher-ctr.c b/cipher-ctr.c index 105d0bd5b..9733b7d56 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-ctr.c,v 1.9 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher-ctr.c,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -16,12 +16,14 @@ */ #include "includes.h" +#include + #include #include -#include "log.h" #include "xmalloc.h" +#include "log.h" /* compatibility with old or broken OpenSSL versions */ #include "openbsd-compat/openssl-compat.h" diff --git a/cipher.c b/cipher.c index 20fa59c6a..b264063c4 100644 --- a/cipher.c +++ b/cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.80 2006/07/22 20:48:22 stevesk Exp $ */ +/* $OpenBSD: cipher.c,v 1.81 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,9 +37,12 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" #include "log.h" diff --git a/cleanup.c b/cleanup.c index 0d9f2a6d2..c41ef1c6a 100644 --- a/cleanup.c +++ b/cleanup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cleanup.c,v 1.4 2006/07/17 01:31:09 stevesk Exp $ */ +/* $OpenBSD: cleanup.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Markus Friedl * @@ -17,7 +17,10 @@ #include "config.h" +#include + #include +#include #include "log.h" diff --git a/clientloop.c b/clientloop.c index f9ffa2bb7..132d75a44 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.174 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: clientloop.c,v 1.175 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -82,20 +82,20 @@ #include #include #include +#include #include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" -#include "xmalloc.h" #include "packet.h" #include "buffer.h" #include "compat.h" #include "channels.h" #include "dispatch.h" -#include "buffer.h" -#include "bufaux.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "readconf.h" diff --git a/compat.c b/compat.c index e1a8b2bfd..da67f9410 100644 --- a/compat.c +++ b/compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compat.c,v 1.75 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: compat.c,v 1.76 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -25,12 +25,15 @@ #include "includes.h" +#include + #include #include +#include +#include "xmalloc.h" #include "buffer.h" #include "packet.h" -#include "xmalloc.h" #include "compat.h" #include "log.h" #include "match.h" diff --git a/compress.c b/compress.c index 8aba84efa..f5d30b8a6 100644 --- a/compress.c +++ b/compress.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compress.c,v 1.23 2006/03/25 13:17:01 djm Exp $ */ +/* $OpenBSD: compress.c,v 1.24 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,6 +14,10 @@ #include "includes.h" +#include + +#include + #include "log.h" #include "buffer.h" #include "zlib.h" diff --git a/deattack.c b/deattack.c index 57a747da5..b4fed7f85 100644 --- a/deattack.c +++ b/deattack.c @@ -1,4 +1,4 @@ -/* $OpenBSD: deattack.c,v 1.28 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: deattack.c,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ /* * Cryptographic attack detector for ssh - source code * @@ -20,12 +20,16 @@ #include "includes.h" +#include + #include +#include +#include +#include "xmalloc.h" #include "deattack.h" #include "log.h" #include "crc32.h" -#include "xmalloc.h" #include "misc.h" /* SSH Constants */ diff --git a/dh.c b/dh.c index 4ca949138..925eedddf 100644 --- a/dh.c +++ b/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.41 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: dh.c,v 1.42 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * diff --git a/dispatch.c b/dispatch.c index c1d98a78e..d6b63be4b 100644 --- a/dispatch.c +++ b/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.20 2006/07/23 01:11:05 stevesk Exp $ */ +/* $OpenBSD: dispatch.c,v 1.21 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -22,9 +22,13 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #include +#include #include "ssh1.h" #include "ssh2.h" diff --git a/dns.c b/dns.c index 008fc596f..229210835 100644 --- a/dns.c +++ b/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.22 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: dns.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. diff --git a/dns.h b/dns.h index 8f9601824..b2633a1fe 100644 --- a/dns.h +++ b/dns.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.h,v 1.9 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: dns.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Wesley Griffin. All rights reserved. @@ -25,13 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "includes.h" - -#include -#include - -#include - #ifndef DNS_H #define DNS_H diff --git a/fatal.c b/fatal.c index 1f2cd0bc8..5e5aa3fe1 100644 --- a/fatal.c +++ b/fatal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fatal.c,v 1.6 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: fatal.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include "log.h" diff --git a/groupaccess.c b/groupaccess.c index 3431691b9..e73f62b22 100644 --- a/groupaccess.c +++ b/groupaccess.c @@ -1,4 +1,4 @@ -/* $OpenBSD: groupaccess.c,v 1.11 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: groupaccess.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. * @@ -30,9 +30,10 @@ #include #include +#include -#include "groupaccess.h" #include "xmalloc.h" +#include "groupaccess.h" #include "match.h" #include "log.h" diff --git a/groupaccess.h b/groupaccess.h index b0baccfbf..04b449894 100644 --- a/groupaccess.h +++ b/groupaccess.h @@ -1,4 +1,4 @@ -/* $OpenBSD: groupaccess.h,v 1.6 2006/07/02 22:45:59 stevesk Exp $ */ +/* $OpenBSD: groupaccess.h,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Kevin Steves. All rights reserved. @@ -27,8 +27,6 @@ #ifndef GROUPACCESS_H #define GROUPACCESS_H -#include - int ga_init(const char *, gid_t); int ga_match(char * const *, int); void ga_free(void); diff --git a/gss-genr.c b/gss-genr.c index 93dbeeebb..da39479e1 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-genr.c,v 1.12 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: gss-genr.c,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,13 +28,15 @@ #ifdef GSSAPI +#include #include +#include #include #include #include "xmalloc.h" -#include "bufaux.h" +#include "buffer.h" #include "log.h" #include "ssh2.h" diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c index 7b78cfe0a..006bedad9 100644 --- a/gss-serv-krb5.c +++ b/gss-serv-krb5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv-krb5.c,v 1.6 2006/07/02 18:36:47 stevesk Exp $ */ +/* $OpenBSD: gss-serv-krb5.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -29,13 +29,18 @@ #ifdef GSSAPI #ifdef KRB5 +#include + #include -#include "auth.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "auth.h" #include "log.h" #include "servconf.h" +#include "buffer.h" #include "ssh-gss.h" extern ServerOptions options; diff --git a/gss-serv.c b/gss-serv.c index b5c5538fe..296f63a89 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-serv.c,v 1.19 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: gss-serv.c,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -28,15 +28,19 @@ #ifdef GSSAPI +#include + #include #include -#include "bufaux.h" +#include "xmalloc.h" +#include "buffer.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "log.h" #include "channels.h" #include "session.h" -#include "xmalloc.h" #include "misc.h" #include "ssh-gss.h" diff --git a/hostfile.c b/hostfile.c index 7ac69e776..08ba44264 100644 --- a/hostfile.c +++ b/hostfile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hostfile.c,v 1.44 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: hostfile.c,v 1.45 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -50,11 +50,11 @@ #include #include +#include "xmalloc.h" #include "match.h" #include "key.h" #include "hostfile.h" #include "log.h" -#include "xmalloc.h" static int extract_salt(const char *s, u_int l, char *salt, size_t salt_len) diff --git a/includes.h b/includes.h index 9b6a63fb3..8e600567d 100644 --- a/includes.h +++ b/includes.h @@ -25,9 +25,6 @@ #ifdef HAVE_LIMITS_H # include /* For PATH_MAX */ #endif -#ifdef HAVE_GETOPT_H -# include -#endif #ifdef HAVE_BSTRING_H # include #endif diff --git a/kex.c b/kex.c index 3525307c3..0c36519a1 100644 --- a/kex.c +++ b/kex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.c,v 1.75 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kex.c,v 1.76 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. * @@ -27,21 +27,21 @@ #include -#include - +#include #include #include #include -#include "ssh2.h" +#include + #include "xmalloc.h" +#include "ssh2.h" #include "buffer.h" -#include "bufaux.h" #include "packet.h" #include "compat.h" #include "cipher.h" -#include "kex.h" #include "key.h" +#include "kex.h" #include "log.h" #include "mac.h" #include "match.h" diff --git a/kex.h b/kex.h index a48c5c885..b1b20f500 100644 --- a/kex.h +++ b/kex.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kex.h,v 1.43 2006/07/23 01:11:05 stevesk Exp $ */ +/* $OpenBSD: kex.h,v 1.44 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -29,12 +29,6 @@ #include #include -#include - -#include "buffer.h" -#include "cipher.h" -#include "key.h" - #define KEX_DH1 "diffie-hellman-group1-sha1" #define KEX_DH14 "diffie-hellman-group14-sha1" #define KEX_DHGEX_SHA1 "diffie-hellman-group-exchange-sha1" diff --git a/kexdh.c b/kexdh.c index 2d13127b8..56e22f5bc 100644 --- a/kexdh.c +++ b/kexdh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdh.c,v 1.22 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexdh.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,11 +25,16 @@ #include "includes.h" +#include + +#include + #include #include "buffer.h" -#include "bufaux.h" #include "ssh2.h" +#include "key.h" +#include "cipher.h" #include "kex.h" void diff --git a/kexdhc.c b/kexdhc.c index 9d123e748..bf875ae07 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kexdhc.c,v 1.9 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,11 +25,16 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" diff --git a/kexdhs.c b/kexdhs.c index c64cd77cb..7d2c21eed 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdhs.c,v 1.6 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: kexdhs.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,15 +25,22 @@ #include "includes.h" +#include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" #include "dh.h" #include "ssh2.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" void diff --git a/kexgex.c b/kexgex.c index 5ab6745a3..b60ab5c53 100644 --- a/kexgex.c +++ b/kexgex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgex.c,v 1.26 2006/03/25 13:17:02 djm Exp $ */ +/* $OpenBSD: kexgex.c,v 1.27 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,10 +26,14 @@ #include "includes.h" +#include + #include +#include #include "buffer.h" -#include "bufaux.h" +#include "key.h" +#include "cipher.h" #include "kex.h" #include "ssh2.h" diff --git a/kexgexc.c b/kexgexc.c index 9c618ec6c..fc48880d4 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexc.c,v 1.8 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kexgexc.c,v 1.9 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -26,11 +26,16 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" diff --git a/kexgexs.c b/kexgexs.c index 0b01ed800..7599f2af4 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexgexs.c,v 1.7 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: kexgexs.c,v 1.8 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Niels Provos. All rights reserved. * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -30,15 +30,21 @@ #include #include +#include #include "xmalloc.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "log.h" #include "packet.h" #include "dh.h" #include "ssh2.h" #include "compat.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" void diff --git a/key.c b/key.c index 745c474f9..40aab20ea 100644 --- a/key.c +++ b/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.66 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: key.c,v 1.67 2006/08/03 03:34:42 deraadt Exp $ */ /* * read_bignum(): * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -32,8 +32,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" +#include + #include #include @@ -44,7 +47,6 @@ #include "rsa.h" #include "uuencode.h" #include "buffer.h" -#include "bufaux.h" #include "log.h" Key * diff --git a/key.h b/key.h index 57af279b8..6873dd793 100644 --- a/key.h +++ b/key.h @@ -1,4 +1,4 @@ -/* $OpenBSD: key.h,v 1.25 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: key.h,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -29,8 +29,6 @@ #include #include -#include - typedef struct Key Key; enum types { KEY_RSA1, diff --git a/log.c b/log.c index 871bc2c42..6eac73743 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.37 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.38 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,6 +36,8 @@ #include "includes.h" +#include + #include #include #include @@ -46,8 +48,8 @@ # include #endif -#include "log.h" #include "xmalloc.h" +#include "log.h" static LogLevel log_level = SYSLOG_LEVEL_INFO; static int log_on_stderr = 1; diff --git a/log.h b/log.h index 15ebc93b5..a8e788a2d 100644 --- a/log.h +++ b/log.h @@ -1,4 +1,4 @@ -/* $OpenBSD: log.h,v 1.13 2006/07/10 16:37:36 stevesk Exp $ */ +/* $OpenBSD: log.h,v 1.14 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -15,12 +15,6 @@ #ifndef SSH_LOG_H #define SSH_LOG_H -#include "includes.h" - -#include - -#include /* Needed for LOG_AUTHPRIV (if present) */ - /* Supported syslog facilities and levels. */ typedef enum { SYSLOG_FACILITY_DAEMON, diff --git a/loginrec.c b/loginrec.c index 955d42e8f..7850312b6 100644 --- a/loginrec.c +++ b/loginrec.c @@ -159,8 +159,10 @@ #include #include -#include "ssh.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "ssh.h" #include "loginrec.h" #include "log.h" #include "atomicio.h" diff --git a/loginrec.h b/loginrec.h index 4fe24ac2a..859e1a630 100644 --- a/loginrec.h +++ b/loginrec.h @@ -31,10 +31,6 @@ #include "includes.h" -#include -#include -#include - /** ** you should use the login_* calls to work around platform dependencies **/ diff --git a/mac.c b/mac.c index a59e7edf1..edf9b69bd 100644 --- a/mac.c +++ b/mac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mac.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: mac.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -25,13 +25,18 @@ #include "includes.h" +#include + #include #include +#include #include "xmalloc.h" #include "log.h" #include "cipher.h" +#include "buffer.h" +#include "key.h" #include "kex.h" #include "mac.h" #include "misc.h" diff --git a/match.c b/match.c index 8f12ef539..e3c993073 100644 --- a/match.c +++ b/match.c @@ -1,4 +1,4 @@ -/* $OpenBSD: match.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: match.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,11 +37,13 @@ #include "includes.h" +#include + #include #include -#include "match.h" #include "xmalloc.h" +#include "match.h" /* * Returns true if the given string matches the pattern (which may contain ? diff --git a/md-sha256.c b/md-sha256.c index 063a1014f..8c1b3b92d 100644 --- a/md-sha256.c +++ b/md-sha256.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md-sha256.c,v 1.4 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: md-sha256.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2005 Damien Miller * @@ -18,6 +18,8 @@ /* EVP wrapper for SHA256 */ #include "includes.h" + +#include #include #if !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) diff --git a/misc.c b/misc.c index ef2014f61..78bca2fae 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.63 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: misc.c,v 1.64 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -26,8 +26,8 @@ #include "includes.h" -#include #include +#include #include #include @@ -50,9 +50,9 @@ #include #endif +#include "xmalloc.h" #include "misc.h" #include "log.h" -#include "xmalloc.h" #include "ssh.h" /* remove newline at end of string */ diff --git a/misc.h b/misc.h index 1dded7215..072470bad 100644 --- a/misc.h +++ b/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.34 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: misc.h,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -15,11 +15,6 @@ #ifndef _MISC_H #define _MISC_H -#include - -#include -#include - /* misc.c */ char *chop(char *); diff --git a/moduli.c b/moduli.c index a164b4f5d..e18929bad 100644 --- a/moduli.c +++ b/moduli.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moduli.c,v 1.17 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: moduli.c,v 1.18 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 1994 Phil Karn * Copyright 1996-1998, 2003 William Allen Simpson @@ -46,6 +46,7 @@ #include #include #include +#include #include #include "xmalloc.h" diff --git a/monitor.c b/monitor.c index 325179854..595aae1a8 100644 --- a/monitor.c +++ b/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.84 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: monitor.c,v 1.85 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -30,6 +30,7 @@ #include #include #include +#include "openbsd-compat/sys-tree.h" #include #include @@ -48,8 +49,13 @@ #include +#include "xmalloc.h" #include "ssh.h" +#include "key.h" +#include "buffer.h" +#include "hostfile.h" #include "auth.h" +#include "cipher.h" #include "kex.h" #include "dh.h" #ifdef TARGET_OS_MAC /* XXX Broken krb5 headers on Mac */ @@ -70,17 +76,16 @@ #include "servconf.h" #include "monitor.h" #include "monitor_mm.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "monitor_fdpass.h" -#include "xmalloc.h" #include "misc.h" -#include "buffer.h" -#include "bufaux.h" #include "compat.h" #include "ssh2.h" #ifdef GSSAPI -#include "ssh-gss.h" static Gssctxt *gsscontext = NULL; #endif diff --git a/monitor_fdpass.c b/monitor_fdpass.c index d3e65cbaa..c5fc4c397 100644 --- a/monitor_fdpass.c +++ b/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.11 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. @@ -32,6 +32,7 @@ #include #include +#include #include "log.h" #include "monitor_fdpass.h" diff --git a/monitor_mm.c b/monitor_mm.c index 89a8c9b49..dab747532 100644 --- a/monitor_mm.c +++ b/monitor_mm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.c,v 1.14 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: monitor_mm.c,v 1.15 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. @@ -26,16 +26,19 @@ #include "includes.h" +#include #ifdef HAVE_SYS_MMAN_H #include #endif #include +#include "openbsd-compat/sys-tree.h" #include +#include #include -#include "ssh.h" #include "xmalloc.h" +#include "ssh.h" #include "log.h" #include "monitor_mm.h" diff --git a/monitor_mm.h b/monitor_mm.h index 3499c7521..36a07a06d 100644 --- a/monitor_mm.h +++ b/monitor_mm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.h,v 1.3 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: monitor_mm.h,v 1.4 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos @@ -27,7 +27,6 @@ #ifndef _MM_H_ #define _MM_H_ -#include "openbsd-compat/sys-tree.h" struct mm_share { RB_ENTRY(mm_share) next; diff --git a/monitor_wrap.c b/monitor_wrap.c index 27e2fc7c3..52ea17592 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.49 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.50 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -29,21 +29,25 @@ #include -#include -#include - #include #include +#include #include #include +#include +#include + +#include "xmalloc.h" #include "ssh.h" #include "dh.h" +#include "buffer.h" +#include "key.h" +#include "cipher.h" #include "kex.h" +#include "hostfile.h" #include "auth.h" #include "auth-options.h" -#include "buffer.h" -#include "bufaux.h" #include "packet.h" #include "mac.h" #include "log.h" @@ -55,21 +59,18 @@ #include "zlib.h" #endif #include "monitor.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" -#include "xmalloc.h" #include "atomicio.h" #include "monitor_fdpass.h" #include "misc.h" #include "servconf.h" -#include "auth.h" #include "channels.h" #include "session.h" -#ifdef GSSAPI -#include "ssh-gss.h" -#endif - /* Imports */ extern int compat20; extern Newkeys *newkeys[]; diff --git a/monitor_wrap.h b/monitor_wrap.h index fd5cccd08..329189c2a 100644 --- a/monitor_wrap.h +++ b/monitor_wrap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.h,v 1.19 2006/07/14 01:15:28 stevesk Exp $ */ +/* $OpenBSD: monitor_wrap.h,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 2002 Niels Provos @@ -28,13 +28,6 @@ #ifndef _MM_WRAP_H_ #define _MM_WRAP_H_ -#include - -#include - -#include "key.h" -#include "buffer.h" - extern int use_privsep; #define PRIVSEP(x) (use_privsep ? mm_##x : x) @@ -61,7 +54,6 @@ int mm_auth_rsa_verify_response(Key *, BIGNUM *, u_char *); BIGNUM *mm_auth_rsa_generate_challenge(Key *); #ifdef GSSAPI -#include "ssh-gss.h" OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID); OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *, gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *); diff --git a/msg.c b/msg.c index 322472668..cd5f98c4f 100644 --- a/msg.c +++ b/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.14 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: msg.c,v 1.15 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -22,13 +22,17 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" #include +#include #include +#include #include #include +#include #include "buffer.h" #include "log.h" diff --git a/nchan.c b/nchan.c index 78908c3c6..ad461f4af 100644 --- a/nchan.c +++ b/nchan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nchan.c,v 1.56 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: nchan.c,v 1.57 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. * @@ -30,6 +30,7 @@ #include #include +#include #include "ssh1.h" #include "ssh2.h" diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 2d56e7e4a..a7ced57e9 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c @@ -25,11 +25,14 @@ * */ #include "includes.h" + +#include "xmalloc.h" +#include "buffer.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" #include "ssh.h" #include "log.h" -#include "xmalloc.h" -#include "buffer.h" #ifdef _AIX diff --git a/openbsd-compat/port-tun.h b/openbsd-compat/port-tun.h index 86d9272b4..9f7a98614 100644 --- a/openbsd-compat/port-tun.h +++ b/openbsd-compat/port-tun.h @@ -17,8 +17,6 @@ #ifndef _PORT_TUN_H #define _PORT_TUN_H -#include "channels.h" - #if defined(SSH_TUN_LINUX) || defined(SSH_TUN_FREEBSD) # define CUSTOM_SYS_TUN_OPEN int sys_tun_open(int, int); diff --git a/packet.c b/packet.c index acf72f77e..f2e03f800 100644 --- a/packet.c +++ b/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.141 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: packet.c,v 1.142 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -57,22 +57,20 @@ #include #include #include +#include #include "xmalloc.h" #include "buffer.h" #include "packet.h" -#include "bufaux.h" #include "crc32.h" - #include "compress.h" #include "deattack.h" #include "channels.h" - #include "compat.h" #include "ssh1.h" #include "ssh2.h" - #include "cipher.h" +#include "key.h" #include "kex.h" #include "mac.h" #include "log.h" diff --git a/progressmeter.c b/progressmeter.c index e8534fa2f..0f95222d2 100644 --- a/progressmeter.c +++ b/progressmeter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: progressmeter.c,v 1.36 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: progressmeter.c,v 1.37 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2003 Nils Nordman. All rights reserved. * @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/readconf.c b/readconf.c index 9975c9d32..c57ea0c82 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.158 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: readconf.c,v 1.159 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -23,19 +23,22 @@ #include #include #include +#include #include #include #include -#include "ssh.h" #include "xmalloc.h" +#include "ssh.h" #include "compat.h" #include "cipher.h" #include "pathnames.h" #include "log.h" +#include "key.h" #include "readconf.h" #include "match.h" #include "misc.h" +#include "buffer.h" #include "kex.h" #include "mac.h" diff --git a/readconf.h b/readconf.h index e99b1ff25..d484f258e 100644 --- a/readconf.h +++ b/readconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.h,v 1.70 2006/07/11 18:50:48 markus Exp $ */ +/* $OpenBSD: readconf.h,v 1.71 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,8 +16,6 @@ #ifndef READCONF_H #define READCONF_H -#include "key.h" - /* Data structure for representing a forwarding request. */ typedef struct { diff --git a/readpass.c b/readpass.c index 8af5d444d..bd144c2e3 100644 --- a/readpass.c +++ b/readpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readpass.c,v 1.46 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: readpass.c,v 1.47 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * diff --git a/rsa.c b/rsa.c index c656291ed..875b486c4 100644 --- a/rsa.c +++ b/rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.c,v 1.27 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: rsa.c,v 1.28 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -62,11 +62,13 @@ #include "includes.h" +#include + #include +#include "xmalloc.h" #include "rsa.h" #include "log.h" -#include "xmalloc.h" void rsa_public_encrypt(BIGNUM *out, BIGNUM *in, RSA *key) diff --git a/scard.c b/scard.c index e22da596f..a2d28cba1 100644 --- a/scard.c +++ b/scard.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scard.c,v 1.34 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: scard.c,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -26,14 +26,16 @@ #include "includes.h" #if defined(SMARTCARD) && defined(USE_SECTOK) -#include +#include #include #include +#include + +#include "xmalloc.h" #include "key.h" #include "log.h" -#include "xmalloc.h" #include "misc.h" #include "scard.h" diff --git a/scard.h b/scard.h index 146182261..82efe4839 100644 --- a/scard.h +++ b/scard.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scard.h,v 1.13 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: scard.h,v 1.14 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -27,8 +27,6 @@ #ifndef SCARD_H #define SCARD_H -#include "key.h" - #define SCARD_ERROR_FAIL -1 #define SCARD_ERROR_NOCARD -2 #define SCARD_ERROR_APPLET -3 diff --git a/scp.c b/scp.c index 8d9de0135..56a3e79ff 100644 --- a/scp.c +++ b/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.154 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: scp.c,v 1.155 2006/08/03 03:34:42 deraadt Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -82,6 +82,7 @@ # include #endif #include +#include #include #include diff --git a/servconf.c b/servconf.c index b1fc45c50..5884b95be 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.163 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: servconf.c,v 1.164 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -19,16 +19,20 @@ #include #include #include +#include #include +#include +#include "xmalloc.h" #include "ssh.h" #include "log.h" +#include "buffer.h" #include "servconf.h" -#include "xmalloc.h" #include "compat.h" #include "pathnames.h" #include "misc.h" #include "cipher.h" +#include "key.h" #include "kex.h" #include "mac.h" #include "match.h" diff --git a/servconf.h b/servconf.h index 0add6518d..2593b1cd1 100644 --- a/servconf.h +++ b/servconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.h,v 1.77 2006/07/21 12:43:36 dtucker Exp $ */ +/* $OpenBSD: servconf.h,v 1.78 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,8 +16,6 @@ #ifndef SERVCONF_H #define SERVCONF_H -#include "buffer.h" - #define MAX_PORTS 256 /* Max # ports. */ #define MAX_ALLOW_USERS 256 /* Max # users on allow list. */ diff --git a/serverloop.c b/serverloop.c index 77c4a5a27..6e5fdc2d8 100644 --- a/serverloop.c +++ b/serverloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: serverloop.c,v 1.143 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: serverloop.c,v 1.144 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -54,6 +54,7 @@ #include #include #include +#include #include "xmalloc.h" #include "packet.h" @@ -66,13 +67,16 @@ #include "compat.h" #include "ssh1.h" #include "ssh2.h" +#include "key.h" +#include "cipher.h" +#include "kex.h" +#include "hostfile.h" #include "auth.h" #include "session.h" #include "dispatch.h" #include "auth-options.h" #include "serverloop.h" #include "misc.h" -#include "kex.h" extern ServerOptions options; diff --git a/session.c b/session.c index a6d5ad257..1d63f9f50 100644 --- a/session.c +++ b/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.215 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.216 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -58,10 +58,10 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" -#include "xmalloc.h" #include "sshpty.h" #include "packet.h" #include "buffer.h" @@ -69,7 +69,12 @@ #include "uidswap.h" #include "compat.h" #include "channels.h" -#include "bufaux.h" +#include "key.h" +#include "cipher.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif +#include "hostfile.h" #include "auth.h" #include "auth-options.h" #include "pathnames.h" @@ -86,10 +91,6 @@ #include #endif -#ifdef GSSAPI -#include "ssh-gss.h" -#endif - /* func */ Session *session_new(void); diff --git a/session.h b/session.h index c3a12821f..ee9338e4f 100644 --- a/session.h +++ b/session.h @@ -1,4 +1,4 @@ -/* $OpenBSD: session.h,v 1.28 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: session.h,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -26,10 +26,6 @@ #ifndef SESSION_H #define SESSION_H -#include - -#include - #define TTYSZ 64 typedef struct Session Session; struct Session { diff --git a/sftp-client.c b/sftp-client.c index b7b126d21..e31b2cfaf 100644 --- a/sftp-client.c +++ b/sftp-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.73 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.74 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -24,25 +24,25 @@ #include #include +#include "openbsd-compat/sys-queue.h" #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_SYS_TIME_H # include #endif +#include #include #include #include +#include #include #include #include -#include "openbsd-compat/sys-queue.h" - -#include "buffer.h" -#include "bufaux.h" #include "xmalloc.h" +#include "buffer.h" #include "log.h" #include "atomicio.h" #include "progressmeter.h" @@ -82,7 +82,7 @@ send_msg(int fd, Buffer *m) iov[0].iov_len = sizeof(mlen); iov[1].iov_base = buffer_ptr(m); iov[1].iov_len = buffer_len(m); - + if (atomiciov(writev, fd, iov, 2) != buffer_len(m) + sizeof(mlen)) fatal("Couldn't send packet: %s", strerror(errno)); diff --git a/sftp-common.c b/sftp-common.c index 3faed373e..7ebadcc53 100644 --- a/sftp-common.c +++ b/sftp-common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.c,v 1.19 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp-common.c,v 1.20 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Damien Miller. All rights reserved. @@ -35,11 +35,11 @@ #include #include #include +#include +#include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "log.h" -#include "xmalloc.h" #include "sftp.h" #include "sftp-common.h" diff --git a/sftp-common.h b/sftp-common.h index 9a64dc522..9b5848462 100644 --- a/sftp-common.h +++ b/sftp-common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-common.h,v 1.9 2006/07/10 16:01:57 stevesk Exp $ */ +/* $OpenBSD: sftp-common.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -25,11 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -#include - -#include "buffer.h" - /* Maximum packet that we are willing to send/accept */ #define SFTP_MAX_MSG_LENGTH (256 * 1024) diff --git a/sftp-glob.c b/sftp-glob.c index f8549ea76..cdc270827 100644 --- a/sftp-glob.c +++ b/sftp-glob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-glob.c,v 1.21 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: sftp-glob.c,v 1.22 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -26,8 +26,8 @@ #include #include "xmalloc.h" - #include "sftp.h" +#include "buffer.h" #include "sftp-common.h" #include "sftp-client.h" diff --git a/sftp-server.c b/sftp-server.c index c0839782d..c57958b0f 100644 --- a/sftp-server.c +++ b/sftp-server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.69 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.70 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -14,6 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include "includes.h" #include @@ -30,13 +31,14 @@ #include #include #include +#include #include #include +#include +#include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "log.h" -#include "xmalloc.h" #include "misc.h" #include "uidswap.h" @@ -135,7 +137,7 @@ string_from_portable(int pflags) #define PAPPEND(str) { \ if (*ret != '\0') \ strlcat(ret, ",", sizeof(ret)); \ - strlcat(ret, str, sizeof(ret)); \ + strlcat(ret, str, sizeof(ret)); \ } if (pflags & SSH2_FXF_READ) @@ -1225,7 +1227,7 @@ main(int argc, char **argv) case 'c': /* * Ignore all arguments if we are invoked as a - * shell using "sftp-server -c command" + * shell using "sftp-server -c command" */ skipargs = 1; break; diff --git a/sftp.c b/sftp.c index 82ef58019..cf3dea048 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.90 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sftp.c,v 1.91 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -18,10 +18,10 @@ #include "includes.h" #include +#include #ifdef HAVE_SYS_STAT_H # include #endif -#include #include #include #include @@ -41,6 +41,7 @@ typedef void EditLine; #include #include #include +#include #include "xmalloc.h" #include "log.h" @@ -48,6 +49,7 @@ typedef void EditLine; #include "misc.h" #include "sftp.h" +#include "buffer.h" #include "sftp-common.h" #include "sftp-client.h" diff --git a/ssh-add.c b/ssh-add.c index a8d98fd1f..518f47066 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-add.c,v 1.88 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-add.c,v 1.89 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -50,11 +50,12 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "rsa.h" #include "log.h" -#include "xmalloc.h" #include "key.h" +#include "buffer.h" #include "authfd.h" #include "authfile.h" #include "pathnames.h" diff --git a/ssh-agent.c b/ssh-agent.c index 54c2b9c47..e43faae42 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-agent.c,v 1.150 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-agent.c,v 1.151 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -64,11 +64,10 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "rsa.h" #include "buffer.h" -#include "bufaux.h" -#include "xmalloc.h" #include "key.h" #include "authfd.h" #include "compat.h" diff --git a/ssh-dss.c b/ssh-dss.c index a8d45a2b4..448f704f6 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-dss.c,v 1.22 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ssh-dss.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -25,6 +25,8 @@ #include "includes.h" +#include + #include #include @@ -32,7 +34,6 @@ #include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "compat.h" #include "log.h" #include "key.h" diff --git a/ssh-gss.h b/ssh-gss.h index d3fd79bf2..0837c9b76 100644 --- a/ssh-gss.h +++ b/ssh-gss.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-gss.h,v 1.6 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: ssh-gss.h,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. * @@ -28,8 +28,6 @@ #ifdef GSSAPI -#include "buffer.h" - #ifdef HAVE_GSSAPI_H #include #elif defined(HAVE_GSSAPI_GSSAPI_H) diff --git a/ssh-keygen.c b/ssh-keygen.c index d8b793e81..c607e257e 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.153 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.154 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1994 Tatu Ylonen , Espoo, Finland @@ -40,7 +40,6 @@ #include "authfile.h" #include "uuencode.h" #include "buffer.h" -#include "bufaux.h" #include "pathnames.h" #include "log.h" #include "misc.h" diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 701540841..64d4d0870 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keyscan.c,v 1.72 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: ssh-keyscan.c,v 1.73 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright 1995, 1996 by David Mazieres . * @@ -23,20 +23,21 @@ #include #include #include +#include #include #include #include "xmalloc.h" #include "ssh.h" #include "ssh1.h" +#include "buffer.h" #include "key.h" +#include "cipher.h" #include "kex.h" #include "compat.h" #include "myproposal.h" #include "packet.h" #include "dispatch.h" -#include "buffer.h" -#include "bufaux.h" #include "log.h" #include "atomicio.h" #include "misc.h" diff --git a/ssh-keysign.c b/ssh-keysign.c index 89fdbda36..1ddb2a058 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keysign.c,v 1.28 2006/07/26 13:57:17 stevesk Exp $ */ +/* $OpenBSD: ssh-keysign.c,v 1.29 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -22,6 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "includes.h" #include @@ -37,14 +38,13 @@ #include #include +#include "xmalloc.h" #include "log.h" #include "key.h" #include "ssh.h" #include "ssh2.h" #include "misc.h" -#include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "authfile.h" #include "msg.h" #include "canohost.h" diff --git a/ssh-rsa.c b/ssh-rsa.c index 236f77aac..28444c1f9 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-rsa.c,v 1.38 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ssh-rsa.c,v 1.39 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000, 2003 Markus Friedl * @@ -14,8 +14,11 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ + #include "includes.h" +#include + #include #include @@ -24,7 +27,6 @@ #include "xmalloc.h" #include "log.h" #include "buffer.h" -#include "bufaux.h" #include "key.h" #include "compat.h" #include "ssh.h" diff --git a/ssh.c b/ssh.c index 10dd8777a..07a4ca3c8 100644 --- a/ssh.c +++ b/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.292 2006/08/01 23:36:12 stevesk Exp $ */ +/* $OpenBSD: ssh.c,v 1.293 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -69,15 +69,14 @@ #include #include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" #include "compat.h" #include "cipher.h" -#include "xmalloc.h" #include "packet.h" #include "buffer.h" -#include "bufaux.h" #include "channels.h" #include "key.h" #include "authfd.h" @@ -1256,7 +1255,7 @@ load_public_identity_files(void) cp = tilde_expand_filename(options.identity_files[i], original_real_uid); filename = percent_expand(cp, "d", pw->pw_dir, - "u", pw->pw_name, "l", thishost, "h", host, + "u", pw->pw_name, "l", thishost, "h", host, "r", options.user, (char *)NULL); xfree(cp); public = key_load_public(filename, NULL); diff --git a/ssh.h b/ssh.h index ed5fb9aaa..186cfff96 100644 --- a/ssh.h +++ b/ssh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.h,v 1.77 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: ssh.h,v 1.78 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -12,18 +12,6 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef SSH_H -#define SSH_H - -#include /* For struct sockaddr_in */ -#include /* For struct pw */ -#include /* For va_list */ -#include /* For LOG_AUTH and friends */ -#include /* For struct sockaddr_storage */ -#ifdef HAVE_SYS_SELECT_H -# include -#endif - /* Cipher used for encrypting authentication files. */ #define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES @@ -112,5 +100,3 @@ /* Listen backlog for sshd, ssh-agent and forwarding sockets */ #define SSH_LISTEN_BACKLOG 128 - -#endif /* SSH_H */ diff --git a/sshconnect.c b/sshconnect.c index af75bba8d..71ca4ec52 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.198 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.199 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,8 +37,10 @@ #include #include -#include "ssh.h" #include "xmalloc.h" +#include "key.h" +#include "hostfile.h" +#include "ssh.h" #include "rsa.h" #include "buffer.h" #include "packet.h" diff --git a/sshconnect.h b/sshconnect.h index 0b3896f9d..4e66bbffc 100644 --- a/sshconnect.h +++ b/sshconnect.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.h,v 1.22 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: sshconnect.h,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -23,13 +23,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SSHCONNECT_H -#define SSHCONNECT_H - -#include -#include - -#include typedef struct Sensitive Sensitive; struct Sensitive { @@ -74,5 +67,3 @@ int ssh_local_cmd(const char *); strerror(errno)); \ errno = save_errno; \ } while (0) - -#endif diff --git a/sshconnect1.c b/sshconnect1.c index f0eee3bdf..51f1f8088 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect1.c,v 1.68 2006/08/01 23:22:47 stevesk Exp $ */ +/* $OpenBSD: sshconnect1.c,v 1.69 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -15,30 +15,36 @@ #include "includes.h" +#include +#include + #include #include #include #include #include +#include +#include +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" -#include "xmalloc.h" #include "rsa.h" #include "buffer.h" #include "packet.h" +#include "key.h" +#include "cipher.h" #include "kex.h" #include "uidswap.h" #include "log.h" #include "readconf.h" -#include "key.h" #include "authfd.h" #include "sshconnect.h" #include "authfile.h" #include "misc.h" -#include "cipher.h" #include "canohost.h" +#include "hostfile.h" #include "auth.h" /* Session id for the current session. */ diff --git a/sshconnect2.c b/sshconnect2.c index 27e5442e9..e58d078c4 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.159 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.160 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -26,24 +26,27 @@ #include "includes.h" #include +#include #include #include #include +#include +#include #include #include #include #include "openbsd-compat/sys-queue.h" +#include "xmalloc.h" #include "ssh.h" #include "ssh2.h" -#include "xmalloc.h" #include "buffer.h" #include "packet.h" #include "compat.h" -#include "bufaux.h" #include "cipher.h" +#include "key.h" #include "kex.h" #include "myproposal.h" #include "sshconnect.h" diff --git a/sshd.c b/sshd.c index 5cefd1024..52c21e500 100644 --- a/sshd.c +++ b/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.342 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshd.c,v 1.343 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,14 +45,15 @@ #include "includes.h" #include +#include +#include #ifdef HAVE_SYS_STAT_H # include #endif -#include -#include #ifdef HAVE_SYS_TIME_H # include #endif +#include "openbsd-compat/sys-tree.h" #include #include @@ -77,28 +78,28 @@ #include #endif +#include "xmalloc.h" #include "ssh.h" #include "ssh1.h" #include "ssh2.h" -#include "xmalloc.h" #include "rsa.h" #include "sshpty.h" #include "packet.h" #include "log.h" +#include "buffer.h" #include "servconf.h" #include "uidswap.h" #include "compat.h" -#include "buffer.h" -#include "bufaux.h" #include "cipher.h" -#include "kex.h" #include "key.h" +#include "kex.h" #include "dh.h" #include "myproposal.h" #include "authfile.h" #include "pathnames.h" #include "atomicio.h" #include "canohost.h" +#include "hostfile.h" #include "auth.h" #include "misc.h" #include "msg.h" @@ -107,6 +108,9 @@ #include "session.h" #include "monitor_mm.h" #include "monitor.h" +#ifdef GSSAPI +#include "ssh-gss.h" +#endif #include "monitor_wrap.h" #include "monitor_fdpass.h" #include "version.h" diff --git a/sshlogin.c b/sshlogin.c index b01fde091..fba8a4d24 100644 --- a/sshlogin.c +++ b/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.24 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.25 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -43,9 +43,11 @@ #include #include +#include #include #include +#include #include #include #include diff --git a/sshlogin.h b/sshlogin.h index c0f9cd300..500d3fefd 100644 --- a/sshlogin.h +++ b/sshlogin.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.h,v 1.7 2006/07/08 21:47:12 stevesk Exp $ */ +/* $OpenBSD: sshlogin.h,v 1.8 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -11,11 +11,6 @@ * incompatible with the protocol description in the RFC file, it must be * called by a name other than "ssh" or "Secure Shell". */ -#ifndef SSHLOGIN_H -#define SSHLOGIN_H - -#include -#include void record_login(pid_t, const char *, const char *, uid_t, const char *, struct sockaddr *, socklen_t); @@ -26,5 +21,3 @@ time_t get_last_login_time(uid_t, const char *, char *, u_int); void record_utmp_only(pid_t, const char *, const char *, const char *, struct sockaddr *, socklen_t); #endif - -#endif diff --git a/sshpty.c b/sshpty.c index 719a79303..79c62ee9c 100644 --- a/sshpty.c +++ b/sshpty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: sshpty.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,8 +14,8 @@ #include "includes.h" -#include #include +#include #include #include @@ -26,11 +26,12 @@ # include #endif #include +#include #include #include #ifdef HAVE_UTIL_H # include -#endif /* HAVE_UTIL_H */ +#endif #include #include "sshpty.h" diff --git a/sshpty.h b/sshpty.h index a7b337474..7fac622d9 100644 --- a/sshpty.h +++ b/sshpty.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sshpty.h,v 1.9 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: sshpty.h,v 1.10 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -14,12 +14,6 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef SSHPTY_H -#define SSHPTY_H - -#include - -#include #include struct termios get_saved_tio(void); @@ -31,5 +25,3 @@ void pty_release(const char *); void pty_make_controlling_tty(int *, const char *); void pty_change_window_size(int, u_int, u_int, u_int, u_int); void pty_setowner(struct passwd *, const char *); - -#endif /* SSHPTY_H */ diff --git a/sshtty.c b/sshtty.c index 70668afde..04567669b 100644 --- a/sshtty.c +++ b/sshtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshtty.c,v 1.11 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: sshtty.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -37,8 +37,10 @@ #include "includes.h" +#include #include #include +#include #include "sshpty.h" diff --git a/ttymodes.c b/ttymodes.c index 680909b22..d8e2c553a 100644 --- a/ttymodes.c +++ b/ttymodes.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ttymodes.c,v 1.25 2006/07/22 20:48:23 stevesk Exp $ */ +/* $OpenBSD: ttymodes.c,v 1.26 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -45,16 +45,18 @@ #include "includes.h" +#include + #include #include #include +#include #include "packet.h" #include "log.h" #include "ssh1.h" #include "compat.h" #include "buffer.h" -#include "bufaux.h" #define TTY_OP_END 0 /* diff --git a/uidswap.c b/uidswap.c index 878258704..91d878c30 100644 --- a/uidswap.c +++ b/uidswap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.c,v 1.34 2006/07/26 02:35:17 stevesk Exp $ */ +/* $OpenBSD: uidswap.c,v 1.35 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -14,13 +14,12 @@ #include "includes.h" -#include #include - #include #include #include #include +#include #include diff --git a/uidswap.h b/uidswap.h index 436c10f75..1c1163d75 100644 --- a/uidswap.h +++ b/uidswap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uidswap.h,v 1.12 2006/07/06 16:03:53 stevesk Exp $ */ +/* $OpenBSD: uidswap.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -12,16 +12,7 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef UIDSWAP_H -#define UIDSWAP_H - -#include - -#include - void temporarily_use_uid(struct passwd *); void restore_uid(void); void permanently_set_uid(struct passwd *); void permanently_drop_suid(uid_t); - -#endif /* UIDSWAP_H */ diff --git a/uuencode.c b/uuencode.c index 8a6742e95..a13949585 100644 --- a/uuencode.c +++ b/uuencode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.c,v 1.23 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: uuencode.c,v 1.24 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -26,9 +26,7 @@ #include "includes.h" #include - #include - #include #include diff --git a/uuencode.h b/uuencode.h index df09eb59b..fec55b491 100644 --- a/uuencode.h +++ b/uuencode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uuencode.h,v 1.12 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: uuencode.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -24,12 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef UUENCODE_H -#define UUENCODE_H - -#include - int uuencode(const u_char *, u_int, char *, size_t); int uudecode(const char *, u_char *, size_t); void dump_base64(FILE *, u_char *, u_int); -#endif diff --git a/xmalloc.c b/xmalloc.c index 6aea495ef..9985b4cc2 100644 --- a/xmalloc.c +++ b/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.26 2006/08/01 23:22:48 stevesk Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.27 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -16,7 +16,6 @@ #include "includes.h" #include - #include #include #include diff --git a/xmalloc.h b/xmalloc.h index 27f25d584..fb217a45c 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.h,v 1.12 2006/03/25 22:22:43 djm Exp $ */ +/* $OpenBSD: xmalloc.h,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ /* * Author: Tatu Ylonen @@ -16,9 +16,6 @@ * called by a name other than "ssh" or "Secure Shell". */ -#ifndef XMALLOC_H -#define XMALLOC_H - void *xmalloc(size_t); void *xcalloc(size_t, size_t); void *xrealloc(void *, size_t, size_t); @@ -27,5 +24,3 @@ char *xstrdup(const char *); int xasprintf(char **, const char *, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); - -#endif /* XMALLOC_H */ -- cgit v1.2.3 From a1cb9f334bcc6ebd7bf2b5229b7645d995de0a15 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 19 Aug 2006 00:33:34 +1000 Subject: - djm@cvs.openbsd.org 2006/08/18 13:54:54 [gss-genr.c ssh-gss.h sshconnect2.c] bz #1218 - disable SPNEGO as per RFC4462; diff from simon AT sxw.org.uk ok markus@ --- ChangeLog | 6 +++++- gss-genr.c | 33 +++++++++++++++++++++++++++++++-- ssh-gss.h | 3 ++- sshconnect2.c | 15 ++++----------- 4 files changed, 42 insertions(+), 15 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 63b3da3b7..167c65d2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,10 @@ [misc.h] reorder so prototypes are sorted by the files they refer to; no binary change + - djm@cvs.openbsd.org 2006/08/18 13:54:54 + [gss-genr.c ssh-gss.h sshconnect2.c] + bz #1218 - disable SPNEGO as per RFC4462; diff from simon AT sxw.org.uk + ok markus@ 20060817 - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c] @@ -5255,4 +5259,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4493 2006/08/18 14:33:05 djm Exp $ +$Id: ChangeLog,v 1.4494 2006/08/18 14:33:34 djm Exp $ diff --git a/gss-genr.c b/gss-genr.c index da39479e1..1bb67e84f 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -1,7 +1,7 @@ -/* $OpenBSD: gss-genr.c,v 1.13 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: gss-genr.c,v 1.14 2006/08/18 13:54:54 djm Exp $ */ /* - * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. + * Copyright (c) 2001-2006 Simon Wilkinson. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -291,4 +291,33 @@ ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid) return (ssh_gssapi_acquire_cred(*ctx)); } +int +ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, char *host) +{ + gss_buffer_desc token = GSS_C_EMPTY_BUFFER; + OM_uint32 major, minor; + gss_OID_desc spnego_oid = {6, (void *)"\x2B\x06\x01\x05\x05\x02"}; + + /* RFC 4462 says we MUST NOT do SPNEGO */ + if (oid->length == spnego_oid.length && + (memcmp(oid->elements, spnego_oid.elements, oid->length) == 0)) + return -1; + + ssh_gssapi_build_ctx(ctx); + ssh_gssapi_set_oid(*ctx, oid); + major = ssh_gssapi_import_name(*ctx, host); + if (!GSS_ERROR(major)) { + major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token, + NULL); + gss_release_buffer(&minor, &token); + gss_delete_sec_context(&minor, &(*ctx)->context, + GSS_C_NO_BUFFER); + } + + if (GSS_ERROR(major)) + ssh_gssapi_delete_ctx(ctx); + + return (!GSS_ERROR(major)); +} + #endif /* GSSAPI */ diff --git a/ssh-gss.h b/ssh-gss.h index 0837c9b76..a188d6121 100644 --- a/ssh-gss.h +++ b/ssh-gss.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-gss.h,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: ssh-gss.h,v 1.8 2006/08/18 13:54:54 djm Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. * @@ -118,6 +118,7 @@ void ssh_gssapi_delete_ctx(Gssctxt **); OM_uint32 ssh_gssapi_sign(Gssctxt *, gss_buffer_t, gss_buffer_t); OM_uint32 ssh_gssapi_server_ctx(Gssctxt **, gss_OID); void ssh_gssapi_buildmic(Buffer *, const char *, const char *, const char *); +int ssh_gssapi_check_mechanism(Gssctxt **, gss_OID, char *); /* In the server */ int ssh_gssapi_userok(char *name); diff --git a/sshconnect2.c b/sshconnect2.c index e58d078c4..8b2e633c0 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.160 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.161 2006/08/18 13:54:54 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -508,25 +508,18 @@ userauth_gssapi(Authctxt *authctxt) /* Check to see if the mechanism is usable before we offer it */ while (mech < gss_supported->count && !ok) { - if (gssctxt) - ssh_gssapi_delete_ctx(&gssctxt); - ssh_gssapi_build_ctx(&gssctxt); - ssh_gssapi_set_oid(gssctxt, &gss_supported->elements[mech]); - /* My DER encoding requires length<128 */ if (gss_supported->elements[mech].length < 128 && - !GSS_ERROR(ssh_gssapi_import_name(gssctxt, - authctxt->host))) { + ssh_gssapi_check_mechanism(&gssctxt, + &gss_supported->elements[mech], authctxt->host)) { ok = 1; /* Mechanism works */ } else { mech++; } } - if (!ok) { - ssh_gssapi_delete_ctx(&gssctxt); + if (!ok) return 0; - } authctxt->methoddata=(void *)gssctxt; -- cgit v1.2.3 From 2125887a940f5ec60f2e5699aa77ca3e431de635 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 30 Aug 2006 11:08:33 +1000 Subject: - dtucker@cvs.openbsd.org 2006/08/30 00:06:51 [sshconnect2.c] Fix regression where SSH2 banner is printed at loglevels ERROR and FATAL where previously it weren't. bz #1221, found by Dean Kopesky, ok djm@ --- ChangeLog | 6 +++++- sshconnect2.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index a194c1ee1..ab40e629b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,10 @@ missing, by checking whether or not kerberos allocated us a context before attempting to free it. Patch from Simon Wilkinson, tested by biorn@, ok djm@ + - dtucker@cvs.openbsd.org 2006/08/30 00:06:51 + [sshconnect2.c] + Fix regression where SSH2 banner is printed at loglevels ERROR and FATAL + where previously it weren't. bz #1221, found by Dean Kopesky, ok djm@ 20060824 - (dtucker) [openbsd-compat/basename.c] Include errno.h. @@ -5321,4 +5325,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4514 2006/08/30 01:08:04 djm Exp $ +$Id: ChangeLog,v 1.4515 2006/08/30 01:08:33 djm Exp $ diff --git a/sshconnect2.c b/sshconnect2.c index 8b2e633c0..5846c8e9c 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.161 2006/08/18 13:54:54 djm Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.162 2006/08/30 00:06:51 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -377,7 +377,7 @@ input_userauth_banner(int type, u_int32_t seq, void *ctxt) debug3("input_userauth_banner"); msg = packet_get_string(NULL); lang = packet_get_string(NULL); - if (options.log_level > SYSLOG_LEVEL_QUIET) + if (options.log_level >= SYSLOG_LEVEL_INFO) fprintf(stderr, "%s", msg); xfree(msg); xfree(lang); -- cgit v1.2.3 From ded319cca23923651ddc5e6a4bd4bda66d0737f4 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 1 Sep 2006 15:38:36 +1000 Subject: - (djm) [audit-bsm.c audit.c auth-bsdauth.c auth-chall.c auth-pam.c] [auth-rsa.c auth-shadow.c auth-sia.c auth1.c auth2-chall.c] [auth2-gss.c auth2-kbdint.c auth2-none.c authfd.c authfile.c] [cipher-3des1.c cipher-aes.c cipher-bf1.c cipher-ctr.c clientloop.c] [dh.c dns.c entropy.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] [kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c loginrec.c mac.c] [md5crypt.c monitor.c monitor_wrap.c readconf.c rsa.c] [scard-opensc.c scard.c session.c ssh-add.c ssh-agent.c ssh-dss.c] [ssh-keygen.c ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c] [sshconnect1.c sshconnect2.c sshd.c rc4.diff] [openbsd-compat/bsd-cray.c openbsd-compat/port-aix.c] [openbsd-compat/port-linux.c openbsd-compat/port-solaris.c] [openbsd-compat/port-uw.c] Lots of headers for SCO OSR6, mainly adding stdarg.h for log.h; compile problems reported by rac AT tenzing.org --- ChangeLog | 19 ++++++++++++++++++- audit-bsm.c | 3 ++- audit.c | 5 ++++- auth-bsdauth.c | 2 ++ auth-chall.c | 2 ++ auth-pam.c | 1 + auth-rsa.c | 1 + auth-shadow.c | 1 + auth-sia.c | 17 +++++++++-------- auth1.c | 1 + auth2-chall.c | 1 + auth2-gss.c | 2 ++ auth2-kbdint.c | 2 ++ auth2-none.c | 1 + authfd.c | 1 + authfile.c | 1 + cipher-3des1.c | 1 + cipher-aes.c | 4 ++++ cipher-bf1.c | 1 + cipher-ctr.c | 1 + clientloop.c | 1 + dh.c | 1 + dns.c | 1 + entropy.c | 1 + gss-serv-krb5.c | 1 + gss-serv.c | 1 + hostfile.c | 1 + kex.c | 1 + kexdhc.c | 1 + kexdhs.c | 2 ++ kexgexc.c | 1 + kexgexs.c | 1 + key.c | 1 + loginrec.c | 1 + mac.c | 1 + md5crypt.c | 4 ++++ monitor.c | 1 + monitor_wrap.c | 1 + openbsd-compat/bsd-cray.c | 3 ++- openbsd-compat/port-aix.c | 1 + openbsd-compat/port-linux.c | 3 ++- openbsd-compat/port-solaris.c | 3 ++- openbsd-compat/port-uw.c | 15 +++++++++++++-- readconf.c | 1 + rsa.c | 1 + scard-opensc.c | 4 ++++ scard.c | 1 + session.c | 1 + ssh-add.c | 1 + ssh-agent.c | 1 + ssh-dss.c | 1 + ssh-keygen.c | 1 + ssh-keysign.c | 1 + ssh-rsa.c | 1 + ssh.c | 1 + sshconnect.c | 1 + sshconnect1.c | 1 + sshconnect2.c | 1 + sshd.c | 1 + 59 files changed, 117 insertions(+), 16 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index bef6b0538..ebf308975 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +20060901 + - (djm) [audit-bsm.c audit.c auth-bsdauth.c auth-chall.c auth-pam.c] + [auth-rsa.c auth-shadow.c auth-sia.c auth1.c auth2-chall.c] + [auth2-gss.c auth2-kbdint.c auth2-none.c authfd.c authfile.c] + [cipher-3des1.c cipher-aes.c cipher-bf1.c cipher-ctr.c clientloop.c] + [dh.c dns.c entropy.c gss-serv-krb5.c gss-serv.c hostfile.c kex.c] + [kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c loginrec.c mac.c] + [md5crypt.c monitor.c monitor_wrap.c readconf.c rsa.c] + [scard-opensc.c scard.c session.c ssh-add.c ssh-agent.c ssh-dss.c] + [ssh-keygen.c ssh-keysign.c ssh-rsa.c ssh.c sshconnect.c] + [sshconnect1.c sshconnect2.c sshd.c rc4.diff] + [openbsd-compat/bsd-cray.c openbsd-compat/port-aix.c] + [openbsd-compat/port-linux.c openbsd-compat/port-solaris.c] + [openbsd-compat/port-uw.c] + Lots of headers for SCO OSR6, mainly adding stdarg.h for log.h; + compile problems reported by rac AT tenzing.org + 20060831 - (djm) [CREDITS LICENCE Makefile.in auth.c configure.ac includes.h ] [platform.c platform.h sshd.c openbsd-compat/Makefile.in] @@ -5348,4 +5365,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4520 2006/08/31 01:28:49 dtucker Exp $ +$Id: ChangeLog,v 1.4521 2006/09/01 05:38:36 djm Exp $ diff --git a/audit-bsm.c b/audit-bsm.c index 50241b32f..d5cf302ce 100644 --- a/audit-bsm.c +++ b/audit-bsm.c @@ -1,4 +1,4 @@ -/* $Id: audit-bsm.c,v 1.3 2006/08/16 01:40:45 djm Exp $ */ +/* $Id: audit-bsm.c,v 1.4 2006/09/01 05:38:36 djm Exp $ */ /* * TODO @@ -39,6 +39,7 @@ #include +#include #include #include "ssh.h" diff --git a/audit.c b/audit.c index 8c3ec5a6a..dbea34cb2 100644 --- a/audit.c +++ b/audit.c @@ -1,4 +1,4 @@ -/* $Id: audit.c,v 1.4 2006/08/05 14:05:10 dtucker Exp $ */ +/* $Id: audit.c,v 1.5 2006/09/01 05:38:36 djm Exp $ */ /* * Copyright (c) 2004, 2005 Darren Tucker. All rights reserved. @@ -26,6 +26,9 @@ #include "includes.h" +#include +#include + #ifdef SSH_AUDIT_EVENTS #include "audit.h" diff --git a/auth-bsdauth.c b/auth-bsdauth.c index f718e5d38..37d527d11 100644 --- a/auth-bsdauth.c +++ b/auth-bsdauth.c @@ -27,6 +27,8 @@ #include +#include + #ifdef BSD_AUTH #include "xmalloc.h" #include "key.h" diff --git a/auth-chall.c b/auth-chall.c index 9c1079a17..919b1eaa4 100644 --- a/auth-chall.c +++ b/auth-chall.c @@ -27,6 +27,8 @@ #include +#include + #include "xmalloc.h" #include "key.h" #include "hostfile.h" diff --git a/auth-pam.c b/auth-pam.c index 8e9361caa..493993a10 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -54,6 +54,7 @@ #include #include +#include #include #include diff --git a/auth-rsa.c b/auth-rsa.c index 1c66b86a4..8c43458b0 100644 --- a/auth-rsa.c +++ b/auth-rsa.c @@ -24,6 +24,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/auth-shadow.c b/auth-shadow.c index 52447fe4a..8b3160aee 100644 --- a/auth-shadow.c +++ b/auth-shadow.c @@ -26,6 +26,7 @@ #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) #include +#include #include #include "key.h" diff --git a/auth-sia.c b/auth-sia.c index af7182b48..63304d36e 100644 --- a/auth-sia.c +++ b/auth-sia.c @@ -25,14 +25,6 @@ #include "includes.h" #ifdef HAVE_OSF_SIA -#include "ssh.h" -#include "auth.h" -#include "auth-sia.h" -#include "log.h" -#include "servconf.h" -#include "canohost.h" -#include "uidswap.h" - #include #include #include @@ -40,8 +32,17 @@ #include #include #include +#include #include +#include "ssh.h" +#include "auth.h" +#include "auth-sia.h" +#include "log.h" +#include "servconf.h" +#include "canohost.h" +#include "uidswap.h" + extern ServerOptions options; extern int saved_argc; extern char **saved_argv; diff --git a/auth1.c b/auth1.c index 34dcf6266..b9d6b1115 100644 --- a/auth1.c +++ b/auth1.c @@ -14,6 +14,7 @@ #include +#include #include #include #include diff --git a/auth2-chall.c b/auth2-chall.c index b091957b1..b78b739cd 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -28,6 +28,7 @@ #include +#include #include #include diff --git a/auth2-gss.c b/auth2-gss.c index d88bc4273..c77c841a3 100644 --- a/auth2-gss.c +++ b/auth2-gss.c @@ -30,6 +30,8 @@ #include +#include + #include "xmalloc.h" #include "key.h" #include "hostfile.h" diff --git a/auth2-kbdint.c b/auth2-kbdint.c index 901596484..a4fc9e6f7 100644 --- a/auth2-kbdint.c +++ b/auth2-kbdint.c @@ -27,6 +27,8 @@ #include +#include + #include "xmalloc.h" #include "packet.h" #include "key.h" diff --git a/auth2-none.c b/auth2-none.c index f455bdde3..952b44824 100644 --- a/auth2-none.c +++ b/auth2-none.c @@ -30,6 +30,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/authfd.c b/authfd.c index 5c910df13..61faad123 100644 --- a/authfd.c +++ b/authfd.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include diff --git a/authfile.c b/authfile.c index 675085646..735c64780 100644 --- a/authfile.c +++ b/authfile.c @@ -49,6 +49,7 @@ #include #include +#include #include #include #include diff --git a/cipher-3des1.c b/cipher-3des1.c index 61798bfde..fc16e20d7 100644 --- a/cipher-3des1.c +++ b/cipher-3des1.c @@ -29,6 +29,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/cipher-aes.c b/cipher-aes.c index 99e9eea92..14ef10f03 100644 --- a/cipher-aes.c +++ b/cipher-aes.c @@ -28,8 +28,12 @@ #include "openbsd-compat/openssl-compat.h" #ifdef USE_BUILTIN_RIJNDAEL +#include #include + +#include + #include "rijndael.h" #include "xmalloc.h" #include "log.h" diff --git a/cipher-bf1.c b/cipher-bf1.c index eb4c04777..292488c5c 100644 --- a/cipher-bf1.c +++ b/cipher-bf1.c @@ -29,6 +29,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/cipher-ctr.c b/cipher-ctr.c index 9733b7d56..b24f3a428 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -18,6 +18,7 @@ #include +#include #include #include diff --git a/clientloop.c b/clientloop.c index 132d75a44..88dfb1f32 100644 --- a/clientloop.c +++ b/clientloop.c @@ -78,6 +78,7 @@ #include #endif #include +#include #include #include #include diff --git a/dh.c b/dh.c index 925eedddf..f6ef05cf6 100644 --- a/dh.c +++ b/dh.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include diff --git a/dns.c b/dns.c index 229210835..92623de72 100644 --- a/dns.c +++ b/dns.c @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/entropy.c b/entropy.c index c89e0b528..4f19c8767 100644 --- a/entropy.c +++ b/entropy.c @@ -34,6 +34,7 @@ #ifdef HAVE_FCNTL_H # include #endif +#include #include #include diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c index 006bedad9..5a625acb8 100644 --- a/gss-serv-krb5.c +++ b/gss-serv-krb5.c @@ -31,6 +31,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/gss-serv.c b/gss-serv.c index 296f63a89..e8191a859 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -30,6 +30,7 @@ #include +#include #include #include diff --git a/hostfile.c b/hostfile.c index 08ba44264..2cceb352a 100644 --- a/hostfile.c +++ b/hostfile.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include diff --git a/kex.c b/kex.c index 0c36519a1..bfc1c11f9 100644 --- a/kex.c +++ b/kex.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include diff --git a/kexdhc.c b/kexdhc.c index bf875ae07..64de7af30 100644 --- a/kexdhc.c +++ b/kexdhc.c @@ -27,6 +27,7 @@ #include +#include #include #include #include diff --git a/kexdhs.c b/kexdhs.c index 7d2c21eed..93ec97f93 100644 --- a/kexdhs.c +++ b/kexdhs.c @@ -26,6 +26,8 @@ #include "includes.h" #include + +#include #include #include diff --git a/kexgexc.c b/kexgexc.c index fc48880d4..2c19713e1 100644 --- a/kexgexc.c +++ b/kexgexc.c @@ -28,6 +28,7 @@ #include +#include #include #include #include diff --git a/kexgexs.c b/kexgexs.c index 7599f2af4..5373a633a 100644 --- a/kexgexs.c +++ b/kexgexs.c @@ -28,6 +28,7 @@ #include +#include #include #include #include diff --git a/key.c b/key.c index 40aab20ea..f3b3d6b94 100644 --- a/key.c +++ b/key.c @@ -39,6 +39,7 @@ #include +#include #include #include diff --git a/loginrec.c b/loginrec.c index 7850312b6..67447edc0 100644 --- a/loginrec.c +++ b/loginrec.c @@ -156,6 +156,7 @@ #include #include #include +#include #include #include diff --git a/mac.c b/mac.c index edf9b69bd..e5d5bfa88 100644 --- a/mac.c +++ b/mac.c @@ -29,6 +29,7 @@ #include +#include #include #include diff --git a/md5crypt.c b/md5crypt.c index 253fdfdf2..22ef98933 100644 --- a/md5crypt.c +++ b/md5crypt.c @@ -11,6 +11,10 @@ #include "includes.h" #if defined(HAVE_MD5_PASSWORDS) && !defined(HAVE_MD5_CRYPT) +#include + +#include + #include /* 0 ... 63 => ascii - 64 */ diff --git a/monitor.c b/monitor.c index 83b3765a0..b3ccde017 100644 --- a/monitor.c +++ b/monitor.c @@ -40,6 +40,7 @@ #endif #include #include +#include #include #include diff --git a/monitor_wrap.c b/monitor_wrap.c index 431b3e495..3865539df 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c index 8093f6d54..1532c991c 100644 --- a/openbsd-compat/bsd-cray.c +++ b/openbsd-compat/bsd-cray.c @@ -1,5 +1,5 @@ /* - * $Id: bsd-cray.c,v 1.15 2006/07/24 05:08:36 djm Exp $ + * $Id: bsd-cray.c,v 1.16 2006/09/01 05:38:41 djm Exp $ * * bsd-cray.c * @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c index 13a73e873..d0a423005 100644 --- a/openbsd-compat/port-aix.c +++ b/openbsd-compat/port-aix.c @@ -41,6 +41,7 @@ # include #endif #include +#include #include #include #include diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index 5e2e878dc..77f3a1c17 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c @@ -1,4 +1,4 @@ -/* $Id: port-linux.c,v 1.2 2006/07/24 04:51:01 djm Exp $ */ +/* $Id: port-linux.c,v 1.3 2006/09/01 05:38:41 djm Exp $ */ /* * Copyright (c) 2005 Daniel Walsh @@ -24,6 +24,7 @@ #include "includes.h" #include +#include #include #ifdef WITH_SELINUX diff --git a/openbsd-compat/port-solaris.c b/openbsd-compat/port-solaris.c index f31f0c6ea..f57433e78 100644 --- a/openbsd-compat/port-solaris.c +++ b/openbsd-compat/port-solaris.c @@ -1,4 +1,4 @@ -/* $Id: port-solaris.c,v 1.1 2006/08/30 17:24:42 djm Exp $ */ +/* $Id: port-solaris.c,v 1.2 2006/09/01 05:38:41 djm Exp $ */ /* * Copyright (c) 2006 Chad Mynhier. @@ -29,6 +29,7 @@ #ifdef HAVE_FCNTL_H # include #endif +#include #include #include diff --git a/openbsd-compat/port-uw.c b/openbsd-compat/port-uw.c index c64427121..6f3523902 100644 --- a/openbsd-compat/port-uw.c +++ b/openbsd-compat/port-uw.c @@ -26,15 +26,26 @@ #include "includes.h" #ifdef HAVE_LIBIAF +#include #ifdef HAVE_CRYPT_H -#include +# include #endif +#include +#include +#include +#include +#include + +#include "xmalloc.h" #include "packet.h" #include "buffer.h" +#include "auth-options.h" #include "log.h" #include "servconf.h" +#include "key.h" +#include "hostfile.h" #include "auth.h" -#include "auth-options.h" +#include "ssh.h" int nischeck(char *); diff --git a/readconf.c b/readconf.c index c57ea0c82..4cacf6026 100644 --- a/readconf.c +++ b/readconf.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/rsa.c b/rsa.c index 875b486c4..08cc82007 100644 --- a/rsa.c +++ b/rsa.c @@ -64,6 +64,7 @@ #include +#include #include #include "xmalloc.h" diff --git a/scard-opensc.c b/scard-opensc.c index 7a496dff8..4751ea295 100644 --- a/scard-opensc.c +++ b/scard-opensc.c @@ -26,9 +26,13 @@ #include "includes.h" #if defined(SMARTCARD) && defined(USE_OPENSC) +#include + #include #include +#include + #include #include diff --git a/scard.c b/scard.c index a2d28cba1..328655edd 100644 --- a/scard.c +++ b/scard.c @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/session.c b/session.c index 006e4304d..15c5ca9a0 100644 --- a/session.c +++ b/session.c @@ -53,6 +53,7 @@ #endif #include #include +#include #include #include #include diff --git a/ssh-add.c b/ssh-add.c index 518f47066..4dc46f6db 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -45,6 +45,7 @@ #include #include +#include #include #include #include diff --git a/ssh-agent.c b/ssh-agent.c index 6bc1e541a..08b07212e 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -58,6 +58,7 @@ # include #endif #include +#include #include #include #include diff --git a/ssh-dss.c b/ssh-dss.c index 448f704f6..fbc078e84 100644 --- a/ssh-dss.c +++ b/ssh-dss.c @@ -30,6 +30,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/ssh-keygen.c b/ssh-keygen.c index c607e257e..969bd2359 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -29,6 +29,7 @@ # include #endif #include +#include #include #include #include diff --git a/ssh-keysign.c b/ssh-keysign.c index 1ddb2a058..c4bc7e56e 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -30,6 +30,7 @@ #include #endif #include +#include #include #include #include diff --git a/ssh-rsa.c b/ssh-rsa.c index 28444c1f9..0e16ff85f 100644 --- a/ssh-rsa.c +++ b/ssh-rsa.c @@ -22,6 +22,7 @@ #include #include +#include #include #include "xmalloc.h" diff --git a/ssh.c b/ssh.c index 07a4ca3c8..a34990b54 100644 --- a/ssh.c +++ b/ssh.c @@ -60,6 +60,7 @@ #endif #include #include +#include #include #include #include diff --git a/sshconnect.c b/sshconnect.c index 71ca4ec52..823def6a9 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -32,6 +32,7 @@ #include #endif #include +#include #include #include #include diff --git a/sshconnect1.c b/sshconnect1.c index 51f1f8088..90fcb344f 100644 --- a/sshconnect1.c +++ b/sshconnect1.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/sshconnect2.c b/sshconnect2.c index 5846c8e9c..dd971a9f9 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/sshd.c b/sshd.c index ee588ff8a..3fb146424 100644 --- a/sshd.c +++ b/sshd.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3