summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-07-24 14:51:00 +1000
committerDamien Miller <djm@mindrot.org>2006-07-24 14:51:00 +1000
commitb8fe89c4d97ea9a5d7efb2c60108b8a7644f6a49 (patch)
tree60e9457b39b992a0bf19488f5e92d57d35b6fdb5
parentd8337c5e609b3bafda0008aef2636d6f17c622ef (diff)
- (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
-rw-r--r--ChangeLog15
-rw-r--r--acss.c5
-rw-r--r--auth-krb5.c2
-rw-r--r--auth-options.c4
-rw-r--r--auth-pam.c11
-rw-r--r--auth-shadow.c1
-rw-r--r--canohost.c4
-rw-r--r--channels.c4
-rw-r--r--cipher-acss.c3
-rw-r--r--defines.h7
-rw-r--r--dns.c4
-rw-r--r--gss-genr.c1
-rw-r--r--gss-serv-krb5.c2
-rw-r--r--gss-serv.c1
-rw-r--r--log.h2
-rw-r--r--loginrec.c2
-rw-r--r--logintest.c4
-rw-r--r--openbsd-compat/bindresvport.c1
-rw-r--r--openbsd-compat/bsd-arc4random.c4
-rw-r--r--openbsd-compat/bsd-misc.c1
-rw-r--r--openbsd-compat/getrrsetbyname.c2
-rw-r--r--openbsd-compat/glob.c2
-rw-r--r--openbsd-compat/mktemp.c1
-rw-r--r--openbsd-compat/port-linux.c5
-rw-r--r--openbsd-compat/port-tun.c2
-rw-r--r--openbsd-compat/readpassphrase.c2
-rw-r--r--openbsd-compat/setproctitle.c1
-rw-r--r--openbsd-compat/xmmap.c4
-rw-r--r--readconf.c4
-rw-r--r--servconf.c4
-rw-r--r--ssh-keygen.c4
-rw-r--r--ssh-keyscan.c4
-rw-r--r--ssh-keysign.c2
-rw-r--r--ssh-rand-helper.c2
-rw-r--r--ssh.c4
-rw-r--r--sshconnect.c4
-rw-r--r--sshd.c4
37 files changed, 79 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f767940..d2cd9b59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 $
diff --git a/acss.c b/acss.c
index 99efde07..86e2c01a 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 <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>
diff --git a/auth-pam.c b/auth-pam.c
index cb8754ec..6ce9db12 100644
--- a/auth-pam.c
+++ b/auth-pam.c
@@ -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"
diff --git a/canohost.c b/canohost.c
index 97b5a78f..b40cbf60 100644
--- a/canohost.c
+++ b/canohost.c
@@ -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"
diff --git a/channels.c b/channels.c
index 8cf4242f..895c43f6 100644
--- a/channels.c
+++ b/channels.c
@@ -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"
diff --git a/defines.h b/defines.h
index 4dccc917..7b0a302a 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 5f123a2e..c9368b96 100644
--- a/dns.c
+++ b/dns.c
@@ -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"
diff --git a/gss-genr.c b/gss-genr.c
index 0497657c..522fedab 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -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"
diff --git a/gss-serv.c b/gss-serv.c
index c033aad4..b5c5538f 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -29,6 +29,7 @@
#ifdef GSSAPI
#include <string.h>
+#include <unistd.h>
#include "bufaux.h"
#include "auth.h"
diff --git a/log.h b/log.h
index 9e1a2fcd..15ebc93b 100644
--- a/log.h
+++ b/log.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) */
diff --git a/loginrec.c b/loginrec.c
index 8299b79e..955d42e8 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -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"
diff --git a/readconf.c b/readconf.c
index 432b80ed..6fe37279 100644
--- a/readconf.c
+++ b/readconf.c
@@ -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>
diff --git a/servconf.c b/servconf.c
index ce44b5f6..dca9508a 100644
--- a/servconf.c
+++ b/servconf.c
@@ -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>
diff --git a/ssh.c b/ssh.c
index d0d9457c..df787e45 100644
--- a/ssh.c
+++ b/ssh.c
@@ -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
diff --git a/sshd.c b/sshd.c
index 6428f42a..cc1ebd8d 100644
--- a/sshd.c
+++ b/sshd.c
@@ -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