From 6645e7a70d1b46b2cb408e1a13755c300a0d47c2 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Wed, 15 Mar 2006 14:42:54 +1100 Subject: - (djm) [auth-pam.c clientloop.c includes.h monitor.c session.c] [sftp-client.c ssh-keysign.c ssh.c sshconnect.c sshconnect2.c] [sshd.c openbsd-compat/bsd-misc.c openbsd-compat/bsd-openpty.c] [openbsd-compat/glob.c openbsd-compat/mktemp.c] [openbsd-compat/readpassphrase.c] Lots of include fixes for OpenSolaris --- openbsd-compat/glob.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openbsd-compat/glob.c') diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index f6a04ea3f..fd3d86c4c 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -34,6 +34,9 @@ /* OPENBSD ORIGINAL: lib/libc/gen/glob.c */ #include "includes.h" +#include +#include +#include #include static long -- cgit v1.2.3 From a1738e4c65108b9c549c66c3a668a04b86c1530c Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 10 Jul 2006 21:33:04 +1000 Subject: - (djm) [loginrec.c ssh-rand-helper.c sshd.c openbsd-compat/glob.c] [openbsd-compat/mktemp.c openbsd-compat/openbsd-compat.h] [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] [openbsd-compat/xcrypt.c] Fix includes.h fallout, mainly fcntl.h --- ChangeLog | 6 +++++- loginrec.c | 1 + openbsd-compat/glob.c | 1 + openbsd-compat/mktemp.c | 1 + openbsd-compat/openbsd-compat.h | 8 ++++---- openbsd-compat/port-tun.c | 3 +++ openbsd-compat/readpassphrase.c | 1 + openbsd-compat/xcrypt.c | 3 +++ ssh-rand-helper.c | 1 + sshd.c | 1 + 10 files changed, 21 insertions(+), 5 deletions(-) (limited to 'openbsd-compat/glob.c') diff --git a/ChangeLog b/ChangeLog index 9646e8c42..30356693d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -83,6 +83,10 @@ - djm@cvs.openbsd.org 2006/07/10 11:25:53 [sftp-server.c] don't log variables that aren't yet set + - (djm) [loginrec.c ssh-rand-helper.c sshd.c openbsd-compat/glob.c] + [openbsd-compat/mktemp.c openbsd-compat/openbsd-compat.h] + [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] + [openbsd-compat/xcrypt.c] Fix includes.h fallout, mainly fcntl.h 20060706 - (dtucker) [configure.ac] Try AIX blibpath test in different order when @@ -4816,4 +4820,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4380 2006/07/10 11:31:27 djm Exp $ +$Id: ChangeLog,v 1.4381 2006/07/10 11:33:04 djm Exp $ diff --git a/loginrec.c b/loginrec.c index 42f022fd9..a27a3ae61 100644 --- a/loginrec.c +++ b/loginrec.c @@ -153,6 +153,7 @@ #include +#include #include #include "ssh.h" diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index fd3d86c4c..439d2f50d 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -38,6 +38,7 @@ #include #include #include +#include static long get_arg_max(void) diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index 53a50c512..75a339156 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -37,6 +37,7 @@ #include #include +#include #include #if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 37c979fa4..6231e03a2 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -1,4 +1,4 @@ -/* $Id: openbsd-compat.h,v 1.37 2006/06/30 00:51:32 dtucker Exp $ */ +/* $Id: openbsd-compat.h,v 1.38 2006/07/10 11:33:05 djm Exp $ */ /* * Copyright (c) 1999-2003 Damien Miller. All rights reserved. @@ -31,6 +31,9 @@ #include "includes.h" +#include +#include + /* OpenBSD function replacements */ #include "base64.h" #include "sigact.h" @@ -131,8 +134,6 @@ int BSDgetopt(int argc, char * const *argv, const char *opts); #include "bsd-misc.h" #include "bsd-waitpid.h" -/*#include XXX Still needed? * For uid_t, gid_t * */ - #ifndef HAVE_GETPEEREID int getpeereid(int , uid_t *, gid_t *); #endif @@ -177,7 +178,6 @@ void *xmmap(size_t size); char *xcrypt(const char *password, const char *salt); char *shadow_pw(struct passwd *pw); - /* rfc2553 socket API replacements */ #include "fake-rfc2553.h" diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c index 6e1fed969..a87b809d5 100644 --- a/openbsd-compat/port-tun.c +++ b/openbsd-compat/port-tun.c @@ -16,9 +16,12 @@ #include "includes.h" +#include #include #include +#include + #include "log.h" #include "misc.h" #include "bufaux.h" diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index 95e26dcd4..95c0af815 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef TCSASOFT diff --git a/openbsd-compat/xcrypt.c b/openbsd-compat/xcrypt.c index 9afa0b9f2..5d260f2c2 100644 --- a/openbsd-compat/xcrypt.c +++ b/openbsd-compat/xcrypt.c @@ -24,6 +24,9 @@ #include "includes.h" +#include +#include + # ifdef HAVE_CRYPT_H # include # endif diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index feb1bfb18..ebee90014 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -36,6 +36,7 @@ # include #endif +#include #include #include diff --git a/sshd.c b/sshd.c index 591622fd0..602116edf 100644 --- a/sshd.c +++ b/sshd.c @@ -56,6 +56,7 @@ #ifdef HAVE_PATHS_H #include #endif +#include #include #include -- cgit v1.2.3 From 2c1a02a8d03069163d8cae21484f4e5656e904fe Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Wed, 12 Jul 2006 22:40:50 +1000 Subject: - (dtucker) [loginrec.c openbsd-compat/xmmap.c openbsd-compat/bindresvport.c openbsd-compat/glob.c openbsd-compat/mktemp.c openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c openbsd-compat/strtonum.c] Include . --- ChangeLog | 6 ++++-- loginrec.c | 1 + openbsd-compat/bindresvport.c | 2 ++ openbsd-compat/glob.c | 2 ++ openbsd-compat/mktemp.c | 2 ++ openbsd-compat/port-tun.c | 1 + openbsd-compat/readpassphrase.c | 1 + openbsd-compat/strtonum.c | 1 + 8 files changed, 14 insertions(+), 2 deletions(-) (limited to 'openbsd-compat/glob.c') diff --git a/ChangeLog b/ChangeLog index eff2102d5..4f585990b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -55,7 +55,9 @@ will allow port forwarding by all users except "anoncvs". Currently only a very small subset of directives are supported. ok djm@ - - (dtucker) [openbsd-compat/xmmap.c] Include . + - (dtucker) [loginrec.c openbsd-compat/xmmap.c openbsd-compat/bindresvport.c + openbsd-compat/glob.c openbsd-compat/mktemp.c openbsd-compat/port-tun.c + openbsd-compat/readpassphrase.c openbsd-compat/strtonum.c] Include . 20060711 - (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c @@ -4905,4 +4907,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4401 2006/07/12 12:35:51 dtucker Exp $ +$Id: ChangeLog,v 1.4402 2006/07/12 12:40:50 dtucker Exp $ diff --git a/loginrec.c b/loginrec.c index a27a3ae61..8299b79e4 100644 --- a/loginrec.c +++ b/loginrec.c @@ -153,6 +153,7 @@ #include +#include #include #include diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index 7f48fd03a..2c16233c9 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -36,6 +36,8 @@ #include "includes.h" +#include + #define STARTPORT 600 #define ENDPORT (IPPORT_RESERVED - 1) #define NPORTS (ENDPORT - STARTPORT + 1) diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index 439d2f50d..bba4c0976 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -34,10 +34,12 @@ /* OPENBSD ORIGINAL: lib/libc/gen/glob.c */ #include "includes.h" + #include #include #include #include +#include #include static long diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index 75a339156..b8b0793a6 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -37,8 +37,10 @@ #include #include + #include #include +#include #if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c index bee6b160c..9806eec7d 100644 --- a/openbsd-compat/port-tun.c +++ b/openbsd-compat/port-tun.c @@ -21,6 +21,7 @@ #include #include +#include #include #include "log.h" diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index 95c0af815..fd9731ac6 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef TCSASOFT # define _T_FLUSH (TCSAFLUSH|TCSASOFT) diff --git a/openbsd-compat/strtonum.c b/openbsd-compat/strtonum.c index 8ad0d0058..35c5c18b9 100644 --- a/openbsd-compat/strtonum.c +++ b/openbsd-compat/strtonum.c @@ -22,6 +22,7 @@ #include "includes.h" #ifndef HAVE_STRTONUM #include +#include #define INVALID 1 #define TOOSMALL 2 -- cgit v1.2.3 From b8fe89c4d97ea9a5d7efb2c60108b8a7644f6a49 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:51:00 +1000 Subject: - (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c] [canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c] [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c] [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c] [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c] [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c] [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c] [openbsd-compat/mktemp.c openbsd-compat/port-linux.c] [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c] make the portable tree compile again - sprinkle unistd.h and string.h back in. Don't redefine __unused, as it turned out to be used in headers on Linux, and replace its use in auth-pam.c with ARGSUSED --- ChangeLog | 15 ++++++++++++++- acss.c | 5 ++++- auth-krb5.c | 2 ++ auth-options.c | 4 +--- auth-pam.c | 11 ++++++++--- auth-shadow.c | 1 + canohost.c | 4 +--- channels.c | 4 +--- cipher-acss.c | 3 +++ defines.h | 7 +------ dns.c | 4 +--- gss-genr.c | 1 + gss-serv-krb5.c | 2 ++ gss-serv.c | 1 + log.h | 2 ++ loginrec.c | 2 ++ logintest.c | 4 +--- openbsd-compat/bindresvport.c | 1 + openbsd-compat/bsd-arc4random.c | 4 ++++ openbsd-compat/bsd-misc.c | 1 + openbsd-compat/getrrsetbyname.c | 2 ++ openbsd-compat/glob.c | 2 ++ openbsd-compat/mktemp.c | 1 + openbsd-compat/port-linux.c | 5 ++++- openbsd-compat/port-tun.c | 2 ++ openbsd-compat/readpassphrase.c | 2 ++ openbsd-compat/setproctitle.c | 1 + openbsd-compat/xmmap.c | 4 +++- readconf.c | 4 +--- servconf.c | 4 +--- ssh-keygen.c | 4 +--- ssh-keyscan.c | 4 +--- ssh-keysign.c | 2 +- ssh-rand-helper.c | 2 ++ ssh.c | 4 +--- sshconnect.c | 4 +--- sshd.c | 4 +--- 37 files changed, 79 insertions(+), 50 deletions(-) (limited to 'openbsd-compat/glob.c') diff --git a/ChangeLog b/ChangeLog index 7f7679402..d2cd9b597 100644 --- a/ChangeLog +++ b/ChangeLog @@ -99,6 +99,19 @@ [auth.h dispatch.c kex.h sftp-client.c] #include for sig_atomic_t; need this prior to move + - (djm) [acss.c auth-krb5.c auth-options.c auth-pam.c auth-shadow.c] + [canohost.c channels.c cipher-acss.c defines.h dns.c gss-genr.c] + [gss-serv-krb5.c gss-serv.c log.h loginrec.c logintest.c readconf.c] + [servconf.c ssh-keygen.c ssh-keyscan.c ssh-keysign.c ssh-rand-helper.c] + [ssh.c sshconnect.c sshd.c openbsd-compat/bindresvport.c] + [openbsd-compat/bsd-arc4random.c openbsd-compat/bsd-misc.c] + [openbsd-compat/getrrsetbyname.c openbsd-compat/glob.c] + [openbsd-compat/mktemp.c openbsd-compat/port-linux.c] + [openbsd-compat/port-tun.c openbsd-compat/readpassphrase.c] + [openbsd-compat/setproctitle.c openbsd-compat/xmmap.c] + make the portable tree compile again - sprinkle unistd.h and string.h + back in. Don't redefine __unused, as it turned out to be used in + headers on Linux, and replace its use in auth-pam.c with ARGSUSED 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -5017,4 +5030,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4429 2006/07/24 04:14:19 djm Exp $ +$Id: ChangeLog,v 1.4430 2006/07/24 04:51:00 djm Exp $ diff --git a/acss.c b/acss.c index 99efde071..86e2c01a8 100644 --- a/acss.c +++ b/acss.c @@ -1,4 +1,4 @@ -/* $Id: acss.c,v 1.3 2005/07/17 07:04:47 djm Exp $ */ +/* $Id: acss.c,v 1.4 2006/07/24 04:51:01 djm Exp $ */ /* * Copyright (c) 2004 The OpenBSD project * @@ -16,6 +16,9 @@ */ #include "includes.h" + +#include + #include #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L) diff --git a/auth-krb5.c b/auth-krb5.c index 8beacc0d4..676b8ab1f 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -41,6 +41,8 @@ #ifdef KRB5 #include +#include +#include #include extern ServerOptions options; diff --git a/auth-options.c b/auth-options.c index 33c62641b..cd904967a 100644 --- a/auth-options.c +++ b/auth-options.c @@ -14,9 +14,7 @@ #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/auth-pam.c b/auth-pam.c index cb8754ec7..6ce9db12b 100644 --- a/auth-pam.c +++ b/auth-pam.c @@ -54,6 +54,8 @@ #include #include +#include +#include #ifdef USE_PAM #if defined(HAVE_SECURITY_PAM_APPL_H) @@ -152,14 +154,16 @@ sshpam_sigchld_handler(int sig) fatal("PAM: authentication thread exited uncleanly"); } +/* ARGSUSED */ static void -pthread_exit(void *value __unused) +pthread_exit(void *value) { _exit(0); } +/* ARGSUSED */ static int -pthread_create(sp_pthread_t *thread, const void *attr __unused, +pthread_create(sp_pthread_t *thread, const void *attr, void *(*thread_start)(void *), void *arg) { pid_t pid; @@ -191,8 +195,9 @@ pthread_cancel(sp_pthread_t thread) return (kill(thread, SIGTERM)); } +/* ARGSUSED */ static int -pthread_join(sp_pthread_t thread, void **value __unused) +pthread_join(sp_pthread_t thread, void **value) { int status; diff --git a/auth-shadow.c b/auth-shadow.c index c8d5dd3c1..7cd69c21f 100644 --- a/auth-shadow.c +++ b/auth-shadow.c @@ -26,6 +26,7 @@ #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) #include +#include #include "auth.h" #include "buffer.h" diff --git a/canohost.c b/canohost.c index 97b5a78f9..b40cbf603 100644 --- a/canohost.c +++ b/canohost.c @@ -21,9 +21,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include "packet.h" diff --git a/channels.c b/channels.c index 8cf4242fe..895c43f6a 100644 --- a/channels.c +++ b/channels.c @@ -50,9 +50,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include #include diff --git a/cipher-acss.c b/cipher-acss.c index 90b51a4d1..cb0bf736c 100644 --- a/cipher-acss.c +++ b/cipher-acss.c @@ -15,8 +15,11 @@ */ #include "includes.h" + #include +#include + #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) #include "acss.h" diff --git a/defines.h b/defines.h index 4dccc9172..7b0a302a5 100644 --- a/defines.h +++ b/defines.h @@ -25,7 +25,7 @@ #ifndef _DEFINES_H #define _DEFINES_H -/* $Id: defines.h,v 1.133 2006/07/12 04:14:31 dtucker Exp $ */ +/* $Id: defines.h,v 1.134 2006/07/24 04:51:01 djm Exp $ */ /* Constants */ @@ -143,16 +143,11 @@ including rpc/rpc.h breaks Solaris 6 #define INADDR_LOOPBACK ((u_long)0x7f000001) #endif -#ifndef __unused -#define __unused -#endif - /* Types */ /* If sys/types.h does not supply intXX_t, supply them ourselves */ /* (or die trying) */ - #ifndef HAVE_U_INT typedef unsigned int u_int; #endif diff --git a/dns.c b/dns.c index 5f123a2ee..c9368b96b 100644 --- a/dns.c +++ b/dns.c @@ -30,9 +30,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include "xmalloc.h" diff --git a/gss-genr.c b/gss-genr.c index 0497657c0..522fedab3 100644 --- a/gss-genr.c +++ b/gss-genr.c @@ -29,6 +29,7 @@ #ifdef GSSAPI #include +#include #include "xmalloc.h" #include "bufaux.h" diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c index eae29b2ae..7b78cfe0a 100644 --- a/gss-serv-krb5.c +++ b/gss-serv-krb5.c @@ -29,6 +29,8 @@ #ifdef GSSAPI #ifdef KRB5 +#include + #include "auth.h" #include "xmalloc.h" #include "log.h" diff --git a/gss-serv.c b/gss-serv.c index c033aad4f..b5c5538fe 100644 --- a/gss-serv.c +++ b/gss-serv.c @@ -29,6 +29,7 @@ #ifdef GSSAPI #include +#include #include "bufaux.h" #include "auth.h" diff --git a/log.h b/log.h index 9e1a2fcdb..15ebc93b5 100644 --- a/log.h +++ b/log.h @@ -15,6 +15,8 @@ #ifndef SSH_LOG_H #define SSH_LOG_H +#include "includes.h" + #include #include /* Needed for LOG_AUTHPRIV (if present) */ diff --git a/loginrec.c b/loginrec.c index 8299b79e4..955d42e8f 100644 --- a/loginrec.c +++ b/loginrec.c @@ -156,6 +156,8 @@ #include #include #include +#include +#include #include "ssh.h" #include "xmalloc.h" diff --git a/logintest.c b/logintest.c index 0de928bec..7e9fbbfbb 100644 --- a/logintest.c +++ b/logintest.c @@ -40,9 +40,7 @@ #include #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_TIME_H #include #endif diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index 2c16233c9..ef0eff3b6 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -37,6 +37,7 @@ #include "includes.h" #include +#include #define STARTPORT 600 #define ENDPORT (IPPORT_RESERVED - 1) diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c index 46e0a020f..c1aecfe99 100644 --- a/openbsd-compat/bsd-arc4random.c +++ b/openbsd-compat/bsd-arc4random.c @@ -15,6 +15,10 @@ */ #include "includes.h" + +#include +#include + #include "log.h" #ifndef HAVE_ARC4RANDOM diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d2d9ad771..e6128f9a7 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -17,6 +17,7 @@ #include "includes.h" +#include #include #include "xmalloc.h" diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c index a855ad6d5..70ef1850d 100644 --- a/openbsd-compat/getrrsetbyname.c +++ b/openbsd-compat/getrrsetbyname.c @@ -49,6 +49,8 @@ #ifndef HAVE_GETRRSETBYNAME +#include + #include "getrrsetbyname.h" #if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index bba4c0976..b4873932a 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include static long get_arg_max(void) diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index b8b0793a6..2285c84df 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -41,6 +41,7 @@ #include #include #include +#include #if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index 54ec2910e..5e2e878dc 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c @@ -1,4 +1,4 @@ -/* $Id: port-linux.c,v 1.1 2006/04/22 11:26:08 djm Exp $ */ +/* $Id: port-linux.c,v 1.2 2006/07/24 04:51:01 djm Exp $ */ /* * Copyright (c) 2005 Daniel Walsh @@ -23,6 +23,9 @@ #include "includes.h" +#include +#include + #ifdef WITH_SELINUX #include "log.h" #include "port-linux.h" diff --git a/openbsd-compat/port-tun.c b/openbsd-compat/port-tun.c index 9806eec7d..f6a6aa9e1 100644 --- a/openbsd-compat/port-tun.c +++ b/openbsd-compat/port-tun.c @@ -23,6 +23,8 @@ #include #include +#include +#include #include "log.h" #include "misc.h" diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index fd9731ac6..11bd8f646 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -32,6 +32,8 @@ #include #include #include +#include +#include #ifdef TCSASOFT # define _T_FLUSH (TCSAFLUSH|TCSASOFT) diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c index 32e987deb..7fec73f89 100644 --- a/openbsd-compat/setproctitle.c +++ b/openbsd-compat/setproctitle.c @@ -40,6 +40,7 @@ #ifdef HAVE_SYS_PSTAT_H #include #endif +#include #define SPT_NONE 0 /* don't use it at all */ #define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */ diff --git a/openbsd-compat/xmmap.c b/openbsd-compat/xmmap.c index 7d5cc812c..1293dcab0 100644 --- a/openbsd-compat/xmmap.c +++ b/openbsd-compat/xmmap.c @@ -23,7 +23,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: xmmap.c,v 1.8 2006/07/12 12:35:52 dtucker Exp $ */ +/* $Id: xmmap.c,v 1.9 2006/07/24 04:51:01 djm Exp $ */ #include "includes.h" @@ -34,6 +34,8 @@ #include #include +#include +#include #include "log.h" diff --git a/readconf.c b/readconf.c index 432b80ed0..6fe372796 100644 --- a/readconf.c +++ b/readconf.c @@ -22,9 +22,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/servconf.c b/servconf.c index ce44b5f60..dca9508ab 100644 --- a/servconf.c +++ b/servconf.c @@ -15,9 +15,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index f2d37129b..17236a55a 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -23,9 +23,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H # include #endif diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 30df75166..6b706f0af 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -14,9 +14,7 @@ #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #include #include #include diff --git a/ssh-keysign.c b/ssh-keysign.c index 435b839fa..89b8e4342 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c @@ -148,7 +148,7 @@ main(int argc, char **argv) { Buffer b; Options options; - Key *keys[2], *key; + Key *keys[2], *key = NULL; struct passwd *pw; int key_fd[2], i, found, version = 2, fd; u_char *signature, *data; diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c index fb6fc2814..121fa52fa 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -41,6 +41,8 @@ #include #include #include +#include +#include #include #include diff --git a/ssh.c b/ssh.c index d0d9457c2..df787e45f 100644 --- a/ssh.c +++ b/ssh.c @@ -54,9 +54,7 @@ #include #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/sshconnect.c b/sshconnect.c index f33cf52b1..21c5203c6 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -24,9 +24,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif diff --git a/sshd.c b/sshd.c index 6428f42a0..cc1ebd8d9 100644 --- a/sshd.c +++ b/sshd.c @@ -54,9 +54,7 @@ #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include #ifdef HAVE_PATHS_H #include #endif -- cgit v1.2.3 From 8b373baf13f9bec712ad01a0242241bc6529f5f4 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 24 Jul 2006 14:55:47 +1000 Subject: - (djm) [openbsd-compat/glob.c] Move get_arg_max() into the ifdef HAVE_GLOB block so that it compiles on OpenBSD (or other platforms with a decent glob implementation) with -Werror --- ChangeLog | 6 +++++- openbsd-compat/glob.c | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'openbsd-compat/glob.c') diff --git a/ChangeLog b/ChangeLog index d2cd9b597..be85b0c52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -112,6 +112,10 @@ make the portable tree compile again - sprinkle unistd.h and string.h back in. Don't redefine __unused, as it turned out to be used in headers on Linux, and replace its use in auth-pam.c with ARGSUSED + - (djm) [openbsd-compat/glob.c] + Move get_arg_max() into the ifdef HAVE_GLOB block so that it compiles + on OpenBSD (or other platforms with a decent glob implementation) with + -Werror 20060713 - (dtucker) [auth-krb5.c auth-pam.c] Still more errno.h @@ -5030,4 +5034,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4430 2006/07/24 04:51:00 djm Exp $ +$Id: ChangeLog,v 1.4431 2006/07/24 04:55:47 djm Exp $ diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index b4873932a..907235353 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -44,6 +44,9 @@ #include #include +#if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \ + !defined(GLOB_HAS_GL_MATCHC) + static long get_arg_max(void) { @@ -56,9 +59,6 @@ get_arg_max(void) #endif } -#if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \ - !defined(GLOB_HAS_GL_MATCHC) - /* * glob(3) -- a superset of the one defined in POSIX 1003.2. * -- cgit v1.2.3 From f78fb54412e34c2647c1bc9f895af00620f42730 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 6 Aug 2006 21:25:24 +1000 Subject: - (dtucker) [openbsd-compat/{bsd-asprintf.c,bsd-openpty.c,bsd-snprintf.c, glob.c}] Include stdlib.h for malloc and friends in compat code. --- ChangeLog | 4 +++- openbsd-compat/bsd-asprintf.c | 1 + openbsd-compat/bsd-openpty.c | 2 ++ openbsd-compat/bsd-snprintf.c | 2 ++ openbsd-compat/glob.c | 2 ++ 5 files changed, 10 insertions(+), 1 deletion(-) (limited to 'openbsd-compat/glob.c') diff --git a/ChangeLog b/ChangeLog index 60a1fd753..1efc7ba36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2006086 - (dtucker) [defines.h] With the includes.h changes we no longer get the name clash on "YES" so we can remove the workaround for it. + - (dtucker) [openbsd-compat/{bsd-asprintf.c,bsd-openpty.c,bsd-snprintf.c, + glob.c}] Include stdlib.h for malloc and friends in compat code. 20060805 - (djm) OpenBSD CVS Sync @@ -5198,4 +5200,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4475 2006/08/06 11:23:27 dtucker Exp $ +$Id: ChangeLog,v 1.4476 2006/08/06 11:25:24 dtucker Exp $ diff --git a/openbsd-compat/bsd-asprintf.c b/openbsd-compat/bsd-asprintf.c index 1178296f8..67480139e 100644 --- a/openbsd-compat/bsd-asprintf.c +++ b/openbsd-compat/bsd-asprintf.c @@ -23,6 +23,7 @@ #include #include +#include #ifndef VA_COPY # ifdef HAVE_VA_COPY diff --git a/openbsd-compat/bsd-openpty.c b/openbsd-compat/bsd-openpty.c index a2f2fda60..c0cde6b1f 100644 --- a/openbsd-compat/bsd-openpty.c +++ b/openbsd-compat/bsd-openpty.c @@ -37,6 +37,8 @@ #include +#include + #ifdef HAVE_SYS_STAT_H # include #endif diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c index 9fdf4d3f0..47cbcff67 100644 --- a/openbsd-compat/bsd-snprintf.c +++ b/openbsd-compat/bsd-snprintf.c @@ -108,6 +108,8 @@ #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) +#include +#include #include #ifdef HAVE_LONG_DOUBLE diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index 907235353..ec16b1108 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -37,10 +37,12 @@ #include #include + #include #include #include #include +#include #include #include -- cgit v1.2.3 From 096faecdea1e39ecace0b20f4e208bd7ec33f6d2 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 1 Sep 2006 20:29:10 +1000 Subject: - (dtucker) [configure.ac includes.h openbsd-compat/glob.{c,h}] Explicitly test for GLOB_NOMATCH and use our glob functions if it's not found. Stops sftp from segfaulting when attempting to get a nonexistent file on Cygwin (previous versions of OpenSSH didn't use the native glob). Partly from and tested by Corinna Vinschen. --- ChangeLog | 7 ++++++- configure.ac | 6 ++++-- includes.h | 3 ++- openbsd-compat/glob.c | 3 ++- openbsd-compat/glob.h | 3 ++- 5 files changed, 16 insertions(+), 6 deletions(-) (limited to 'openbsd-compat/glob.c') diff --git a/ChangeLog b/ChangeLog index f10393f3c..0cbd4b627 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,11 @@ sys/socket.h and unistd.h in various places - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Fix implict declaration warnings for binary_open and binary_close. Patch from Corinna Vinschen. + - (dtucker) [configure.ac includes.h openbsd-compat/glob.{c,h}] Explicitly + test for GLOB_NOMATCH and use our glob functions if it's not found. + Stops sftp from segfaulting when attempting to get a nonexistent file on + Cygwin (previous versions of OpenSSH didn't use the native glob). Partly + from and tested by Corinna Vinschen. 20060831 - (djm) [CREDITS LICENCE Makefile.in auth.c configure.ac includes.h ] @@ -5370,4 +5375,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.4523 2006/09/01 09:29:01 dtucker Exp $ +$Id: ChangeLog,v 1.4524 2006/09/01 10:29:10 dtucker Exp $ diff --git a/configure.ac b/configure.ac index 3aba414a2..c37d7f499 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.356 2006/08/30 17:24:41 djm Exp $ +# $Id: configure.ac,v 1.357 2006/09/01 10:29:11 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) -AC_REVISION($Revision: 1.356 $) +AC_REVISION($Revision: 1.357 $) AC_CONFIG_SRCDIR([ssh.c]) AC_CONFIG_HEADER(config.h) @@ -982,6 +982,8 @@ AC_TRY_COMPILE( ] ) +AC_CHECK_DECLS(GLOB_NOMATCH, , , [#include ]) + AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) AC_RUN_IFELSE( [AC_LANG_SOURCE([[ diff --git a/includes.h b/includes.h index 2101f13c9..967fcc26c 100644 --- a/includes.h +++ b/includes.h @@ -30,7 +30,8 @@ # include #endif #if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ - defined(GLOB_HAS_GL_MATCHC) + defined(GLOB_HAS_GL_MATCHC) && \ + defined(HAVE_DECL_GLOB_NOMATCH) && HAVE_DECL_GLOB_NOMATCH != 0 # include #endif #ifdef HAVE_ENDIAN_H diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index ec16b1108..b3dd2b171 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -47,7 +47,8 @@ #include #if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \ - !defined(GLOB_HAS_GL_MATCHC) + !defined(GLOB_HAS_GL_MATCHC) || \ + !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 static long get_arg_max(void) diff --git a/openbsd-compat/glob.h b/openbsd-compat/glob.h index 4fdbfc1ea..9ba07f76e 100644 --- a/openbsd-compat/glob.h +++ b/openbsd-compat/glob.h @@ -38,7 +38,8 @@ /* OPENBSD ORIGINAL: include/glob.h */ #if !defined(HAVE_GLOB_H) || !defined(GLOB_HAS_ALTDIRFUNC) || \ - !defined(GLOB_HAS_GL_MATCHC) + !defined(GLOB_HAS_GL_MATCHC) || \ + !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 #ifndef _GLOB_H_ #define _GLOB_H_ -- cgit v1.2.3