add ExitOnForwardFailure: terminate the connection if ssh(1)
cannot set up all requested dynamic, local, and remote port
forwardings. ok djm, dtucker, stevesk, jmc
+ - stevesk@cvs.openbsd.org 2006/07/11 20:07:25
+ [scp.c auth.c monitor.c serverloop.c sftp-server.c sshpty.c readpass.c
+ sshd.c monitor_wrap.c monitor_fdpass.c ssh-agent.c ttymodes.c atomicio.c
+ includes.h session.c sshlogin.c monitor_mm.c packet.c sshconnect2.c
+ sftp-client.c nchan.c clientloop.c sftp.c misc.c canohost.c channels.c
+ ssh-keygen.c progressmeter.c uidswap.c msg.c readconf.c sshconnect.c]
+ move #include <errno.h> out of includes.h; ok markus@
20060711
- (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c
-/* $OpenBSD: atomicio.c,v 1.19 2006/04/16 07:59:00 djm Exp $ */
+/* $OpenBSD: atomicio.c,v 1.20 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2006 Damien Miller. All rights reserved.
* Copyright (c) 2005 Anil Madhavapeddy. All rights reserved.
#include "includes.h"
+#include <errno.h>
+
#include "atomicio.h"
/*
-/* $OpenBSD: auth.c,v 1.69 2006/07/10 16:37:36 stevesk Exp $ */
+/* $OpenBSD: auth.c,v 1.70 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
-/* $OpenBSD: canohost.c,v 1.55 2006/07/08 21:47:12 stevesk Exp $ */
+/* $OpenBSD: canohost.c,v 1.56 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <netinet/in.h>
#include <ctype.h>
+#include <errno.h>
#include "packet.h"
#include "xmalloc.h"
-/* $OpenBSD: channels.c,v 1.253 2006/07/11 18:50:47 markus Exp $ */
+/* $OpenBSD: channels.c,v 1.254 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <errno.h>
#include <termios.h>
#include "ssh.h"
-/* $OpenBSD: clientloop.c,v 1.167 2006/07/11 18:50:47 markus Exp $ */
+/* $OpenBSD: clientloop.c,v 1.168 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <sys/ioctl.h>
#include <ctype.h>
+#include <errno.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
-/* $OpenBSD: includes.h,v 1.48 2006/07/10 16:37:36 stevesk Exp $ */
+/* $OpenBSD: includes.h,v 1.49 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
#define _GNU_SOURCE /* activate extra prototypes for glibc */
#include <stdio.h>
-#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
-/* $OpenBSD: misc.c,v 1.57 2006/07/10 16:37:36 stevesk Exp $ */
+/* $OpenBSD: misc.c,v 1.58 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
#include <netinet/in.h>
#include <netinet/tcp.h>
+#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
-/* $OpenBSD: monitor.c,v 1.80 2006/07/09 15:15:10 stevesk Exp $ */
+/* $OpenBSD: monitor.c,v 1.81 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
#include <sys/socket.h>
#include <sys/wait.h>
+#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
-/* $OpenBSD: monitor_fdpass.c,v 1.9 2006/07/08 21:47:12 stevesk Exp $ */
+/* $OpenBSD: monitor_fdpass.c,v 1.10 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
#include <sys/socket.h>
#include <sys/uio.h>
+#include <errno.h>
+
#include "log.h"
#include "monitor_fdpass.h"
-/* $OpenBSD: monitor_mm.c,v 1.11 2006/03/25 13:17:02 djm Exp $ */
+/* $OpenBSD: monitor_mm.c,v 1.12 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
#include "includes.h"
+#include <errno.h>
+
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
-/* $OpenBSD: monitor_wrap.c,v 1.46 2006/07/06 16:03:53 stevesk Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.47 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
#include <openssl/bn.h>
#include <openssl/dh.h>
+#include <errno.h>
#include <pwd.h>
#include "ssh.h"
-/* $OpenBSD: msg.c,v 1.11 2006/03/30 09:58:15 djm Exp $ */
+/* $OpenBSD: msg.c,v 1.12 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2002 Markus Friedl. All rights reserved.
*
*/
#include "includes.h"
+#include <errno.h>
+
#include "buffer.h"
#include "log.h"
#include "atomicio.h"
-/* $OpenBSD: nchan.c,v 1.54 2006/07/08 21:47:12 stevesk Exp $ */
+/* $OpenBSD: nchan.c,v 1.55 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved.
*
#include <sys/types.h>
#include <sys/socket.h>
+#include <errno.h>
+
#include "ssh1.h"
#include "ssh2.h"
#include "buffer.h"
-/* $OpenBSD: packet.c,v 1.134 2006/07/10 16:37:36 stevesk Exp $ */
+/* $OpenBSD: packet.c,v 1.135 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <netinet/in.h>
#include <netinet/ip.h>
+#include <errno.h>
#include <stdarg.h>
#include "xmalloc.h"
-/* $OpenBSD: progressmeter.c,v 1.29 2006/03/25 13:17:02 djm Exp $ */
+/* $OpenBSD: progressmeter.c,v 1.30 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2003 Nils Nordman. All rights reserved.
*
#include <sys/ioctl.h>
+#include <errno.h>
#include <signal.h>
#include "progressmeter.h"
-/* $OpenBSD: readconf.c,v 1.153 2006/07/11 18:50:48 markus Exp $ */
+/* $OpenBSD: readconf.c,v 1.154 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <netinet/in.h>
#include <ctype.h>
+#include <errno.h>
#include "ssh.h"
#include "xmalloc.h"
-/* $OpenBSD: readpass.c,v 1.41 2006/07/10 16:37:36 stevesk Exp $ */
+/* $OpenBSD: readpass.c,v 1.42 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
*
#include <sys/types.h>
#include <sys/wait.h>
+#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
-/* $OpenBSD: scp.c,v 1.146 2006/07/10 16:37:36 stevesk Exp $ */
+/* $OpenBSD: scp.c,v 1.147 2006/07/11 20:07:25 stevesk Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
#include <ctype.h>
#include <dirent.h>
+#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <signal.h>
-/* $OpenBSD: serverloop.c,v 1.138 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: serverloop.c,v 1.139 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <netinet/in.h>
+#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <signal.h>
-/* $OpenBSD: session.c,v 1.208 2006/07/11 18:50:48 markus Exp $ */
+/* $OpenBSD: session.c,v 1.209 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
#include <sys/wait.h>
#include <sys/un.h>
+#include <errno.h>
#include <grp.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
-/* $OpenBSD: sftp-client.c,v 1.66 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.67 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
# include <sys/stat.h>
#endif
+#include <errno.h>
#include <fcntl.h>
#include <signal.h>
-/* $OpenBSD: sftp-server.c,v 1.61 2006/07/10 11:25:53 djm Exp $ */
+/* $OpenBSD: sftp-server.c,v 1.62 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
*
#include <sys/stat.h>
#include <dirent.h>
+#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
-/* $OpenBSD: sftp.c,v 1.84 2006/07/10 16:01:57 stevesk Exp $ */
+/* $OpenBSD: sftp.c,v 1.85 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
#include <sys/socket.h>
#include <sys/wait.h>
+#include <errno.h>
+
#ifdef HAVE_PATHS_H
# include <paths.h>
#endif
-/* $OpenBSD: ssh-agent.c,v 1.142 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.143 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include "openbsd-compat/sys-queue.h"
#include <sys/resource.h>
+#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
-/* $OpenBSD: ssh-keygen.c,v 1.147 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.148 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <openssl/evp.h>
#include <openssl/pem.h>
+#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
# include <paths.h>
-/* $OpenBSD: sshconnect.c,v 1.189 2006/07/10 12:46:51 dtucker Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.190 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <netinet/in.h>
#include <ctype.h>
+#include <errno.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
-/* $OpenBSD: sshconnect2.c,v 1.155 2006/06/08 14:45:49 markus Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.156 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
*
#include <sys/wait.h>
#include <sys/stat.h>
+#include <errno.h>
+
#include "openbsd-compat/sys-queue.h"
#include "ssh.h"
-/* $OpenBSD: sshd.c,v 1.335 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: sshd.c,v 1.336 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <sys/socket.h>
#include <sys/wait.h>
+#include <errno.h>
#include <fcntl.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
-/* $OpenBSD: sshlogin.c,v 1.18 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: sshlogin.c,v 1.19 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include "includes.h"
+#include <errno.h>
#include <fcntl.h>
#include "loginrec.h"
-/* $OpenBSD: sshpty.c,v 1.22 2006/07/09 15:15:11 stevesk Exp $ */
+/* $OpenBSD: sshpty.c,v 1.23 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <sys/stat.h>
#include <signal.h>
+#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#ifdef HAVE_PATHS_H
-/* $OpenBSD: ttymodes.c,v 1.23 2006/03/25 13:17:03 djm Exp $ */
+/* $OpenBSD: ttymodes.c,v 1.24 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include "includes.h"
+#include <errno.h>
#include <termios.h>
#include "packet.h"
-/* $OpenBSD: uidswap.c,v 1.30 2006/07/06 16:03:53 stevesk Exp $ */
+/* $OpenBSD: uidswap.c,v 1.31 2006/07/11 20:07:25 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
#include <sys/types.h>
+#include <errno.h>
#include <pwd.h>
#include <grp.h>