summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-08-05 12:39:39 +1000
committerDamien Miller <djm@mindrot.org>2006-08-05 12:39:39 +1000
commitd783435315d8e604998925d5e47b663a500ed252 (patch)
tree510a72c4fa0a6cbb51c24bad2bc6d6e7f329db94
parent4dec5d75daab22c31f6f67d9e83594076ae3eda7 (diff)
- 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")
-rw-r--r--ChangeLog30
-rw-r--r--OVERVIEW3
-rw-r--r--atomicio.c3
-rw-r--r--atomicio.h7
-rw-r--r--auth-bsdauth.c11
-rw-r--r--auth-chall.c8
-rw-r--r--auth-krb5.c11
-rw-r--r--auth-options.c12
-rw-r--r--auth-options.h6
-rw-r--r--auth-passwd.c5
-rw-r--r--auth-rh-rsa.c8
-rw-r--r--auth-rhosts.c6
-rw-r--r--auth-rsa.c11
-rw-r--r--auth-skey.c5
-rw-r--r--auth.c10
-rw-r--r--auth.h11
-rw-r--r--auth1.c8
-rw-r--r--auth2-chall.c9
-rw-r--r--auth2-gss.c14
-rw-r--r--auth2-hostbased.c12
-rw-r--r--auth2-kbdint.c9
-rw-r--r--auth2-none.c10
-rw-r--r--auth2-passwd.c11
-rw-r--r--auth2-pubkey.c12
-rw-r--r--auth2.c10
-rw-r--r--authfd.c7
-rw-r--r--authfd.h4
-rw-r--r--authfile.c6
-rw-r--r--bufaux.c7
-rw-r--r--bufbn.c7
-rw-r--r--buffer.c3
-rw-r--r--buffer.h38
-rw-r--r--canohost.c5
-rw-r--r--channels.c9
-rw-r--r--channels.h4
-rw-r--r--cipher-3des1.c4
-rw-r--r--cipher-bf1.c4
-rw-r--r--cipher-ctr.c6
-rw-r--r--cipher.c5
-rw-r--r--cleanup.c5
-rw-r--r--clientloop.c8
-rw-r--r--compat.c7
-rw-r--r--compress.c6
-rw-r--r--deattack.c8
-rw-r--r--dh.c2
-rw-r--r--dispatch.c6
-rw-r--r--dns.c2
-rw-r--r--dns.h9
-rw-r--r--fatal.c4
-rw-r--r--groupaccess.c5
-rw-r--r--groupaccess.h4
-rw-r--r--gss-genr.c6
-rw-r--r--gss-serv-krb5.c9
-rw-r--r--gss-serv.c10
-rw-r--r--hostfile.c4
-rw-r--r--includes.h3
-rw-r--r--kex.c12
-rw-r--r--kex.h8
-rw-r--r--kexdh.c9
-rw-r--r--kexdhc.c7
-rw-r--r--kexdhs.c9
-rw-r--r--kexgex.c8
-rw-r--r--kexgexc.c7
-rw-r--r--kexgexs.c8
-rw-r--r--key.c6
-rw-r--r--key.h4
-rw-r--r--log.c6
-rw-r--r--log.h8
-rw-r--r--loginrec.c4
-rw-r--r--loginrec.h4
-rw-r--r--mac.c7
-rw-r--r--match.c6
-rw-r--r--md-sha256.c4
-rw-r--r--misc.c6
-rw-r--r--misc.h7
-rw-r--r--moduli.c3
-rw-r--r--monitor.c15
-rw-r--r--monitor_fdpass.c3
-rw-r--r--monitor_mm.c7
-rw-r--r--monitor_mm.h3
-rw-r--r--monitor_wrap.c25
-rw-r--r--monitor_wrap.h10
-rw-r--r--msg.c6
-rw-r--r--nchan.c3
-rw-r--r--openbsd-compat/port-aix.c7
-rw-r--r--openbsd-compat/port-tun.h2
-rw-r--r--packet.c8
-rw-r--r--progressmeter.c3
-rw-r--r--readconf.c7
-rw-r--r--readconf.h4
-rw-r--r--readpass.c2
-rw-r--r--rsa.c6
-rw-r--r--scard.c8
-rw-r--r--scard.h4
-rw-r--r--scp.c3
-rw-r--r--servconf.c8
-rw-r--r--servconf.h4
-rw-r--r--serverloop.c8
-rw-r--r--session.c15
-rw-r--r--session.h6
-rw-r--r--sftp-client.c12
-rw-r--r--sftp-common.c6
-rw-r--r--sftp-common.h7
-rw-r--r--sftp-glob.c4
-rw-r--r--sftp-server.c12
-rw-r--r--sftp.c6
-rw-r--r--ssh-add.c5
-rw-r--r--ssh-agent.c5
-rw-r--r--ssh-dss.c5
-rw-r--r--ssh-gss.h4
-rw-r--r--ssh-keygen.c3
-rw-r--r--ssh-keyscan.c7
-rw-r--r--ssh-keysign.c6
-rw-r--r--ssh-rsa.c6
-rw-r--r--ssh.c7
-rw-r--r--ssh.h16
-rw-r--r--sshconnect.c6
-rw-r--r--sshconnect.h11
-rw-r--r--sshconnect1.c14
-rw-r--r--sshconnect2.c9
-rw-r--r--sshd.c18
-rw-r--r--sshlogin.c4
-rw-r--r--sshlogin.h9
-rw-r--r--sshpty.c7
-rw-r--r--sshpty.h10
-rw-r--r--sshtty.c4
-rw-r--r--ttymodes.c6
-rw-r--r--uidswap.c5
-rw-r--r--uidswap.h11
-rw-r--r--uuencode.c4
-rw-r--r--uuencode.h8
-rw-r--r--xmalloc.c3
-rw-r--r--xmalloc.h7
133 files changed, 584 insertions, 412 deletions
diff --git a/ChangeLog b/ChangeLog
index b955ea8a..7f48d236 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 64b6f75f..2e1cc0ba 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 4ff990fd..f651a292 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 <sys/param.h>
+#include <sys/uio.h>
#include <errno.h>
#include <string.h>
diff --git a/atomicio.h b/atomicio.h
index 05b97ab8..2fcd25d4 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 <sys/types.h>
-#include <sys/uio.h>
-
-#include <unistd.h>
-
/*
* Ensure all of data on socket comes through. f==read || f==vwrite
*/
diff --git a/auth-bsdauth.c b/auth-bsdauth.c
index c309e4a1..f718e5d3 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 <sys/types.h>
+
#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 023e7ee0..9c1079a1 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 <sys/types.h>
+
+#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 676b8ab1..86828812 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 <sys/types.h>
+#include <pwd.h>
+#include <stdarg.h>
+
+#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 cd904967..ca5e1c93 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -17,17 +17,25 @@
#include <netdb.h>
#include <pwd.h>
#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
#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 cd2b030c..853f8b51 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 <ylo@cs.hut.fi>
@@ -15,10 +15,6 @@
#ifndef AUTH_OPTIONS_H
#define AUTH_OPTIONS_H
-#include <sys/types.h>
-
-#include <pwd.h>
-
/* Linked list of custom environment strings */
struct envstring {
struct envstring *next;
diff --git a/auth-passwd.c b/auth-passwd.c
index f8df17e6..be628379 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -43,11 +43,14 @@
#include <pwd.h>
#include <stdio.h>
#include <string.h>
+#include <stdarg.h>
#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 8fa21e12..eca75027 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -18,17 +18,21 @@
#include <sys/types.h>
#include <pwd.h>
+#include <stdarg.h>
#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 8dc4ede0..cd0a7967 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -25,13 +25,17 @@
#include <pwd.h>
#include <stdio.h>
#include <string.h>
+#include <stdarg.h>
#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 f3e27e9f..1c66b86a 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -26,18 +26,23 @@
#include <stdio.h>
#include <string.h>
+#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 9c981ec8..d49e59b7 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 <sys/types.h>
+
#include <skey.h>
#include "xmalloc.h"
diff --git a/auth.c b/auth.c
index 88a8e22e..fba32eb9 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 2c749957..26158b9d 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 <sys/types.h>
-
-#include <signal.h>
-#include <pwd.h>
#include <signal.h>
-#include <stdio.h>
-#include "buffer.h"
#include <openssl/rsa.h>
#ifdef HAVE_LOGIN_CAP
@@ -48,9 +42,6 @@
#include <krb5.h>
#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 2c558576..34dcf626 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 <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <pwd.h>
#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 89b261e6..8358140b 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 <sys/types.h>
+
#include <stdio.h>
#include <string.h>
+#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 03210673..67144e49 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 <sys/types.h>
+#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 5cb617e1..663dec5d 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 <pwd.h>
#include <string.h>
+#include <stdarg.h>
-#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 796714ee..90159648 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 <sys/types.h>
+
+#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 d6738175..1e4afa0e 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 <fcntl.h>
-#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 a1b65da5..421c5c25 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 <sys/types.h>
+
#include <string.h>
+#include <stdarg.h>
#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 41763f76..9863cd9e 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 <pwd.h>
#include <stdio.h>
+#include <stdarg.h>
+#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 83d5224c..2d880b57 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 <sys/types.h>
#include <pwd.h>
+#include <stdarg.h>
#include <string.h>
-#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 f8ee8051..5c910df1 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -43,16 +43,17 @@
#include <openssl/evp.h>
+#include <openssl/crypto.h>
#include <fcntl.h>
#include <stdlib.h>
+#include <signal.h>
#include <string.h>
#include <unistd.h>
+#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 8ad8f2e7..3da25611 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 <ylo@cs.hut.fi>
@@ -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 400e60b3..67508564 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -41,6 +41,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
+#include <sys/uio.h>
#include <openssl/err.h>
#include <openssl/evp.h>
@@ -53,10 +54,9 @@
#include <string.h>
#include <unistd.h>
-#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 a384cc68..cbdc22c6 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -39,12 +39,15 @@
#include "includes.h"
+#include <sys/types.h>
+
#include <openssl/bn.h>
#include <string.h>
+#include <stdarg.h>
-#include "bufaux.h"
#include "xmalloc.h"
+#include "buffer.h"
#include "log.h"
#include "misc.h"
diff --git a/bufbn.c b/bufbn.c
index aa42ea62..6cf65d37 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -39,12 +39,15 @@
#include "includes.h"
+#include <sys/types.h>
+
#include <openssl/bn.h>
#include <string.h>
+#include <stdarg.h>
-#include "bufaux.h"
#include "xmalloc.h"
+#include "buffer.h"
#include "log.h"
#include "misc.h"
diff --git a/buffer.c b/buffer.c
index 25868b94..e02e1e35 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <string.h>
+#include <stdarg.h>
#include "xmalloc.h"
#include "buffer.h"
diff --git a/buffer.h b/buffer.h
index 43414ae9..ecc4aea8 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 <ylo@cs.hut.fi>
@@ -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 <openssl/bn.h>
+
+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 c236617d..dd3972e8 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -25,9 +25,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
-#include "packet.h"
#include "xmalloc.h"
+#include "packet.h"
#include "log.h"
#include "canohost.h"
diff --git a/channels.c b/channels.c
index fb4d287d..dfa1e591 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -41,8 +41,8 @@
#include "includes.h"
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/un.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_TIME_H
@@ -59,21 +59,22 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
+#include <stdarg.h>
+#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 ed719f72..2674f096 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 <ylo@cs.hut.fi>
@@ -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 2e8735d5..61798bfd 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 <sys/types.h>
+
#include <openssl/evp.h>
#include <string.h>
diff --git a/cipher-bf1.c b/cipher-bf1.c
index 95b4e5e9..eb4c0477 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 <sys/types.h>
+
#include <openssl/evp.h>
#include <string.h>
diff --git a/cipher-ctr.c b/cipher-ctr.c
index 105d0bd5..9733b7d5 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 <markus@openbsd.org>
*
@@ -16,12 +16,14 @@
*/
#include "includes.h"
+#include <sys/types.h>
+
#include <string.h>
#include <openssl/evp.h>
-#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 20fa59c6..b264063c 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,9 +37,12 @@
#include "includes.h"
+#include <sys/types.h>
+
#include <openssl/md5.h>
#include <string.h>
+#include <stdarg.h>
#include "xmalloc.h"
#include "log.h"
diff --git a/cleanup.c b/cleanup.c
index 0d9f2a6d..c41ef1c6 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 <markus@openbsd.org>
*
@@ -17,7 +17,10 @@
#include "config.h"
+#include <sys/types.h>
+
#include <unistd.h>
+#include <stdarg.h>
#include "log.h"
diff --git a/clientloop.c b/clientloop.c
index f9ffa2bb..132d75a4 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -82,20 +82,20 @@
#include <stdlib.h>
#include <string.h>
#include <termios.h>
+#include <pwd.h>
#include <unistd.h>
+#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 e1a8b2bf..da67f941 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 <sys/types.h>
+
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
+#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 8aba84ef..f5d30b8a 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -14,6 +14,10 @@
#include "includes.h"
+#include <sys/types.h>
+
+#include <stdarg.h>
+
#include "log.h"
#include "buffer.h"
#include "zlib.h"
diff --git a/deattack.c b/deattack.c
index 57a747da..b4fed7f8 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 <sys/types.h>
+
#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#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 4ca94913..925eeddd 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 c1d98a78..d6b63be4 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 <sys/types.h>
+
#include <signal.h>
+#include <stdarg.h>
#include "ssh1.h"
#include "ssh2.h"
diff --git a/dns.c b/dns.c
index 008fc596..22921083 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 8f960182..b2633a1f 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 <sys/types.h>
-#include <sys/socket.h>
-
-#include <stdio.h>
-
#ifndef DNS_H
#define DNS_H
diff --git a/fatal.c b/fatal.c
index 1f2cd0bc..5e5aa3fe 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 <sys/types.h>
+
#include <stdarg.h>
#include "log.h"
diff --git a/groupaccess.c b/groupaccess.c
index 3431691b..e73f62b2 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 <grp.h>
#include <unistd.h>
+#include <stdarg.h>
-#include "groupaccess.h"
#include "xmalloc.h"
+#include "groupaccess.h"
#include "match.h"
#include "log.h"
diff --git a/groupaccess.h b/groupaccess.h
index b0baccfb..04b44989 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 <sys/types.h>
-
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 93dbeeeb..da39479e 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 <sys/types.h>
#include <sys/param.h>
+#include <stdarg.h>
#include <string.h>
#include <unistd.h>
#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 7b78cfe0..006bedad 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 <sys/types.h>
+
#include <string.h>
-#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 b5c5538f..296f63a8 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 <sys/types.h>
+
#include <string.h>
#include <unistd.h>
-#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 7ac69e77..08ba4426 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -50,11 +50,11 @@
#include <stdlib.h>
#include <string.h>
+#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 9b6a63fb..8e600567 100644
--- a/includes.h
+++ b/includes.h
@@ -25,9 +25,6 @@
#ifdef HAVE_LIMITS_H
# include <limits.h> /* For PATH_MAX */
#endif
-#ifdef HAVE_GETOPT_H
-# include <getopt.h>
-#endif
#ifdef HAVE_BSTRING_H
# include <bstring.h>
#endif
diff --git a/kex.c b/kex.c
index 3525307c..0c36519a 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 <sys/param.h>
-#include <openssl/crypto.h>
-
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "ssh2.h"
+#include <openssl/crypto.h>
+
#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 a48c5c88..b1b20f50 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 <signal.h>
#include <openssl/evp.h>
-#include <signal.h>
-
-#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 2d13127b..56e22f5b 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 <sys/types.h>
+
+#include <signal.h>
+
#include <openssl/evp.h>
#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 9d123e74..bf875ae0 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 <sys/types.h>
+
#include <stdio.h>
#include <string.h>
+#include <signal.h>
#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 c64cd77c..7d2c21ee 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 <sys/types.h>
#include <string.h>
+#include <signal.h>
#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 5ab6745a..b60ab5c5 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 <sys/types.h>
+
#include <openssl/evp.h>
+#include <signal.h>
#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 9c618ec6..fc48880d 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 <sys/types.h>
+
#include <stdio.h>
#include <string.h>
+#include <signal.h>
#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 0b01ed80..7599f2af 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 <stdio.h>
#include <string.h>
+#include <signal.h>
#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 745c474f..40aab20e 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 <ylo@cs.hut.fi>, 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 <sys/types.h>
+
#include <openssl/evp.h>
#include <stdio.h>
@@ -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 57af279b..6873dd79 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 <openssl/rsa.h>
#include <openssl/dsa.h>
-#include <stdio.h>
-
typedef struct Key Key;
enum types {
KEY_RSA1,
diff --git a/log.c b/log.c
index 871bc2c4..6eac7374 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -36,6 +36,8 @@
#include "includes.h"
+#include <sys/types.h>
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -46,8 +48,8 @@
# include <vis.h>
#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 15ebc93b..a8e788a2 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 <ylo@cs.hut.fi>
@@ -15,12 +15,6 @@
#ifndef SSH_LOG_H
#define SSH_LOG_H
-#include "includes.h"
-
-#include <stdarg.h>
-
-#include <syslog.h> /* 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 955d42e8..7850312b 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -159,8 +159,10 @@
#include <string.h>
#include <unistd.h>
-#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 4fe24ac2..859e1a63 100644
--- a/loginrec.h
+++ b/loginrec.h
@@ -31,10 +31,6 @@
#include "includes.h"
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-
/**
** you should use the login_* calls to work around platform dependencies
**/
diff --git a/mac.c b/mac.c
index a59e7edf..edf9b69b 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 <sys/types.h>
+
#include <openssl/hmac.h>
#include <string.h>
+#include <signal.h>
#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 8f12ef53..e3c99307 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,11 +37,13 @@
#include "includes.h"
+#include <sys/types.h>
+
#include <ctype.h>
#include <string.h>
-#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 063a1014..8c1b3b92 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 <djm@openbsd.org>
*
@@ -18,6 +18,8 @@
/* EVP wrapper for SHA256 */
#include "includes.h"
+
+#include <sys/types.h>
#include <openssl/opensslv.h>
#if !defined(HAVE_EVP_SHA256) && (OPENSSL_VERSION_NUMBER >= 0x00907000L)
diff --git a/misc.c b/misc.c
index ef2014f6..78bca2fa 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 <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/param.h>
@@ -50,9 +50,9 @@
#include <net/if.h>
#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 1dded721..072470ba 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 <ylo@cs.hut.fi>
@@ -15,11 +15,6 @@
#ifndef _MISC_H
#define _MISC_H
-#include <sys/types.h>
-
-#include <pwd.h>
-#include <stdio.h>
-
/* misc.c */
char *chop(char *);
diff --git a/moduli.c b/moduli.c
index a164b4f5..e18929ba 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 <karn@qualcomm.com>
* Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -46,6 +46,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
#include <time.h>
#include "xmalloc.h"
diff --git a/monitor.c b/monitor.c
index 32517985..595aae1a 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 <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -30,6 +30,7 @@
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
+#include "openbsd-compat/sys-tree.h"
#include <sys/wait.h>
#include <errno.h>
@@ -48,8 +49,13 @@
#include <openssl/dh.h>
+#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 d3e65cba..c5fc4c39 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 <provos@citi.umich.edu>
* All rights reserved.
@@ -32,6 +32,7 @@
#include <errno.h>
#include <string.h>
+#include <stdarg.h>
#include "log.h"
#include "monitor_fdpass.h"
diff --git a/monitor_mm.c b/monitor_mm.c
index 89a8c9b4..dab74753 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 <provos@citi.umich.edu>
* All rights reserved.
@@ -26,16 +26,19 @@
#include "includes.h"
+#include <sys/types.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
#include <sys/param.h>
+#include "openbsd-compat/sys-tree.h"
#include <errno.h>
+#include <stdarg.h>
#include <string.h>
-#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 3499c752..36a07a06 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 <provos@citi.umich.edu>
@@ -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 27e2fc7c..52ea1759 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 <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -29,21 +29,25 @@
#include <sys/types.h>
-#include <openssl/bn.h>
-#include <openssl/dh.h>
-
#include <errno.h>
#include <pwd.h>
+#include <signal.h>
#include <stdio.h>
#include <string.h>
+#include <openssl/bn.h>
+#include <openssl/dh.h>
+
+#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 fd5cccd0..329189c2 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 <provos@citi.umich.edu>
@@ -28,13 +28,6 @@
#ifndef _MM_WRAP_H_
#define _MM_WRAP_H_
-#include <sys/types.h>
-
-#include <pwd.h>
-
-#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 32247266..cd5f98c4 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 <sys/types.h>
+#include <sys/uio.h>
#include <errno.h>
+#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <stdarg.h>
#include "buffer.h"
#include "log.h"
diff --git a/nchan.c b/nchan.c
index 78908c3c..ad461f4a 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 <errno.h>
#include <string.h>
+#include <stdarg.h>
#include "ssh1.h"
#include "ssh2.h"
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index 2d56e7e4..a7ced57e 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 86d9272b..9f7a9861 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 acf72f77..f2e03f80 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -57,22 +57,20 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <signal.h>
#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 e8534fa2..0f95222d 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 <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/uio.h>
#include <errno.h>
#include <signal.h>
diff --git a/readconf.c b/readconf.c
index 9975c9d3..c57ea0c8 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -23,19 +23,22 @@
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
+#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#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 e99b1ff2..d484f258 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 <ylo@cs.hut.fi>
@@ -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 8af5d444..bd144c2e 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 c656291e..875b486c 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -62,11 +62,13 @@
#include "includes.h"
+#include <sys/types.h>
+
#include <string.h>
+#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 e22da596..a2d28cba 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 <openssl/evp.h>
+#include <sys/types.h>
#include <sectok.h>
#include <string.h>
+#include <openssl/evp.h>
+
+#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 14618226..82efe483 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 8d9de013..56a3e79f 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 <sys/time.h>
#endif
#include <sys/wait.h>
+#include <sys/uio.h>
#include <ctype.h>
#include <dirent.h>
diff --git a/servconf.c b/servconf.c
index b1fc45c5..5884b95b 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 <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -19,16 +19,20 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <signal.h>
#include <unistd.h>
+#include <stdarg.h>
+#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 0add6518..2593b1cd 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 <ylo@cs.hut.fi>
@@ -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 77c4a5a2..6e5fdc2d 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -54,6 +54,7 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
+#include <stdarg.h>
#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 a6d5ad25..1d63f9f5 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 <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -58,10 +58,10 @@
#include <string.h>
#include <unistd.h>
+#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 <kafs.h>
#endif
-#ifdef GSSAPI
-#include "ssh-gss.h"
-#endif
-
/* func */
Session *session_new(void);
diff --git a/session.h b/session.h
index c3a12821..ee9338e4 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 <sys/types.h>
-
-#include <pwd.h>
-
#define TTYSZ 64
typedef struct Session Session;
struct Session {
diff --git a/sftp-client.c b/sftp-client.c
index b7b126d2..e31b2cfa 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 <djm@openbsd.org>
*
@@ -24,25 +24,25 @@
#include <sys/types.h>
#include <sys/param.h>
+#include "openbsd-compat/sys-queue.h"
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
+#include <sys/uio.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
+#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#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 3faed373..7ebadcc5 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 <stdio.h>
#include <string.h>
#include <time.h>
+#include <stdarg.h>
+#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 9a64dc52..9b584846 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 <sys/types.h>
-#include <sys/stat.h>
-
-#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 f8549ea7..cdc27082 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 <djm@openbsd.org>
*
@@ -26,8 +26,8 @@
#include <string.h>
#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 c0839782..c57958b0 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 <sys/types.h>
@@ -30,13 +31,14 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <pwd.h>
#include <time.h>
#include <unistd.h>
+#include <stdarg.h>
+#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 82ef5801..cf3dea04 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 <djm@openbsd.org>
*
@@ -18,10 +18,10 @@
#include "includes.h"
#include <sys/types.h>
+#include <sys/ioctl.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/wait.h>
@@ -41,6 +41,7 @@ typedef void EditLine;
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <stdarg.h>
#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 a8d98fd1..518f4706 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -50,11 +50,12 @@
#include <string.h>
#include <unistd.h>
+#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 54c2b9c4..e43faae4 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -64,11 +64,10 @@
#include <string.h>
#include <unistd.h>
+#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 a8d45a2b..448f704f 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 <sys/types.h>
+
#include <openssl/bn.h>
#include <openssl/evp.h>
@@ -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 d3fd79bf..0837c9b7 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 <gssapi.h>
#elif defined(HAVE_GSSAPI_GSSAPI_H)
diff --git a/ssh-keygen.c b/ssh-keygen.c
index d8b793e8..c607e257 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 <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, 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 70154084..64d4d087 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 <dm@lcs.mit.edu>.
*
@@ -23,20 +23,21 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#include <signal.h>
#include <string.h>
#include <unistd.h>
#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 89fdbda3..1ddb2a05 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 <fcntl.h>
@@ -37,14 +38,13 @@
#include <openssl/rand.h>
#include <openssl/rsa.h>
+#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 236f77aa..28444c1f 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 <markus@openbsd.org>
*
@@ -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 <sys/types.h>
+
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -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 10dd8777..07a4ca3c 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -69,15 +69,14 @@
#include <openssl/evp.h>
#include <openssl/err.h>
+#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 ed5fb9aa..186cfff9 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 <ylo@cs.hut.fi>
@@ -12,18 +12,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#ifndef SSH_H
-#define SSH_H
-
-#include <netinet/in.h> /* For struct sockaddr_in */
-#include <pwd.h> /* For struct pw */
-#include <stdarg.h> /* For va_list */
-#include <syslog.h> /* For LOG_AUTH and friends */
-#include <sys/socket.h> /* For struct sockaddr_storage */
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#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 af75bba8..71ca4ec5 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,8 +37,10 @@
#include <string.h>
#include <unistd.h>
-#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 0b3896f9..4e66bbff 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 <sys/types.h>
-#include <sys/socket.h>
-
-#include <pwd.h>
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 f0eee3bd..51f1f808 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -15,30 +15,36 @@
#include "includes.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+
#include <openssl/bn.h>
#include <openssl/md5.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <signal.h>
+#include <pwd.h>
+#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 27e5442e..e58d078c 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 <sys/types.h>
+#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <errno.h>
+#include <pwd.h>
+#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#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 5cefd102..52c21e50 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -45,14 +45,15 @@
#include "includes.h"
#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#include <sys/ioctl.h>
-#include <sys/socket.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
+#include "openbsd-compat/sys-tree.h"
#include <sys/wait.h>
#include <errno.h>
@@ -77,28 +78,28 @@
#include <prot.h>
#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 b01fde09..fba8a4d2 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -43,9 +43,11 @@
#include <sys/types.h>
#include <sys/param.h>
+#include <sys/socket.h>
#include <errno.h>
#include <fcntl.h>
+#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
diff --git a/sshlogin.h b/sshlogin.h
index c0f9cd30..500d3fef 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 <ylo@cs.hut.fi>
@@ -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 <sys/types.h>
-#include <sys/socket.h>
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 719a7930..79c62ee9 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -14,8 +14,8 @@
#include "includes.h"
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/stat.h>
#include <signal.h>
@@ -26,11 +26,12 @@
# include <paths.h>
#endif
#include <pwd.h>
+#include <stdarg.h>
#include <string.h>
#include <termios.h>
#ifdef HAVE_UTIL_H
# include <util.h>
-#endif /* HAVE_UTIL_H */
+#endif
#include <unistd.h>
#include "sshpty.h"
diff --git a/sshpty.h b/sshpty.h
index a7b33747..7fac622d 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 <ylo@cs.hut.fi>
@@ -14,12 +14,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#ifndef SSHPTY_H
-#define SSHPTY_H
-
-#include <sys/types.h>
-
-#include <pwd.h>
#include <termios.h>
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 70668afd..04567669 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -37,8 +37,10 @@
#include "includes.h"
+#include <sys/types.h>
#include <stdio.h>
#include <termios.h>
+#include <pwd.h>
#include "sshpty.h"
diff --git a/ttymodes.c b/ttymodes.c
index 680909b2..d8e2c553 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -45,16 +45,18 @@
#include "includes.h"
+#include <sys/types.h>
+
#include <errno.h>
#include <string.h>
#include <termios.h>
+#include <stdarg.h>
#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 87825870..91d878c3 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -14,13 +14,12 @@
#include "includes.h"
-#include <sys/types.h>
#include <sys/param.h>
-
#include <errno.h>
#include <pwd.h>
#include <string.h>
#include <unistd.h>
+#include <stdarg.h>
#include <grp.h>
diff --git a/uidswap.h b/uidswap.h
index 436c10f7..1c1163d7 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 <ylo@cs.hut.fi>
@@ -12,16 +12,7 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#ifndef UIDSWAP_H
-#define UIDSWAP_H
-
-#include <sys/types.h>
-
-#include <pwd.h>
-
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 8a6742e9..a1394958 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 <sys/types.h>
-
#include <netinet/in.h>
-
#include <resolv.h>
#include <stdio.h>
diff --git a/uuencode.h b/uuencode.h
index df09eb59..fec55b49 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 <stdio.h>
-
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 6aea495e..9985b4cc 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 <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -16,7 +16,6 @@
#include "includes.h"
#include <sys/param.h>
-
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/xmalloc.h b/xmalloc.h
index 27f25d58..fb217a45 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 <ylo@cs.hut.fi>
@@ -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 */