summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/OVERVIEW3
-rw-r--r--usr.bin/ssh/atomicio.c5
-rw-r--r--usr.bin/ssh/atomicio.h7
-rw-r--r--usr.bin/ssh/auth-bsdauth.c11
-rw-r--r--usr.bin/ssh/auth-chall.c8
-rw-r--r--usr.bin/ssh/auth-krb5.c11
-rw-r--r--usr.bin/ssh/auth-options.c14
-rw-r--r--usr.bin/ssh/auth-options.h6
-rw-r--r--usr.bin/ssh/auth-passwd.c7
-rw-r--r--usr.bin/ssh/auth-rh-rsa.c10
-rw-r--r--usr.bin/ssh/auth-rhosts.c8
-rw-r--r--usr.bin/ssh/auth-rsa.c13
-rw-r--r--usr.bin/ssh/auth-skey.c5
-rw-r--r--usr.bin/ssh/auth.c13
-rw-r--r--usr.bin/ssh/auth.h11
-rw-r--r--usr.bin/ssh/auth1.c10
-rw-r--r--usr.bin/ssh/auth2-chall.c9
-rw-r--r--usr.bin/ssh/auth2-gss.c16
-rw-r--r--usr.bin/ssh/auth2-hostbased.c13
-rw-r--r--usr.bin/ssh/auth2-kbdint.c9
-rw-r--r--usr.bin/ssh/auth2-none.c12
-rw-r--r--usr.bin/ssh/auth2-passwd.c11
-rw-r--r--usr.bin/ssh/auth2-pubkey.c13
-rw-r--r--usr.bin/ssh/auth2.c12
-rw-r--r--usr.bin/ssh/authfd.c8
-rw-r--r--usr.bin/ssh/authfd.h4
-rw-r--r--usr.bin/ssh/authfile.c7
-rw-r--r--usr.bin/ssh/bufaux.c7
-rw-r--r--usr.bin/ssh/bufaux.h55
-rw-r--r--usr.bin/ssh/bufbn.c7
-rw-r--r--usr.bin/ssh/buffer.c5
-rw-r--r--usr.bin/ssh/buffer.h38
-rw-r--r--usr.bin/ssh/canohost.c7
-rw-r--r--usr.bin/ssh/channels.c11
-rw-r--r--usr.bin/ssh/channels.h4
-rw-r--r--usr.bin/ssh/cipher-3des1.c4
-rw-r--r--usr.bin/ssh/cipher-bf1.c4
-rw-r--r--usr.bin/ssh/cipher-ctr.c7
-rw-r--r--usr.bin/ssh/cipher.c5
-rw-r--r--usr.bin/ssh/cleanup.c5
-rw-r--r--usr.bin/ssh/clientloop.c11
-rw-r--r--usr.bin/ssh/compat.c7
-rw-r--r--usr.bin/ssh/compress.c6
-rw-r--r--usr.bin/ssh/deattack.c8
-rw-r--r--usr.bin/ssh/dh.c4
-rw-r--r--usr.bin/ssh/dispatch.c6
-rw-r--r--usr.bin/ssh/dns.c4
-rw-r--r--usr.bin/ssh/dns.h9
-rw-r--r--usr.bin/ssh/fatal.c4
-rw-r--r--usr.bin/ssh/groupaccess.c7
-rw-r--r--usr.bin/ssh/groupaccess.h4
-rw-r--r--usr.bin/ssh/gss-genr.c7
-rw-r--r--usr.bin/ssh/gss-serv-krb5.c11
-rw-r--r--usr.bin/ssh/gss-serv.c10
-rw-r--r--usr.bin/ssh/hostfile.c6
-rw-r--r--usr.bin/ssh/includes.h21
-rw-r--r--usr.bin/ssh/kex.c14
-rw-r--r--usr.bin/ssh/kex.h8
-rw-r--r--usr.bin/ssh/kexdh.c9
-rw-r--r--usr.bin/ssh/kexdhc.c7
-rw-r--r--usr.bin/ssh/kexdhs.c10
-rw-r--r--usr.bin/ssh/kexgex.c8
-rw-r--r--usr.bin/ssh/kexgexc.c7
-rw-r--r--usr.bin/ssh/kexgexs.c10
-rw-r--r--usr.bin/ssh/key.c6
-rw-r--r--usr.bin/ssh/key.h4
-rw-r--r--usr.bin/ssh/log.c6
-rw-r--r--usr.bin/ssh/log.h4
-rw-r--r--usr.bin/ssh/mac.c7
-rw-r--r--usr.bin/ssh/match.c6
-rw-r--r--usr.bin/ssh/md-sha256.c4
-rw-r--r--usr.bin/ssh/misc.c8
-rw-r--r--usr.bin/ssh/misc.h7
-rw-r--r--usr.bin/ssh/moduli.c5
-rw-r--r--usr.bin/ssh/monitor.c17
-rw-r--r--usr.bin/ssh/monitor_fdpass.c5
-rw-r--r--usr.bin/ssh/monitor_mm.c9
-rw-r--r--usr.bin/ssh/monitor_mm.h3
-rw-r--r--usr.bin/ssh/monitor_wrap.c21
-rw-r--r--usr.bin/ssh/monitor_wrap.h10
-rw-r--r--usr.bin/ssh/msg.c6
-rw-r--r--usr.bin/ssh/nchan.c5
-rw-r--r--usr.bin/ssh/packet.c12
-rw-r--r--usr.bin/ssh/progressmeter.c5
-rw-r--r--usr.bin/ssh/readconf.c9
-rw-r--r--usr.bin/ssh/readconf.h4
-rw-r--r--usr.bin/ssh/readpass.c4
-rw-r--r--usr.bin/ssh/rsa.c6
-rw-r--r--usr.bin/ssh/scard.c7
-rw-r--r--usr.bin/ssh/scard.h4
-rw-r--r--usr.bin/ssh/scp.c7
-rw-r--r--usr.bin/ssh/servconf.c10
-rw-r--r--usr.bin/ssh/servconf.h4
-rw-r--r--usr.bin/ssh/serverloop.c10
-rw-r--r--usr.bin/ssh/session.c19
-rw-r--r--usr.bin/ssh/session.h6
-rw-r--r--usr.bin/ssh/sftp-client.c13
-rw-r--r--usr.bin/ssh/sftp-common.c8
-rw-r--r--usr.bin/ssh/sftp-common.h7
-rw-r--r--usr.bin/ssh/sftp-glob.c6
-rw-r--r--usr.bin/ssh/sftp-server.c12
-rw-r--r--usr.bin/ssh/sftp.c8
-rw-r--r--usr.bin/ssh/ssh-add.c7
-rw-r--r--usr.bin/ssh/ssh-agent.c8
-rw-r--r--usr.bin/ssh/ssh-dss.c5
-rw-r--r--usr.bin/ssh/ssh-gss.h4
-rw-r--r--usr.bin/ssh/ssh-keygen.c6
-rw-r--r--usr.bin/ssh/ssh-keyscan.c9
-rw-r--r--usr.bin/ssh/ssh-keysign.c6
-rw-r--r--usr.bin/ssh/ssh-rsa.c6
-rw-r--r--usr.bin/ssh/ssh.c10
-rw-r--r--usr.bin/ssh/ssh.h7
-rw-r--r--usr.bin/ssh/sshconnect.c7
-rw-r--r--usr.bin/ssh/sshconnect.h11
-rw-r--r--usr.bin/ssh/sshconnect1.c14
-rw-r--r--usr.bin/ssh/sshconnect2.c11
-rw-r--r--usr.bin/ssh/sshd.c19
-rw-r--r--usr.bin/ssh/sshlogin.c6
-rw-r--r--usr.bin/ssh/sshlogin.h9
-rw-r--r--usr.bin/ssh/sshpty.c8
-rw-r--r--usr.bin/ssh/sshpty.h10
-rw-r--r--usr.bin/ssh/sshtty.c6
-rw-r--r--usr.bin/ssh/ttymodes.c6
-rw-r--r--usr.bin/ssh/uidswap.c7
-rw-r--r--usr.bin/ssh/uidswap.h11
-rw-r--r--usr.bin/ssh/uuencode.c6
-rw-r--r--usr.bin/ssh/uuencode.h8
-rw-r--r--usr.bin/ssh/xmalloc.c5
-rw-r--r--usr.bin/ssh/xmalloc.h7
129 files changed, 513 insertions, 613 deletions
diff --git a/usr.bin/ssh/OVERVIEW b/usr.bin/ssh/OVERVIEW
index 64b6f75fa73..2e1cc0ba3bb 100644
--- a/usr.bin/ssh/OVERVIEW
+++ b/usr.bin/ssh/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/usr.bin/ssh/atomicio.c b/usr.bin/ssh/atomicio.c
index 8f6d9f4c3a8..7c56bd45116 100644
--- a/usr.bin/ssh/atomicio.c
+++ b/usr.bin/ssh/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.
@@ -26,9 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/param.h>
+#include <sys/uio.h>
#include <errno.h>
#include <string.h>
diff --git a/usr.bin/ssh/atomicio.h b/usr.bin/ssh/atomicio.h
index 05b97ab8bf4..2fcd25d4326 100644
--- a/usr.bin/ssh/atomicio.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/auth-bsdauth.c b/usr.bin/ssh/auth-bsdauth.c
index c309e4a1149..62d9afd9de1 100644
--- a/usr.bin/ssh/auth-bsdauth.c
+++ b/usr.bin/ssh/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,19 @@
* (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/usr.bin/ssh/auth-chall.c b/usr.bin/ssh/auth-chall.c
index cef8b7442f4..477dc358f31 100644
--- a/usr.bin/ssh/auth-chall.c
+++ b/usr.bin/ssh/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.
*
@@ -23,11 +23,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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"
/* limited protocol v1 interface to kbd-interactive authentication */
diff --git a/usr.bin/ssh/auth-krb5.c b/usr.bin/ssh/auth-krb5.c
index 38d58f7b54e..94dff9f87de 100644
--- a/usr.bin/ssh/auth-krb5.c
+++ b/usr.bin/ssh/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.
*
@@ -28,15 +28,20 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/auth-options.c b/usr.bin/ssh/auth-options.c
index cd904967af4..a2fbed9d308 100644
--- a/usr.bin/ssh/auth-options.c
+++ b/usr.bin/ssh/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
@@ -10,24 +10,30 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#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/usr.bin/ssh/auth-options.h b/usr.bin/ssh/auth-options.h
index cd2b030cd46..853f8b517c1 100644
--- a/usr.bin/ssh/auth-options.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/auth-passwd.c b/usr.bin/ssh/auth-passwd.c
index 8202124b5c3..296945ac3c7 100644
--- a/usr.bin/ssh/auth-passwd.c
+++ b/usr.bin/ssh/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
@@ -36,18 +36,19 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#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/usr.bin/ssh/auth-rh-rsa.c b/usr.bin/ssh/auth-rh-rsa.c
index 8fa21e12c63..c5ac7b20a8f 100644
--- a/usr.bin/ssh/auth-rh-rsa.c
+++ b/usr.bin/ssh/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
@@ -13,22 +13,24 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#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/usr.bin/ssh/auth-rhosts.c b/usr.bin/ssh/auth-rhosts.c
index f73f8d4b135..9cbaf9daf28 100644
--- a/usr.bin/ssh/auth-rhosts.c
+++ b/usr.bin/ssh/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
@@ -14,8 +14,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
@@ -23,13 +21,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/usr.bin/ssh/auth-rsa.c b/usr.bin/ssh/auth-rsa.c
index f3e27e9faf9..00b14d57c81 100644
--- a/usr.bin/ssh/auth-rsa.c
+++ b/usr.bin/ssh/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
@@ -14,8 +14,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
@@ -26,18 +24,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/usr.bin/ssh/auth-skey.c b/usr.bin/ssh/auth-skey.c
index c6bd4362732..5588ae89f43 100644
--- a/usr.bin/ssh/auth-skey.c
+++ b/usr.bin/ssh/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,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"
#ifdef SKEY
+#include <sys/types.h>
+
#include <skey.h>
#include "xmalloc.h"
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c
index c9a4f09abbb..754b87e2fba 100644
--- a/usr.bin/ssh/auth.c
+++ b/usr.bin/ssh/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.
*
@@ -23,8 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
@@ -41,16 +39,19 @@
#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"
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
#include "monitor_wrap.h"
/* import */
diff --git a/usr.bin/ssh/auth.h b/usr.bin/ssh/auth.h
index 502083c1f96..39c9e532271 100644
--- a/usr.bin/ssh/auth.h
+++ b/usr.bin/ssh/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,10 @@
#ifndef AUTH_H
#define AUTH_H
-#include <sys/types.h>
+#include <signal.h>
#include <openssl/rsa.h>
-#include <pwd.h>
-#include <signal.h>
-#include <stdio.h>
-
#ifdef HAVE_LOGIN_CAP
#include <login_cap.h>
#endif
@@ -46,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/usr.bin/ssh/auth1.c b/usr.bin/ssh/auth1.c
index 7c6d4dff8aa..6a0f330e8a7 100644
--- a/usr.bin/ssh/auth1.c
+++ b/usr.bin/ssh/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
@@ -10,13 +10,12 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <pwd.h>
#include "xmalloc.h"
#include "rsa.h"
@@ -26,10 +25,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"
/* import */
diff --git a/usr.bin/ssh/auth2-chall.c b/usr.bin/ssh/auth2-chall.c
index d8fa8e4f437..8f0b6517d2f 100644
--- a/usr.bin/ssh/auth2-chall.c
+++ b/usr.bin/ssh/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,19 @@
* (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"
diff --git a/usr.bin/ssh/auth2-gss.c b/usr.bin/ssh/auth2-gss.c
index 03210673b1d..191dcc49ca7 100644
--- a/usr.bin/ssh/auth2-gss.c
+++ b/usr.bin/ssh/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.
@@ -24,20 +24,20 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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 +291,3 @@ Authmethod method_gssapi = {
userauth_gssapi,
&options.gss_authentication
};
-
-#endif /* GSSAPI */
diff --git a/usr.bin/ssh/auth2-hostbased.c b/usr.bin/ssh/auth2-hostbased.c
index 5cb617e1cbc..a467a741eba 100644
--- a/usr.bin/ssh/auth2-hostbased.c
+++ b/usr.bin/ssh/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.
*
@@ -23,24 +23,27 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
#include <sys/types.h>
#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/usr.bin/ssh/auth2-kbdint.c b/usr.bin/ssh/auth2-kbdint.c
index 465441a1647..99656e6b942 100644
--- a/usr.bin/ssh/auth2-kbdint.c
+++ b/usr.bin/ssh/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.
*
@@ -23,13 +23,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/auth2-none.c b/usr.bin/ssh/auth2-none.c
index 9b3595bc3cd..109f4e1e640 100644
--- a/usr.bin/ssh/auth2-none.c
+++ b/usr.bin/ssh/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.
*
@@ -23,21 +23,25 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
#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/usr.bin/ssh/auth2-passwd.c b/usr.bin/ssh/auth2-passwd.c
index c04a4954fb9..aae3096e6a7 100644
--- a/usr.bin/ssh/auth2-passwd.c
+++ b/usr.bin/ssh/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.
*
@@ -23,14 +23,21 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/auth2-pubkey.c b/usr.bin/ssh/auth2-pubkey.c
index 3cd3b1668c8..4b665b2cecd 100644
--- a/usr.bin/ssh/auth2-pubkey.c
+++ b/usr.bin/ssh/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.
*
@@ -23,29 +23,32 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
#include <sys/types.h>
#include <sys/stat.h>
#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/usr.bin/ssh/auth2.c b/usr.bin/ssh/auth2.c
index 168123672dc..7b322f8d5ec 100644
--- a/usr.bin/ssh/auth2.c
+++ b/usr.bin/ssh/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.
*
@@ -23,27 +23,29 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
#include <sys/types.h>
#include <pwd.h>
#include <string.h>
+#include <stdarg.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"
-
#ifdef GSSAPI
#include "ssh-gss.h"
#endif
+#include "monitor_wrap.h"
/* import */
extern ServerOptions options;
diff --git a/usr.bin/ssh/authfd.c b/usr.bin/ssh/authfd.c
index f8ee8051dac..c05c23c6d73 100644
--- a/usr.bin/ssh/authfd.c
+++ b/usr.bin/ssh/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
@@ -35,7 +35,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
#include <sys/types.h>
#include <sys/un.h>
@@ -43,16 +42,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/usr.bin/ssh/authfd.h b/usr.bin/ssh/authfd.h
index 8ad8f2e712c..3da2561127e 100644
--- a/usr.bin/ssh/authfd.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/authfile.c b/usr.bin/ssh/authfile.c
index f415724d435..c4ba0baa372 100644
--- a/usr.bin/ssh/authfile.c
+++ b/usr.bin/ssh/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
@@ -36,11 +36,11 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
#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 +53,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/usr.bin/ssh/bufaux.c b/usr.bin/ssh/bufaux.c
index a384cc6853c..0ec8e27b5df 100644
--- a/usr.bin/ssh/bufaux.c
+++ b/usr.bin/ssh/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
@@ -37,14 +37,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/bufaux.h b/usr.bin/ssh/bufaux.h
deleted file mode 100644
index 8a5359855fc..00000000000
--- a/usr.bin/ssh/bufaux.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* $OpenBSD: bufaux.h,v 1.22 2006/03/25 22:22:42 djm Exp $ */
-
-/*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
- * All rights reserved
- *
- * As far as I am concerned, the code I have written for this software
- * can be used freely for any purpose. Any derived versions of this
- * software must be clearly marked as such, and if the derived work is
- * incompatible with the protocol description in the RFC file, it must be
- * called by a name other than "ssh" or "Secure Shell".
- */
-
-#ifndef BUFAUX_H
-#define BUFAUX_H
-
-#include "buffer.h"
-#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 /* BUFAUX_H */
diff --git a/usr.bin/ssh/bufbn.c b/usr.bin/ssh/bufbn.c
index aa42ea62bc5..0732638c37e 100644
--- a/usr.bin/ssh/bufbn.c
+++ b/usr.bin/ssh/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
@@ -37,14 +37,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/buffer.c b/usr.bin/ssh/buffer.c
index 25868b94dea..8527c04839d 100644
--- a/usr.bin/ssh/buffer.c
+++ b/usr.bin/ssh/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
@@ -12,12 +12,11 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/param.h>
#include <stdio.h>
#include <string.h>
+#include <stdarg.h>
#include "xmalloc.h"
#include "buffer.h"
diff --git a/usr.bin/ssh/buffer.h b/usr.bin/ssh/buffer.h
index 43414ae99e5..ecc4aea8319 100644
--- a/usr.bin/ssh/buffer.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/canohost.c b/usr.bin/ssh/canohost.c
index 3c46f58e13b..207a3930034 100644
--- a/usr.bin/ssh/canohost.c
+++ b/usr.bin/ssh/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
@@ -12,8 +12,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/socket.h>
@@ -25,9 +23,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/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 8e17b62f0de..95d652369da 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/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
@@ -39,10 +39,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <sys/time.h>
@@ -57,21 +55,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/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h
index 86e7ee88a61..3c7c5faedb6 100644
--- a/usr.bin/ssh/channels.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/cipher-3des1.c b/usr.bin/ssh/cipher-3des1.c
index 95745318384..720a0634af4 100644
--- a/usr.bin/ssh/cipher-3des1.c
+++ b/usr.bin/ssh/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.
*
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
+#include <sys/types.h>
#include <openssl/evp.h>
diff --git a/usr.bin/ssh/cipher-bf1.c b/usr.bin/ssh/cipher-bf1.c
index dd5993f7090..fc572e0849b 100644
--- a/usr.bin/ssh/cipher-bf1.c
+++ b/usr.bin/ssh/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.
*
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
+#include <sys/types.h>
#include <openssl/evp.h>
diff --git a/usr.bin/ssh/cipher-ctr.c b/usr.bin/ssh/cipher-ctr.c
index af620305f7d..a067ff890e9 100644
--- a/usr.bin/ssh/cipher-ctr.c
+++ b/usr.bin/ssh/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>
*
@@ -14,15 +14,16 @@
* 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 <string.h>
#include <openssl/evp.h>
#include <openssl/aes.h>
-#include "log.h"
#include "xmalloc.h"
+#include "log.h"
const EVP_CIPHER *evp_aes_128_ctr(void);
void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c
index ff98a864a9e..29d2a1b8c07 100644
--- a/usr.bin/ssh/cipher.c
+++ b/usr.bin/ssh/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
@@ -35,11 +35,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/cleanup.c b/usr.bin/ssh/cleanup.c
index 4e6c79ce74e..227d391a739 100644
--- a/usr.bin/ssh/cleanup.c
+++ b/usr.bin/ssh/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>
*
@@ -15,7 +15,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <unistd.h>
+#include <stdarg.h>
#include "log.h"
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 9ca8180dcae..8c891058f72 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/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
@@ -59,10 +59,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/time.h>
@@ -76,20 +75,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/usr.bin/ssh/compat.c b/usr.bin/ssh/compat.c
index e1a8b2bfd1f..214660fdf63 100644
--- a/usr.bin/ssh/compat.c
+++ b/usr.bin/ssh/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.
*
@@ -23,14 +23,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/compress.c b/usr.bin/ssh/compress.c
index 8aba84efa00..bcaa26e3f65 100644
--- a/usr.bin/ssh/compress.c
+++ b/usr.bin/ssh/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
@@ -12,7 +12,9 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
+#include <sys/types.h>
+
+#include <stdarg.h>
#include "log.h"
#include "buffer.h"
diff --git a/usr.bin/ssh/deattack.c b/usr.bin/ssh/deattack.c
index 57a747da503..f28f33d7415 100644
--- a/usr.bin/ssh/deattack.c
+++ b/usr.bin/ssh/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
*
@@ -18,14 +18,16 @@
* <http://www.core-sdi.com>
*/
-#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/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c
index 4ca9491388a..289ca5954e6 100644
--- a/usr.bin/ssh/dh.c
+++ b/usr.bin/ssh/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.
*
@@ -23,8 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/param.h>
#include <openssl/bn.h>
diff --git a/usr.bin/ssh/dispatch.c b/usr.bin/ssh/dispatch.c
index c1d98a78e69..26a14b82c55 100644
--- a/usr.bin/ssh/dispatch.c
+++ b/usr.bin/ssh/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,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 <signal.h>
+#include <stdarg.h>
#include "ssh1.h"
#include "ssh2.h"
diff --git a/usr.bin/ssh/dns.c b/usr.bin/ssh/dns.c
index 008fc596fb1..e2505d9ca82 100644
--- a/usr.bin/ssh/dns.c
+++ b/usr.bin/ssh/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.
@@ -25,8 +25,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/usr.bin/ssh/dns.h b/usr.bin/ssh/dns.h
index 8f960182489..b2633a1fe98 100644
--- a/usr.bin/ssh/dns.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/fatal.c b/usr.bin/ssh/fatal.c
index 1f2cd0bc82d..52c8d586e98 100644
--- a/usr.bin/ssh/fatal.c
+++ b/usr.bin/ssh/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.
*
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
+#include <sys/types.h>
#include <stdarg.h>
diff --git a/usr.bin/ssh/groupaccess.c b/usr.bin/ssh/groupaccess.c
index 71a144be6af..976cdb01f52 100644
--- a/usr.bin/ssh/groupaccess.c
+++ b/usr.bin/ssh/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.
*
@@ -23,16 +23,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/param.h>
#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/usr.bin/ssh/groupaccess.h b/usr.bin/ssh/groupaccess.h
index b0baccfbf7a..04b44989401 100644
--- a/usr.bin/ssh/groupaccess.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/gss-genr.c b/usr.bin/ssh/gss-genr.c
index 4153d1e08e1..e434e9f5be2 100644
--- a/usr.bin/ssh/gss-genr.c
+++ b/usr.bin/ssh/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.
@@ -24,16 +24,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#ifdef GSSAPI
#include <sys/param.h>
#include <string.h>
+#include <stdarg.h>
#include "xmalloc.h"
-#include "bufaux.h"
+#include "buffer.h"
#include "log.h"
#include "ssh2.h"
diff --git a/usr.bin/ssh/gss-serv-krb5.c b/usr.bin/ssh/gss-serv-krb5.c
index 593b550da48..4cc6073381c 100644
--- a/usr.bin/ssh/gss-serv-krb5.c
+++ b/usr.bin/ssh/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.
@@ -24,15 +24,18 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#ifdef GSSAPI
#ifdef KRB5
-#include "auth.h"
+#include <sys/types.h>
+
#include "xmalloc.h"
+#include "key.h"
+#include "hostfile.h"
+#include "auth.h"
#include "log.h"
+#include "buffer.h"
#include "ssh-gss.h"
#include <krb5.h>
diff --git a/usr.bin/ssh/gss-serv.c b/usr.bin/ssh/gss-serv.c
index c033aad4fd5..4d4977f8e33 100644
--- a/usr.bin/ssh/gss-serv.c
+++ b/usr.bin/ssh/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.
@@ -24,18 +24,20 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
+#include <sys/types.h>
#ifdef GSSAPI
#include <string.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/usr.bin/ssh/hostfile.c b/usr.bin/ssh/hostfile.c
index 7ac69e7765c..f9d664a8266 100644
--- a/usr.bin/ssh/hostfile.c
+++ b/usr.bin/ssh/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
@@ -36,8 +36,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <netinet/in.h>
@@ -50,11 +48,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/usr.bin/ssh/includes.h b/usr.bin/ssh/includes.h
deleted file mode 100644
index cdcaa95948c..00000000000
--- a/usr.bin/ssh/includes.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* $OpenBSD: includes.h,v 1.58 2006/08/01 23:22:47 stevesk Exp $ */
-
-/*
- * Author: Tatu Ylonen <ylo@cs.hut.fi>
- * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
- * All rights reserved
- * This file includes most of the needed system headers.
- *
- * As far as I am concerned, the code I have written for this software
- * can be used freely for any purpose. Any derived versions of this
- * software must be clearly marked as such, and if the derived work is
- * incompatible with the protocol description in the RFC file, it must be
- * called by a name other than "ssh" or "Secure Shell".
- */
-
-#ifndef INCLUDES_H
-#define INCLUDES_H
-
-#include <sys/types.h>
-
-#endif /* INCLUDES_H */
diff --git a/usr.bin/ssh/kex.c b/usr.bin/ssh/kex.c
index 3ea5aa2ec33..dfde2bf27c7 100644
--- a/usr.bin/ssh/kex.c
+++ b/usr.bin/ssh/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.
*
@@ -23,25 +23,23 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#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/usr.bin/ssh/kex.h b/usr.bin/ssh/kex.h
index 9d43b027fc1..acf2121d5be 100644
--- a/usr.bin/ssh/kex.h
+++ b/usr.bin/ssh/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.
@@ -28,12 +28,6 @@
#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/usr.bin/ssh/kexdh.c b/usr.bin/ssh/kexdh.c
index 2d13127b864..8e6ae6348e4 100644
--- a/usr.bin/ssh/kexdh.c
+++ b/usr.bin/ssh/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.
*
@@ -23,13 +23,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/kexdhc.c b/usr.bin/ssh/kexdhc.c
index 9d123e74827..90bdbeda02f 100644
--- a/usr.bin/ssh/kexdhc.c
+++ b/usr.bin/ssh/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.
*
@@ -23,13 +23,16 @@
* 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 <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/usr.bin/ssh/kexdhs.c b/usr.bin/ssh/kexdhs.c
index c64cd77cbdc..49a610cf03b 100644
--- a/usr.bin/ssh/kexdhs.c
+++ b/usr.bin/ssh/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.
*
@@ -23,17 +23,23 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/kexgex.c b/usr.bin/ssh/kexgex.c
index 5ab6745a3ef..70206ef5c15 100644
--- a/usr.bin/ssh/kexgex.c
+++ b/usr.bin/ssh/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.
@@ -24,12 +24,14 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/kexgexc.c b/usr.bin/ssh/kexgexc.c
index 9c618ec6c32..111cb35d740 100644
--- a/usr.bin/ssh/kexgexc.c
+++ b/usr.bin/ssh/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.
@@ -24,13 +24,16 @@
* 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 <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/usr.bin/ssh/kexgexs.c b/usr.bin/ssh/kexgexs.c
index 0b01ed8002c..a86ee6b3a1e 100644
--- a/usr.bin/ssh/kexgexs.c
+++ b/usr.bin/ssh/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.
@@ -24,21 +24,25 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/param.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"
#include "dh.h"
#include "ssh2.h"
#include "compat.h"
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
#include "monitor_wrap.h"
void
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c
index 745c474f91c..8faf3304519 100644
--- a/usr.bin/ssh/key.c
+++ b/usr.bin/ssh/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,7 +32,8 @@
* (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>
@@ -44,7 +45,6 @@
#include "rsa.h"
#include "uuencode.h"
#include "buffer.h"
-#include "bufaux.h"
#include "log.h"
Key *
diff --git a/usr.bin/ssh/key.h b/usr.bin/ssh/key.h
index 57af279b894..6873dd7933e 100644
--- a/usr.bin/ssh/key.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/log.c b/usr.bin/ssh/log.c
index 10b1696a066..7f0988da3f5 100644
--- a/usr.bin/ssh/log.c
+++ b/usr.bin/ssh/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
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
+#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>
@@ -44,8 +44,8 @@
#include <unistd.h>
#include <vis.h>
-#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/usr.bin/ssh/log.h b/usr.bin/ssh/log.h
index 77970eec82e..c72da8ece85 100644
--- a/usr.bin/ssh/log.h
+++ b/usr.bin/ssh/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,8 +15,6 @@
#ifndef SSH_LOG_H
#define SSH_LOG_H
-#include <stdarg.h>
-
/* Supported syslog facilities and levels. */
typedef enum {
SYSLOG_FACILITY_DAEMON,
diff --git a/usr.bin/ssh/mac.c b/usr.bin/ssh/mac.c
index a59e7edf1fc..dc61eed35ea 100644
--- a/usr.bin/ssh/mac.c
+++ b/usr.bin/ssh/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.
*
@@ -23,15 +23,18 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/match.c b/usr.bin/ssh/match.c
index 8f12ef539ce..e8fcdc3f17c 100644
--- a/usr.bin/ssh/match.c
+++ b/usr.bin/ssh/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
@@ -35,13 +35,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#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/usr.bin/ssh/md-sha256.c b/usr.bin/ssh/md-sha256.c
index 561b5524bf1..98597c49762 100644
--- a/usr.bin/ssh/md-sha256.c
+++ b/usr.bin/ssh/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>
*
@@ -17,7 +17,7 @@
/* EVP wrapper for SHA256 */
-#include "includes.h"
+#include <sys/types.h>
#include <openssl/evp.h>
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index cf7c50cbb11..6bdaea1ada0 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/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.
@@ -24,10 +24,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/param.h>
@@ -45,9 +43,9 @@
#include <string.h>
#include <unistd.h>
+#include "xmalloc.h"
#include "misc.h"
#include "log.h"
-#include "xmalloc.h"
#include "ssh.h"
/* remove newline at end of string */
diff --git a/usr.bin/ssh/misc.h b/usr.bin/ssh/misc.h
index 1dded721527..072470badd5 100644
--- a/usr.bin/ssh/misc.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/moduli.c b/usr.bin/ssh/moduli.c
index a164b4f5dba..9c7bf56295a 100644
--- a/usr.bin/ssh/moduli.c
+++ b/usr.bin/ssh/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>
@@ -37,8 +37,6 @@
* Second step: test primes' safety (processor intensive)
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <openssl/bn.h>
@@ -46,6 +44,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdarg.h>
#include <time.h>
#include "xmalloc.h"
diff --git a/usr.bin/ssh/monitor.c b/usr.bin/ssh/monitor.c
index 43d73a6d5ad..3417bee88ba 100644
--- a/usr.bin/ssh/monitor.c
+++ b/usr.bin/ssh/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>
@@ -25,11 +25,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/socket.h>
+#include <sys/tree.h>
#include <sys/param.h>
#include <openssl/dh.h>
@@ -46,8 +45,13 @@
#include <skey.h>
#endif
+#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"
#include "zlib.h"
@@ -62,17 +66,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/usr.bin/ssh/monitor_fdpass.c b/usr.bin/ssh/monitor_fdpass.c
index c6cccce7e9f..cb2001e6d41 100644
--- a/usr.bin/ssh/monitor_fdpass.c
+++ b/usr.bin/ssh/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.
@@ -24,14 +24,13 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <errno.h>
#include <string.h>
+#include <stdarg.h>
#include "log.h"
#include "monitor_fdpass.h"
diff --git a/usr.bin/ssh/monitor_mm.c b/usr.bin/ssh/monitor_mm.c
index 74d012b2982..58ca194f002 100644
--- a/usr.bin/ssh/monitor_mm.c
+++ b/usr.bin/ssh/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.
@@ -24,16 +24,17 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
+#include <sys/types.h>
#include <sys/mman.h>
+#include <sys/tree.h>
#include <sys/param.h>
#include <errno.h>
#include <string.h>
+#include <stdarg.h>
-#include "ssh.h"
#include "xmalloc.h"
+#include "ssh.h"
#include "log.h"
#include "monitor_mm.h"
diff --git a/usr.bin/ssh/monitor_mm.h b/usr.bin/ssh/monitor_mm.h
index 3ec94be51e0..36a07a06df6 100644
--- a/usr.bin/ssh/monitor_mm.h
+++ b/usr.bin/ssh/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 <sys/tree.h>
struct mm_share {
RB_ENTRY(mm_share) next;
diff --git a/usr.bin/ssh/monitor_wrap.c b/usr.bin/ssh/monitor_wrap.c
index 819f6fb4f51..d2386382510 100644
--- a/usr.bin/ssh/monitor_wrap.c
+++ b/usr.bin/ssh/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>
@@ -25,8 +25,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <openssl/bn.h>
@@ -34,35 +32,36 @@
#include <errno.h>
#include <pwd.h>
+#include <signal.h>
#include <stdio.h>
#include <string.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"
#include "zlib.h"
#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 "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/usr.bin/ssh/monitor_wrap.h b/usr.bin/ssh/monitor_wrap.h
index bf7e6b50096..8bd82542a46 100644
--- a/usr.bin/ssh/monitor_wrap.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/msg.c b/usr.bin/ssh/msg.c
index 32247266848..8b82b2ecf97 100644
--- a/usr.bin/ssh/msg.c
+++ b/usr.bin/ssh/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,15 @@
* (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/usr.bin/ssh/nchan.c b/usr.bin/ssh/nchan.c
index 0b551fdb8c6..c94d5ea9353 100644
--- a/usr.bin/ssh/nchan.c
+++ b/usr.bin/ssh/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.
*
@@ -23,13 +23,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include <string.h>
+#include <stdarg.h>
#include "ssh1.h"
#include "ssh2.h"
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index cb4d35ecc98..98ebc687003 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/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
@@ -37,10 +37,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
-#include <sys/queue.h>
#include <sys/types.h>
+#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/param.h>
@@ -55,22 +53,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/usr.bin/ssh/progressmeter.c b/usr.bin/ssh/progressmeter.c
index a2e41812cba..b5b03db16c2 100644
--- a/usr.bin/ssh/progressmeter.c
+++ b/usr.bin/ssh/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.
*
@@ -23,10 +23,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/ioctl.h>
+#include <sys/uio.h>
#include <errno.h>
#include <signal.h>
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c
index 82b361b9f33..0fa142d1a9d 100644
--- a/usr.bin/ssh/readconf.c
+++ b/usr.bin/ssh/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
@@ -12,8 +12,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -23,19 +21,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/usr.bin/ssh/readconf.h b/usr.bin/ssh/readconf.h
index e99b1ff2569..d484f258ea5 100644
--- a/usr.bin/ssh/readconf.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/readpass.c b/usr.bin/ssh/readpass.c
index ac1d2213ada..b8b88ff3085 100644
--- a/usr.bin/ssh/readpass.c
+++ b/usr.bin/ssh/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.
*
@@ -23,8 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/usr.bin/ssh/rsa.c b/usr.bin/ssh/rsa.c
index c656291ed5b..ac06cfcad71 100644
--- a/usr.bin/ssh/rsa.c
+++ b/usr.bin/ssh/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
@@ -60,13 +60,13 @@
* [gone - had to be deleted - what a pity]
*/
-#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/usr.bin/ssh/scard.c b/usr.bin/ssh/scard.c
index f1e4d7f215e..911c9b0f398 100644
--- a/usr.bin/ssh/scard.c
+++ b/usr.bin/ssh/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.
*
@@ -24,16 +24,17 @@
*/
#ifdef SMARTCARD
-#include "includes.h"
+
+#include <sys/types.h>
#include <openssl/evp.h>
#include <sectok.h>
#include <string.h>
+#include "xmalloc.h"
#include "key.h"
#include "log.h"
-#include "xmalloc.h"
#include "misc.h"
#include "scard.h"
diff --git a/usr.bin/ssh/scard.h b/usr.bin/ssh/scard.h
index 146182261b4..82efe483922 100644
--- a/usr.bin/ssh/scard.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index 8bb8c426869..d0751729070 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/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).
@@ -71,13 +71,12 @@
*
*/
-#include "includes.h"
-
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/time.h>
-#include <sys/param.h>
+#include <sys/uio.h>
#include <ctype.h>
#include <dirent.h>
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c
index d0993c95a5e..1326409b621 100644
--- a/usr.bin/ssh/servconf.c
+++ b/usr.bin/ssh/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
@@ -10,8 +10,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/socket.h>
@@ -19,16 +17,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/usr.bin/ssh/servconf.h b/usr.bin/ssh/servconf.h
index 3665c07b3ae..ca757aa2def 100644
--- a/usr.bin/ssh/servconf.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 9d18d55df55..125a279250f 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/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
@@ -35,8 +35,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/socket.h>
@@ -52,6 +50,7 @@
#include <string.h>
#include <termios.h>
#include <unistd.h>
+#include <stdarg.h>
#include "xmalloc.h"
#include "packet.h"
@@ -64,13 +63,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/usr.bin/ssh/session.c b/usr.bin/ssh/session.c
index 15554742876..e19f09a052c 100644
--- a/usr.bin/ssh/session.c
+++ b/usr.bin/ssh/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
@@ -33,8 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/un.h>
@@ -52,10 +50,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"
@@ -63,7 +61,10 @@
#include "uidswap.h"
#include "compat.h"
#include "channels.h"
-#include "bufaux.h"
+#include "key.h"
+#include "cipher.h"
+#include "kex.h"
+#include "hostfile.h"
#include "auth.h"
#include "auth-options.h"
#include "pathnames.h"
@@ -73,17 +74,15 @@
#include "serverloop.h"
#include "canohost.h"
#include "session.h"
-#include "kex.h"
+#ifdef GSSAPI
+#include "ssh-gss.h"
+#endif
#include "monitor_wrap.h"
#ifdef KRB5
#include <kafs.h>
#endif
-#ifdef GSSAPI
-#include "ssh-gss.h"
-#endif
-
/* func */
Session *session_new(void);
diff --git a/usr.bin/ssh/session.h b/usr.bin/ssh/session.h
index c3a12821f8f..ee9338e4f5e 100644
--- a/usr.bin/ssh/session.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/sftp-client.c b/usr.bin/ssh/sftp-client.c
index 2716fd2defd..142187d2ae0 100644
--- a/usr.bin/ssh/sftp-client.c
+++ b/usr.bin/ssh/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>
*
@@ -20,13 +20,12 @@
/* XXX: remove all logging, only return status codes */
/* XXX: copy between two remote sites */
-#include "includes.h"
-
-#include <sys/queue.h>
#include <sys/types.h>
+#include <sys/queue.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/param.h>
+#include <sys/uio.h>
#include <errno.h>
#include <fcntl.h>
@@ -34,10 +33,10 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <stdarg.h>
-#include "buffer.h"
-#include "bufaux.h"
#include "xmalloc.h"
+#include "buffer.h"
#include "log.h"
#include "atomicio.h"
#include "progressmeter.h"
@@ -77,7 +76,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/usr.bin/ssh/sftp-common.c b/usr.bin/ssh/sftp-common.c
index 3faed373ee1..a24649c11c4 100644
--- a/usr.bin/ssh/sftp-common.c
+++ b/usr.bin/ssh/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.
@@ -24,8 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
@@ -35,11 +33,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/usr.bin/ssh/sftp-common.h b/usr.bin/ssh/sftp-common.h
index 9a64dc52208..9b5848462a2 100644
--- a/usr.bin/ssh/sftp-common.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/sftp-glob.c b/usr.bin/ssh/sftp-glob.c
index 5eba059dde3..7f3964997f3 100644
--- a/usr.bin/ssh/sftp-glob.c
+++ b/usr.bin/ssh/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>
*
@@ -15,8 +15,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
@@ -25,8 +23,8 @@
#include <string.h>
#include "xmalloc.h"
-
#include "sftp.h"
+#include "buffer.h"
#include "sftp-common.h"
#include "sftp-client.h"
diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c
index 5919f24875d..571d387d0e9 100644
--- a/usr.bin/ssh/sftp-server.c
+++ b/usr.bin/ssh/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,7 +14,6 @@
* 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 <sys/stat.h>
@@ -27,13 +26,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"
@@ -132,7 +132,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)
@@ -1205,7 +1205,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/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c
index 380d759018b..f033aff17e6 100644
--- a/usr.bin/ssh/sftp.c
+++ b/usr.bin/ssh/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>
*
@@ -15,10 +15,8 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include "includes.h"
-
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -33,6 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
+#include <stdarg.h>
#include "xmalloc.h"
#include "log.h"
@@ -40,6 +39,7 @@
#include "misc.h"
#include "sftp.h"
+#include "buffer.h"
#include "sftp-common.h"
#include "sftp-client.h"
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c
index 5ee12cfa143..3b8ed0e978e 100644
--- a/usr.bin/ssh/ssh-add.c
+++ b/usr.bin/ssh/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
@@ -35,8 +35,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/param.h>
@@ -50,11 +48,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/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c
index fffa7c0bb60..c65a54ad842 100644
--- a/usr.bin/ssh/ssh-agent.c
+++ b/usr.bin/ssh/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
@@ -34,8 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/resource.h>
#include <sys/types.h>
@@ -57,11 +56,10 @@
#include <time.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/usr.bin/ssh/ssh-dss.c b/usr.bin/ssh/ssh-dss.c
index a8d45a2b404..b89a0e3a848 100644
--- a/usr.bin/ssh/ssh-dss.c
+++ b/usr.bin/ssh/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.
*
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
+#include <sys/types.h>
#include <openssl/bn.h>
#include <openssl/evp.h>
@@ -32,7 +32,6 @@
#include "xmalloc.h"
#include "buffer.h"
-#include "bufaux.h"
#include "compat.h"
#include "log.h"
#include "key.h"
diff --git a/usr.bin/ssh/ssh-gss.h b/usr.bin/ssh/ssh-gss.h
index 1bc5dc80347..a307de4bc8d 100644
--- a/usr.bin/ssh/ssh-gss.h
+++ b/usr.bin/ssh/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"
-
#include <gssapi.h>
/* draft-ietf-secsh-gsskeyex-06 */
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index 5fe0df92f3d..87bb00b3a0b 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/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
@@ -12,10 +12,9 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/socket.h>
#include <sys/param.h>
#include <openssl/evp.h>
@@ -35,7 +34,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/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c
index 90a96fabef5..b1d7faec098 100644
--- a/usr.bin/ssh/ssh-keyscan.c
+++ b/usr.bin/ssh/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>.
*
@@ -7,8 +7,6 @@
* OpenBSD project by leaving this copyright notice intact.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/queue.h>
@@ -23,20 +21,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/usr.bin/ssh/ssh-keysign.c b/usr.bin/ssh/ssh-keysign.c
index f53df681b31..69f6cbf710c 100644
--- a/usr.bin/ssh/ssh-keysign.c
+++ b/usr.bin/ssh/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,7 +22,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.
*/
-#include "includes.h"
#include <sys/types.h>
@@ -37,14 +36,13 @@
#include <string.h>
#include <unistd.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/usr.bin/ssh/ssh-rsa.c b/usr.bin/ssh/ssh-rsa.c
index 236f77aac2a..aad8b66bc22 100644
--- a/usr.bin/ssh/ssh-rsa.c
+++ b/usr.bin/ssh/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,7 +14,8 @@
* 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 +25,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/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index a2066f1a9df..82dc82a0a05 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/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
@@ -40,8 +40,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
+#include <sys/types.h>
#include <sys/resource.h>
#include <sys/ioctl.h>
#include <sys/types.h>
@@ -65,15 +64,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"
@@ -1235,7 +1233,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/usr.bin/ssh/ssh.h b/usr.bin/ssh/ssh.h
index f0efd109ede..56953ee293a 100644
--- a/usr.bin/ssh/ssh.h
+++ b/usr.bin/ssh/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,9 +12,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#ifndef SSH_H
-#define SSH_H
-
/* Cipher used for encrypting authentication files. */
#define SSH_AUTHFILE_CIPHER SSH_CIPHER_3DES
@@ -101,5 +98,3 @@
/* Listen backlog for sshd, ssh-agent and forwarding sockets */
#define SSH_LISTEN_BACKLOG 128
-
-#endif /* SSH_H */
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index 9871dfb4b20..3c58b1be636 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/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
@@ -13,8 +13,6 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
@@ -27,14 +25,15 @@
#include <errno.h>
#include <netdb.h>
#include <paths.h>
+#include <signal.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include "ssh.h"
#include "xmalloc.h"
+#include "ssh.h"
#include "rsa.h"
#include "buffer.h"
#include "packet.h"
diff --git a/usr.bin/ssh/sshconnect.h b/usr.bin/ssh/sshconnect.h
index 0b3896f9ddc..4e66bbffc97 100644
--- a/usr.bin/ssh/sshconnect.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/sshconnect1.c b/usr.bin/ssh/sshconnect1.c
index f0eee3bdfcc..237b9095c3c 100644
--- a/usr.bin/ssh/sshconnect1.c
+++ b/usr.bin/ssh/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
@@ -13,7 +13,8 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
+#include <sys/types.h>
+#include <sys/socket.h>
#include <openssl/bn.h>
#include <openssl/md5.h>
@@ -21,24 +22,27 @@
#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/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 2d5b89050cc..b6b1bad5a63 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/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.
*
@@ -23,9 +23,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
+#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/queue.h>
#include <sys/stat.h>
@@ -33,16 +32,18 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
+#include <signal.h>
+#include <pwd.h>
#include <unistd.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/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index c0c463a656a..66b64a93f1c 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/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
@@ -42,16 +42,16 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/wait.h>
+#include <sys/tree.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <errno.h>
+#include <signal.h>
#include <fcntl.h>
#include <netdb.h>
#include <paths.h>
@@ -66,28 +66,28 @@
#include <openssl/md5.h>
#include <openssl/rand.h>
+#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"
@@ -96,6 +96,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/usr.bin/ssh/sshlogin.c b/usr.bin/ssh/sshlogin.c
index 09fd7a69fe1..44bf5c65331 100644
--- a/usr.bin/ssh/sshlogin.c
+++ b/usr.bin/ssh/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
@@ -39,10 +39,9 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
#include <sys/param.h>
+#include <sys/socket.h>
#include <errno.h>
#include <fcntl.h>
@@ -52,6 +51,7 @@
#include <unistd.h>
#include <util.h>
#include <utmp.h>
+#include <stdarg.h>
#include "sshlogin.h"
#include "log.h"
diff --git a/usr.bin/ssh/sshlogin.h b/usr.bin/ssh/sshlogin.h
index bf6265a70a5..17bdb2d9755 100644
--- a/usr.bin/ssh/sshlogin.h
+++ b/usr.bin/ssh/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,16 +11,9 @@
* 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);
void record_logout(pid_t, const char *);
time_t get_last_login_time(uid_t, const char *, char *, size_t);
-
-#endif
diff --git a/usr.bin/ssh/sshpty.c b/usr.bin/ssh/sshpty.c
index 871ba03aa33..5c2bdc27299 100644
--- a/usr.bin/ssh/sshpty.c
+++ b/usr.bin/ssh/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
@@ -12,12 +12,9 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
-#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <sys/stat.h>
-
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
@@ -27,6 +24,7 @@
#include <termios.h>
#include <unistd.h>
#include <util.h>
+#include <stdarg.h>
#include "sshpty.h"
#include "log.h"
diff --git a/usr.bin/ssh/sshpty.h b/usr.bin/ssh/sshpty.h
index a7b33747424..7fac622d9be 100644
--- a/usr.bin/ssh/sshpty.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/sshtty.c b/usr.bin/ssh/sshtty.c
index 70668afde41..5245817f44f 100644
--- a/usr.bin/ssh/sshtty.c
+++ b/usr.bin/ssh/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
@@ -35,10 +35,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
+#include <sys/types.h>
#include <stdio.h>
#include <termios.h>
+#include <pwd.h>
#include "sshpty.h"
diff --git a/usr.bin/ssh/ttymodes.c b/usr.bin/ssh/ttymodes.c
index 6cb0d4e774f..e7096816d95 100644
--- a/usr.bin/ssh/ttymodes.c
+++ b/usr.bin/ssh/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
@@ -43,18 +43,18 @@
* suitable code.
*/
-#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/usr.bin/ssh/uidswap.c b/usr.bin/ssh/uidswap.c
index 956746b26ca..281aec4afe1 100644
--- a/usr.bin/ssh/uidswap.c
+++ b/usr.bin/ssh/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
@@ -12,15 +12,12 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#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 "log.h"
#include "uidswap.h"
diff --git a/usr.bin/ssh/uidswap.h b/usr.bin/ssh/uidswap.h
index 436c10f7569..1c1163d7545 100644
--- a/usr.bin/ssh/uidswap.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/uuencode.c b/usr.bin/ssh/uuencode.c
index 8a6742e95c5..ae72c27535d 100644
--- a/usr.bin/ssh/uuencode.c
+++ b/usr.bin/ssh/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.
*
@@ -23,12 +23,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "includes.h"
-
#include <sys/types.h>
-
#include <netinet/in.h>
-
#include <resolv.h>
#include <stdio.h>
diff --git a/usr.bin/ssh/uuencode.h b/usr.bin/ssh/uuencode.h
index df09eb59be0..fec55b49129 100644
--- a/usr.bin/ssh/uuencode.h
+++ b/usr.bin/ssh/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/usr.bin/ssh/xmalloc.c b/usr.bin/ssh/xmalloc.c
index 6aea495ef93..51a6d635dcc 100644
--- a/usr.bin/ssh/xmalloc.c
+++ b/usr.bin/ssh/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
@@ -13,10 +13,7 @@
* called by a name other than "ssh" or "Secure Shell".
*/
-#include "includes.h"
-
#include <sys/param.h>
-
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/usr.bin/ssh/xmalloc.h b/usr.bin/ssh/xmalloc.h
index 27f25d584b1..fb217a45c90 100644
--- a/usr.bin/ssh/xmalloc.h
+++ b/usr.bin/ssh/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 */