diff options
37 files changed, 79 insertions, 50 deletions
@@ -99,6 +99,19 @@ [auth.h dispatch.c kex.h sftp-client.c] #include <signal.h> for sig_atomic_t; need this prior to <sys/param.h> 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 $ @@ -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 <string.h> + #include <openssl/evp.h> #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00906000L) diff --git a/auth-krb5.c b/auth-krb5.c index 8beacc0d..676b8ab1 100644 --- a/auth-krb5.c +++ b/auth-krb5.c @@ -41,6 +41,8 @@ #ifdef KRB5 #include <errno.h> +#include <unistd.h> +#include <string.h> #include <krb5.h> extern ServerOptions options; diff --git a/auth-options.c b/auth-options.c index 33c62641..cd904967 100644 --- a/auth-options.c +++ b/auth-options.c @@ -14,9 +14,7 @@ #include <sys/types.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #include <pwd.h> #include <string.h> @@ -54,6 +54,8 @@ #include <errno.h> #include <signal.h> +#include <string.h> +#include <unistd.h> #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 c8d5dd3c..7cd69c21 100644 --- a/auth-shadow.c +++ b/auth-shadow.c @@ -26,6 +26,7 @@ #if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE) #include <shadow.h> +#include <string.h> #include "auth.h" #include "buffer.h" @@ -21,9 +21,7 @@ #include <ctype.h> #include <errno.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #include <string.h> #include "packet.h" @@ -50,9 +50,7 @@ #include <arpa/inet.h> #include <errno.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #include <string.h> #include <termios.h> #include <unistd.h> diff --git a/cipher-acss.c b/cipher-acss.c index 90b51a4d..cb0bf736 100644 --- a/cipher-acss.c +++ b/cipher-acss.c @@ -15,8 +15,11 @@ */ #include "includes.h" + #include <openssl/evp.h> +#include <string.h> + #if !defined(EVP_CTRL_SET_ACSS_MODE) && (OPENSSL_VERSION_NUMBER >= 0x00907000L) #include "acss.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 @@ -30,9 +30,7 @@ #include <sys/types.h> #include <sys/socket.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #include <string.h> #include "xmalloc.h" @@ -29,6 +29,7 @@ #ifdef GSSAPI #include <string.h> +#include <unistd.h> #include "xmalloc.h" #include "bufaux.h" diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c index eae29b2a..7b78cfe0 100644 --- a/gss-serv-krb5.c +++ b/gss-serv-krb5.c @@ -29,6 +29,8 @@ #ifdef GSSAPI #ifdef KRB5 +#include <string.h> + #include "auth.h" #include "xmalloc.h" #include "log.h" @@ -29,6 +29,7 @@ #ifdef GSSAPI #include <string.h> +#include <unistd.h> #include "bufaux.h" #include "auth.h" @@ -15,6 +15,8 @@ #ifndef SSH_LOG_H #define SSH_LOG_H +#include "includes.h" + #include <stdarg.h> #include <syslog.h> /* Needed for LOG_AUTHPRIV (if present) */ @@ -156,6 +156,8 @@ #include <errno.h> #include <fcntl.h> #include <pwd.h> +#include <string.h> +#include <unistd.h> #include "ssh.h" #include "xmalloc.h" diff --git a/logintest.c b/logintest.c index 0de928be..7e9fbbfb 100644 --- a/logintest.c +++ b/logintest.c @@ -40,9 +40,7 @@ #include <stdio.h> #include <string.h> #include <pwd.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #ifdef HAVE_TIME_H #include <time.h> #endif diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index 2c16233c..ef0eff3b 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c @@ -37,6 +37,7 @@ #include "includes.h" #include <errno.h> +#include <string.h> #define STARTPORT 600 #define ENDPORT (IPPORT_RESERVED - 1) diff --git a/openbsd-compat/bsd-arc4random.c b/openbsd-compat/bsd-arc4random.c index 46e0a020..c1aecfe9 100644 --- a/openbsd-compat/bsd-arc4random.c +++ b/openbsd-compat/bsd-arc4random.c @@ -15,6 +15,10 @@ */ #include "includes.h" + +#include <sys/types.h> +#include <string.h> + #include "log.h" #ifndef HAVE_ARC4RANDOM diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d2d9ad77..e6128f9a 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -17,6 +17,7 @@ #include "includes.h" +#include <string.h> #include <signal.h> #include "xmalloc.h" diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c index a855ad6d..70ef1850 100644 --- a/openbsd-compat/getrrsetbyname.c +++ b/openbsd-compat/getrrsetbyname.c @@ -49,6 +49,8 @@ #ifndef HAVE_GETRRSETBYNAME +#include <string.h> + #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 bba4c097..b4873932 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c @@ -41,6 +41,8 @@ #include <ctype.h> #include <errno.h> #include <pwd.h> +#include <string.h> +#include <unistd.h> static long get_arg_max(void) diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index b8b0793a..2285c84d 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -41,6 +41,7 @@ #include <fcntl.h> #include <ctype.h> #include <errno.h> +#include <unistd.h> #if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index 54ec2910..5e2e878d 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 <dwalsh@redhat.com> @@ -23,6 +23,9 @@ #include "includes.h" +#include <errno.h> +#include <string.h> + #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 9806eec7..f6a6aa9e 100644 --- a/openbsd-compat/port-tun.c +++ b/openbsd-compat/port-tun.c @@ -23,6 +23,8 @@ #include <errno.h> #include <fcntl.h> +#include <string.h> +#include <unistd.h> #include "log.h" #include "misc.h" diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c index fd9731ac..11bd8f64 100644 --- a/openbsd-compat/readpassphrase.c +++ b/openbsd-compat/readpassphrase.c @@ -32,6 +32,8 @@ #include <fcntl.h> #include <readpassphrase.h> #include <errno.h> +#include <string.h> +#include <unistd.h> #ifdef TCSASOFT # define _T_FLUSH (TCSAFLUSH|TCSASOFT) diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c index 32e987de..7fec73f8 100644 --- a/openbsd-compat/setproctitle.c +++ b/openbsd-compat/setproctitle.c @@ -40,6 +40,7 @@ #ifdef HAVE_SYS_PSTAT_H #include <sys/pstat.h> #endif +#include <string.h> #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 7d5cc812..1293dcab 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 <sys/stat.h> #include <errno.h> +#include <string.h> +#include <unistd.h> #include "log.h" @@ -22,9 +22,7 @@ #include <ctype.h> #include <errno.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #include <string.h> #include <unistd.h> @@ -15,9 +15,7 @@ #include <sys/types.h> #include <sys/socket.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #include <string.h> #include <unistd.h> diff --git a/ssh-keygen.c b/ssh-keygen.c index f2d37129..17236a55 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -23,9 +23,7 @@ #include <errno.h> #include <fcntl.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #ifdef HAVE_PATHS_H # include <paths.h> #endif diff --git a/ssh-keyscan.c b/ssh-keyscan.c index 30df7516..6b706f0a 100644 --- a/ssh-keyscan.c +++ b/ssh-keyscan.c @@ -14,9 +14,7 @@ #include <openssl/bn.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #include <errno.h> #include <stdarg.h> #include <setjmp.h> diff --git a/ssh-keysign.c b/ssh-keysign.c index 435b839f..89b8e434 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 fb6fc281..121fa52f 100644 --- a/ssh-rand-helper.c +++ b/ssh-rand-helper.c @@ -41,6 +41,8 @@ #include <fcntl.h> #include <pwd.h> #include <signal.h> +#include <time.h> +#include <unistd.h> #include <openssl/rand.h> #include <openssl/sha.h> @@ -54,9 +54,7 @@ #include <ctype.h> #include <errno.h> #include <fcntl.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #ifdef HAVE_PATHS_H #include <paths.h> #endif diff --git a/sshconnect.c b/sshconnect.c index f33cf52b..21c5203c 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -24,9 +24,7 @@ #include <ctype.h> #include <errno.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #ifdef HAVE_PATHS_H #include <paths.h> #endif @@ -54,9 +54,7 @@ #include <errno.h> #include <fcntl.h> -#if defined(HAVE_NETDB_H) -# include <netdb.h> -#endif +#include <netdb.h> #ifdef HAVE_PATHS_H #include <paths.h> #endif |