- (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
This commit is contained in:
Damien Miller 2006-07-24 14:51:00 +10:00
parent d8337c5e60
commit b8fe89c4d9
37 changed files with 79 additions and 50 deletions

View File

@ -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 $

5
acss.c
View File

@ -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)

View File

@ -41,6 +41,8 @@
#ifdef KRB5
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <krb5.h>
extern ServerOptions options;

View File

@ -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>

View File

@ -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;

View File

@ -26,6 +26,7 @@
#if defined(USE_SHADOW) && defined(HAS_SHADOW_EXPIRE)
#include <shadow.h>
#include <string.h>
#include "auth.h"
#include "buffer.h"

View File

@ -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"

View File

@ -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>

View File

@ -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"

View File

@ -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

4
dns.c
View File

@ -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"

View File

@ -29,6 +29,7 @@
#ifdef GSSAPI
#include <string.h>
#include <unistd.h>
#include "xmalloc.h"
#include "bufaux.h"

View File

@ -29,6 +29,8 @@
#ifdef GSSAPI
#ifdef KRB5
#include <string.h>
#include "auth.h"
#include "xmalloc.h"
#include "log.h"

View File

@ -29,6 +29,7 @@
#ifdef GSSAPI
#include <string.h>
#include <unistd.h>
#include "bufaux.h"
#include "auth.h"

2
log.h
View File

@ -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) */

View File

@ -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"

View File

@ -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

View File

@ -37,6 +37,7 @@
#include "includes.h"
#include <errno.h>
#include <string.h>
#define STARTPORT 600
#define ENDPORT (IPPORT_RESERVED - 1)

View File

@ -15,6 +15,10 @@
*/
#include "includes.h"
#include <sys/types.h>
#include <string.h>
#include "log.h"
#ifndef HAVE_ARC4RANDOM

View File

@ -17,6 +17,7 @@
#include "includes.h"
#include <string.h>
#include <signal.h>
#include "xmalloc.h"

View File

@ -49,6 +49,8 @@
#ifndef HAVE_GETRRSETBYNAME
#include <string.h>
#include "getrrsetbyname.h"
#if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO

View File

@ -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)

View File

@ -41,6 +41,7 @@
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)

View File

@ -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"

View File

@ -23,6 +23,8 @@
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include "log.h"
#include "misc.h"

View File

@ -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)

View File

@ -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, ...) */

View File

@ -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"

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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;

View File

@ -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>

4
ssh.c
View File

@ -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

View File

@ -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

4
sshd.c
View File

@ -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