summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--auth-passwd.c1
-rw-r--r--monitor_mm.c1
-rw-r--r--openbsd-compat/base64.h46
-rw-r--r--openbsd-compat/basename.h12
-rw-r--r--openbsd-compat/bindresvport.h12
-rw-r--r--openbsd-compat/bsd-arc4random.h37
-rw-r--r--openbsd-compat/bsd-cray.h9
-rw-r--r--openbsd-compat/bsd-getpeereid.h38
-rw-r--r--openbsd-compat/bsd-misc.h6
-rw-r--r--openbsd-compat/bsd-nextstep.h4
-rw-r--r--openbsd-compat/bsd-snprintf.h19
-rw-r--r--openbsd-compat/bsd-waitpid.h4
-rw-r--r--openbsd-compat/daemon.h11
-rw-r--r--openbsd-compat/dirname.h5
-rw-r--r--openbsd-compat/fake-rfc2553.h4
-rw-r--r--openbsd-compat/getcwd.h12
-rw-r--r--openbsd-compat/getgrouplist.h16
-rw-r--r--openbsd-compat/getopt.h14
-rw-r--r--openbsd-compat/getrrsetbyname.h2
-rw-r--r--openbsd-compat/inet_aton.h12
-rw-r--r--openbsd-compat/inet_ntoa.h12
-rw-r--r--openbsd-compat/inet_ntop.h13
-rw-r--r--openbsd-compat/mktemp.h13
-rw-r--r--openbsd-compat/openbsd-compat.h147
-rw-r--r--openbsd-compat/port-aix.h3
-rw-r--r--openbsd-compat/port-irix.h2
-rw-r--r--openbsd-compat/realpath.h13
-rw-r--r--openbsd-compat/rresvport.h12
-rw-r--r--openbsd-compat/setenv.h14
-rw-r--r--openbsd-compat/setproctitle.h13
-rw-r--r--openbsd-compat/strlcat.h12
-rw-r--r--openbsd-compat/strlcpy.h12
-rw-r--r--openbsd-compat/strmode.h7
-rw-r--r--openbsd-compat/strsep.h12
-rw-r--r--openbsd-compat/vis.c2
-rw-r--r--openbsd-compat/vis.h2
-rw-r--r--openbsd-compat/xcrypt.h28
-rw-r--r--openbsd-compat/xmmap.h27
39 files changed, 190 insertions, 425 deletions
diff --git a/ChangeLog b/ChangeLog
index fb33982c0..d916025e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120030829
2 - (bal) openbsd-compat/ clean up. Considate headers, add in $Id: ChangeLog,v 1.2918 2003/08/29 16:59:52 mouring Exp $ on our
3 files, and added missing license to header.
4
120030826 520030826
2 - (djm) Bug #629: Mark ssh_config option "pamauthenticationviakbdint" 6 - (djm) Bug #629: Mark ssh_config option "pamauthenticationviakbdint"
3 as deprecated. Remove mention from README.privsep. Patch from 7 as deprecated. Remove mention from README.privsep. Patch from
@@ -908,4 +912,4 @@
908 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 912 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
909 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 913 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
910 914
911$Id: ChangeLog,v 1.2917 2003/08/26 04:22:12 dtucker Exp $ 915$Id: ChangeLog,v 1.2918 2003/08/29 16:59:52 mouring Exp $
diff --git a/auth-passwd.c b/auth-passwd.c
index 780e92344..a5d23b6bf 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -42,7 +42,6 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.28 2003/07/22 13:35:22 markus Exp $");
42#include "log.h" 42#include "log.h"
43#include "servconf.h" 43#include "servconf.h"
44#include "auth.h" 44#include "auth.h"
45#include "openbsd-compat/xcrypt.h"
46#ifdef WITH_AIXAUTHENTICATE 45#ifdef WITH_AIXAUTHENTICATE
47# include "buffer.h" 46# include "buffer.h"
48# include "canohost.h" 47# include "canohost.h"
diff --git a/monitor_mm.c b/monitor_mm.c
index b4a6e40c9..e57c87cc2 100644
--- a/monitor_mm.c
+++ b/monitor_mm.c
@@ -30,7 +30,6 @@ RCSID("$OpenBSD: monitor_mm.c,v 1.8 2002/08/02 14:43:15 millert Exp $");
30#include <sys/mman.h> 30#include <sys/mman.h>
31#endif 31#endif
32 32
33#include "openbsd-compat/xmmap.h"
34#include "ssh.h" 33#include "ssh.h"
35#include "xmalloc.h" 34#include "xmalloc.h"
36#include "log.h" 35#include "log.h"
diff --git a/openbsd-compat/base64.h b/openbsd-compat/base64.h
index a25003016..732c6b3f8 100644
--- a/openbsd-compat/base64.h
+++ b/openbsd-compat/base64.h
@@ -1,9 +1,51 @@
1/* $Id: base64.h,v 1.5 2003/05/15 03:57:51 djm Exp $ */ 1/* $Id: base64.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */
2
3/*
4 * Copyright (c) 1996 by Internet Software Consortium.
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
11 * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
12 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
13 * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
16 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
17 * SOFTWARE.
18 */
19
20/*
21 * Portions Copyright (c) 1995 by International Business Machines, Inc.
22 *
23 * International Business Machines, Inc. (hereinafter called IBM) grants
24 * permission under its copyrights to use, copy, modify, and distribute this
25 * Software with or without fee, provided that the above copyright notice and
26 * all paragraphs of this notice appear in all copies, and that the name of IBM
27 * not be used in connection with the marketing of any product incorporating
28 * the Software or modifications thereof, without specific, written prior
29 * permission.
30 *
31 * To the extent it has a right to do so, IBM grants an immunity from suit
32 * under its patents, if any, for the use, sale or manufacture of products to
33 * the extent that such products are used for performing Domain Name System
34 * dynamic updates in TCP/IP networks by means of the Software. No immunity is
35 * granted for any product per se or for any other function of any product.
36 *
37 * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
38 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
39 * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
40 * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
41 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
42 * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
43 */
2 44
3#ifndef _BSD_BASE64_H 45#ifndef _BSD_BASE64_H
4#define _BSD_BASE64_H 46#define _BSD_BASE64_H
5 47
6#include "config.h" 48#include "includes.h"
7 49
8#ifndef HAVE___B64_NTOP 50#ifndef HAVE___B64_NTOP
9# ifndef HAVE_B64_NTOP 51# ifndef HAVE_B64_NTOP
diff --git a/openbsd-compat/basename.h b/openbsd-compat/basename.h
deleted file mode 100644
index a8bd6c17c..000000000
--- a/openbsd-compat/basename.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: basename.h,v 1.3 2003/02/25 03:32:16 djm Exp $ */
2
3#ifndef _BASENAME_H
4#define _BASENAME_H
5#include "config.h"
6
7#if !defined(HAVE_BASENAME)
8
9char *basename(const char *path);
10
11#endif /* !defined(HAVE_BASENAME) */
12#endif /* _BASENAME_H */
diff --git a/openbsd-compat/bindresvport.h b/openbsd-compat/bindresvport.h
deleted file mode 100644
index b42f46983..000000000
--- a/openbsd-compat/bindresvport.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: bindresvport.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_BINDRESVPORT_H
4#define _BSD_BINDRESVPORT_H
5
6#include "config.h"
7
8#ifndef HAVE_BINDRESVPORT_SA
9int bindresvport_sa(int sd, struct sockaddr *sa);
10#endif /* !HAVE_BINDRESVPORT_SA */
11
12#endif /* _BSD_BINDRESVPORT_H */
diff --git a/openbsd-compat/bsd-arc4random.h b/openbsd-compat/bsd-arc4random.h
deleted file mode 100644
index 7af757b2d..000000000
--- a/openbsd-compat/bsd-arc4random.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (c) 1999-2000 Damien Miller. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25/* $Id: bsd-arc4random.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
26
27#ifndef _BSD_ARC4RANDOM_H
28#define _BSD_ARC4RANDOM_H
29
30#include "config.h"
31
32#ifndef HAVE_ARC4RANDOM
33unsigned int arc4random(void);
34void arc4random_stir(void);
35#endif /* !HAVE_ARC4RANDOM */
36
37#endif /* _BSD_ARC4RANDOM_H */
diff --git a/openbsd-compat/bsd-cray.h b/openbsd-compat/bsd-cray.h
index 433144f6f..a121ea152 100644
--- a/openbsd-compat/bsd-cray.h
+++ b/openbsd-compat/bsd-cray.h
@@ -1,8 +1,6 @@
1/* 1/* $Id: bsd-cray.h,v 1.10 2003/08/29 16:59:52 mouring Exp $ */
2 * $Id: bsd-cray.h,v 1.9 2003/05/18 14:13:39 djm Exp $ 2
3 * 3/*
4 * bsd-cray.h
5 *
6 * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>) 4 * Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
7 * Significant portions provided by 5 * Significant portions provided by
8 * Wayne Schroeder, SDSC <schroeder@sdsc.edu> 6 * Wayne Schroeder, SDSC <schroeder@sdsc.edu>
@@ -34,6 +32,7 @@
34 * on UNICOS systems. 32 * on UNICOS systems.
35 * 33 *
36 */ 34 */
35
37#ifndef _BSD_CRAY_H 36#ifndef _BSD_CRAY_H
38#define _BSD_CRAY_H 37#define _BSD_CRAY_H
39 38
diff --git a/openbsd-compat/bsd-getpeereid.h b/openbsd-compat/bsd-getpeereid.h
deleted file mode 100644
index 771e9cbf9..000000000
--- a/openbsd-compat/bsd-getpeereid.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 * Copyright (c) 2002-2003 Damien Miller. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25/* $Id: bsd-getpeereid.h,v 1.2 2003/05/18 14:13:39 djm Exp $ */
26
27#ifndef _BSD_GETPEEREID_H
28#define _BSD_GETPEEREID_H
29
30#include "config.h"
31
32#include <sys/types.h> /* For uid_t, gid_t */
33
34#ifndef HAVE_GETPEEREID
35int getpeereid(int , uid_t *, gid_t *);
36#endif /* HAVE_GETPEEREID */
37
38#endif /* _BSD_GETPEEREID_H */
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 0d6076ab0..6b70473f3 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -1,3 +1,5 @@
1/* $Id: bsd-misc.h,v 1.13 2003/08/29 16:59:52 mouring Exp $ */
2
1/* 3/*
2 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
3 * 5 *
@@ -22,12 +24,10 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 25 */
24 26
25/* $Id: bsd-misc.h,v 1.12 2003/08/25 01:16:22 mouring Exp $ */
26
27#ifndef _BSD_MISC_H 27#ifndef _BSD_MISC_H
28#define _BSD_MISC_H 28#define _BSD_MISC_H
29 29
30#include "config.h" 30#include "includes.h"
31 31
32char *ssh_get_progname(char *); 32char *ssh_get_progname(char *);
33 33
diff --git a/openbsd-compat/bsd-nextstep.h b/openbsd-compat/bsd-nextstep.h
index 057462710..ca5b4b54a 100644
--- a/openbsd-compat/bsd-nextstep.h
+++ b/openbsd-compat/bsd-nextstep.h
@@ -1,3 +1,5 @@
1/* $Id: bsd-nextstep.h,v 1.9 2003/08/29 16:59:52 mouring Exp $ */
2
1/* 3/*
2 * Copyright (c) 2000,2001 Ben Lindstrom. All rights reserved. 4 * Copyright (c) 2000,2001 Ben Lindstrom. All rights reserved.
3 * 5 *
@@ -23,8 +25,6 @@
23 * 25 *
24 */ 26 */
25 27
26/* $Id: bsd-nextstep.h,v 1.8 2003/06/01 03:23:57 mouring Exp $ */
27
28#ifndef _NEXT_POSIX_H 28#ifndef _NEXT_POSIX_H
29#define _NEXT_POSIX_H 29#define _NEXT_POSIX_H
30 30
diff --git a/openbsd-compat/bsd-snprintf.h b/openbsd-compat/bsd-snprintf.h
deleted file mode 100644
index 95e4d136c..000000000
--- a/openbsd-compat/bsd-snprintf.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* $Id: bsd-snprintf.h,v 1.3 2003/05/18 14:13:39 djm Exp $ */
2
3#ifndef _BSD_SNPRINTF_H
4#define _BSD_SNPRINTF_H
5
6#include "config.h"
7
8#include <sys/types.h> /* For size_t */
9
10#ifndef HAVE_SNPRINTF
11int snprintf(char *, size_t, const char *, ...);
12#endif /* !HAVE_SNPRINTF */
13
14#ifndef HAVE_VSNPRINTF
15int vsnprintf(char *, size_t, const char *, va_list);
16#endif /* !HAVE_SNPRINTF */
17
18
19#endif /* _BSD_SNPRINTF_H */
diff --git a/openbsd-compat/bsd-waitpid.h b/openbsd-compat/bsd-waitpid.h
index 00bfb9144..2d853db61 100644
--- a/openbsd-compat/bsd-waitpid.h
+++ b/openbsd-compat/bsd-waitpid.h
@@ -1,3 +1,5 @@
1/* $Id: bsd-waitpid.h,v 1.5 2003/08/29 16:59:52 mouring Exp $ */
2
1/* 3/*
2 * Copyright (c) 2000 Ben Lindstrom. All rights reserved. 4 * Copyright (c) 2000 Ben Lindstrom. All rights reserved.
3 * 5 *
@@ -23,8 +25,6 @@
23 * 25 *
24 */ 26 */
25 27
26/* $Id: bsd-waitpid.h,v 1.4 2003/06/01 03:23:57 mouring Exp $ */
27
28#ifndef _BSD_WAITPID_H 28#ifndef _BSD_WAITPID_H
29#define _BSD_WAITPID_H 29#define _BSD_WAITPID_H
30 30
diff --git a/openbsd-compat/daemon.h b/openbsd-compat/daemon.h
deleted file mode 100644
index 95a077359..000000000
--- a/openbsd-compat/daemon.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/* $Id: daemon.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_DAEMON_H
4#define _BSD_DAEMON_H
5
6#include "config.h"
7#ifndef HAVE_DAEMON
8int daemon(int nochdir, int noclose);
9#endif /* !HAVE_DAEMON */
10
11#endif /* _BSD_DAEMON_H */
diff --git a/openbsd-compat/dirname.h b/openbsd-compat/dirname.h
deleted file mode 100644
index 1d61dd06c..000000000
--- a/openbsd-compat/dirname.h
+++ /dev/null
@@ -1,5 +0,0 @@
1#ifndef HAVE_DIRNAME
2
3char *dirname(const char *path);
4
5#endif
diff --git a/openbsd-compat/fake-rfc2553.h b/openbsd-compat/fake-rfc2553.h
index 1a6c31e9c..b70b928f8 100644
--- a/openbsd-compat/fake-rfc2553.h
+++ b/openbsd-compat/fake-rfc2553.h
@@ -1,3 +1,5 @@
1/* $Id: fake-rfc2553.h,v 1.6 2003/08/29 16:59:52 mouring Exp $ */
2
1/* 3/*
2 * Copyright (C) 2000-2003 Damien Miller. All rights reserved. 4 * Copyright (C) 2000-2003 Damien Miller. All rights reserved.
3 * Copyright (C) 1999 WIDE Project. All rights reserved. 5 * Copyright (C) 1999 WIDE Project. All rights reserved.
@@ -35,8 +37,6 @@
35 * that ai_family is AF_INET. Don't use it for another purpose. 37 * that ai_family is AF_INET. Don't use it for another purpose.
36 */ 38 */
37 39
38/* $Id: fake-rfc2553.h,v 1.5 2003/08/08 02:15:12 dtucker Exp $ */
39
40#ifndef _FAKE_RFC2553_H 40#ifndef _FAKE_RFC2553_H
41#define _FAKE_RFC2553_H 41#define _FAKE_RFC2553_H
42 42
diff --git a/openbsd-compat/getcwd.h b/openbsd-compat/getcwd.h
deleted file mode 100644
index 1137b3ed5..000000000
--- a/openbsd-compat/getcwd.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: getcwd.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_GETCWD_H
4#define _BSD_GETCWD_H
5#include "config.h"
6
7#if !defined(HAVE_GETCWD)
8
9char *getcwd(char *pt, size_t size);
10
11#endif /* !defined(HAVE_GETCWD) */
12#endif /* _BSD_GETCWD_H */
diff --git a/openbsd-compat/getgrouplist.h b/openbsd-compat/getgrouplist.h
deleted file mode 100644
index 27a9703f2..000000000
--- a/openbsd-compat/getgrouplist.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/* $Id: getgrouplist.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_GETGROUPLIST_H
4#define _BSD_GETGROUPLIST_H
5
6#include "config.h"
7
8#ifndef HAVE_GETGROUPLIST
9
10#include <grp.h>
11
12int getgrouplist(const char *, gid_t, gid_t *, int *);
13
14#endif
15
16#endif
diff --git a/openbsd-compat/getopt.h b/openbsd-compat/getopt.h
deleted file mode 100644
index 9abdae8e9..000000000
--- a/openbsd-compat/getopt.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/* $Id: getopt.h,v 1.4 2001/09/18 05:05:21 djm Exp $ */
2
3#ifndef _BSDGETOPT_H
4#define _BSDGETOPT_H
5
6#include "config.h"
7
8#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET)
9
10int BSDgetopt(int argc, char * const *argv, const char *opts);
11
12#endif
13
14#endif /* _BSDGETOPT_H */
diff --git a/openbsd-compat/getrrsetbyname.h b/openbsd-compat/getrrsetbyname.h
index 9edaf0ae2..6466a54d6 100644
--- a/openbsd-compat/getrrsetbyname.h
+++ b/openbsd-compat/getrrsetbyname.h
@@ -46,7 +46,7 @@
46#ifndef _GETRRSETBYNAME_H 46#ifndef _GETRRSETBYNAME_H
47#define _GETRRSETBYNAME_H 47#define _GETRRSETBYNAME_H
48 48
49#include "config.h" 49#include "includes.h"
50 50
51#if defined(DNS) && !defined(HAVE_GETRRSETBYNAME) 51#if defined(DNS) && !defined(HAVE_GETRRSETBYNAME)
52 52
diff --git a/openbsd-compat/inet_aton.h b/openbsd-compat/inet_aton.h
deleted file mode 100644
index 9b59cb908..000000000
--- a/openbsd-compat/inet_aton.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: inet_aton.h,v 1.4 2001/07/16 02:07:51 tim Exp $ */
2
3#ifndef _BSD_INET_ATON_H
4#define _BSD_INET_ATON_H
5
6#include "config.h"
7
8#ifndef HAVE_INET_ATON
9int inet_aton(const char *cp, struct in_addr *addr);
10#endif /* HAVE_INET_ATON */
11
12#endif /* _BSD_INET_ATON_H */
diff --git a/openbsd-compat/inet_ntoa.h b/openbsd-compat/inet_ntoa.h
deleted file mode 100644
index 85bc3d6fe..000000000
--- a/openbsd-compat/inet_ntoa.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: inet_ntoa.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_INET_NTOA_H
4#define _BSD_INET_NTOA_H
5
6#include "config.h"
7
8#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA)
9char *inet_ntoa(struct in_addr in);
10#endif /* defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) */
11
12#endif /* _BSD_INET_NTOA_H */
diff --git a/openbsd-compat/inet_ntop.h b/openbsd-compat/inet_ntop.h
deleted file mode 100644
index c774df95c..000000000
--- a/openbsd-compat/inet_ntop.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* $Id: inet_ntop.h,v 1.4 2001/08/09 00:56:53 mouring Exp $ */
2
3#ifndef _BSD_INET_NTOP_H
4#define _BSD_INET_NTOP_H
5
6#include "config.h"
7
8#ifndef HAVE_INET_NTOP
9const char *
10inet_ntop(int af, const void *src, char *dst, size_t size);
11#endif /* !HAVE_INET_NTOP */
12
13#endif /* _BSD_INET_NTOP_H */
diff --git a/openbsd-compat/mktemp.h b/openbsd-compat/mktemp.h
deleted file mode 100644
index 505ca6a1f..000000000
--- a/openbsd-compat/mktemp.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* $Id: mktemp.h,v 1.3 2003/01/07 04:18:33 djm Exp $ */
2
3#ifndef _BSD_MKTEMP_H
4#define _BSD_MKTEMP_H
5
6#include "config.h"
7#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
8int mkstemps(char *path, int slen);
9int mkstemp(char *path);
10char *mkdtemp(char *path);
11#endif /* !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP) */
12
13#endif /* _BSD_MKTEMP_H */
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 76862cc8a..852948c54 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -1,5 +1,9 @@
1/* $Id: openbsd-compat.h,v 1.24 2003/08/29 16:59:52 mouring Exp $ */
2
1/* 3/*
2 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 4 * Copyright (c) 1999-2003 Damien Miller. All rights reserved.
5 * Copyright (c) 2003 Ben Lindstrom. All rights reserved.
6 * Copyright (c) 2002 Tim Rice. All rights reserved.
3 * 7 *
4 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
@@ -22,45 +26,136 @@
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */ 27 */
24 28
25/* $Id: openbsd-compat.h,v 1.23 2003/06/11 12:51:32 djm Exp $ */ 29#ifndef _OPENBSD_COMPAT_H
26 30#define _OPENBSD_COMPAT_H
27#ifndef _OPENBSD_H
28#define _OPENBSD_H
29 31
30#include "config.h" 32#include "includes.h"
31 33
32/* OpenBSD function replacements */ 34/* OpenBSD function replacements */
33#include "basename.h"
34#include "bindresvport.h"
35#include "getcwd.h"
36#include "realpath.h"
37#include "rresvport.h"
38#include "strlcpy.h"
39#include "strlcat.h"
40#include "strmode.h"
41#include "mktemp.h"
42#include "daemon.h"
43#include "dirname.h"
44#include "base64.h" 35#include "base64.h"
45#include "sigact.h" 36#include "sigact.h"
46#include "inet_ntoa.h"
47#include "inet_ntop.h"
48#include "strsep.h"
49#include "setproctitle.h"
50#include "getgrouplist.h"
51#include "glob.h" 37#include "glob.h"
52#include "readpassphrase.h" 38#include "readpassphrase.h"
53#include "getopt.h"
54#include "vis.h" 39#include "vis.h"
55#include "getrrsetbyname.h" 40#include "getrrsetbyname.h"
56 41
42
43#ifndef HAVE_BASENAME
44char *basename(const char *path);
45#endif
46
47#ifndef HAVE_BINDRESVPORT_SA
48int bindresvport_sa(int sd, struct sockaddr *sa);
49#endif
50
51#ifndef HAVE_GETCWD
52char *getcwd(char *pt, size_t size);
53#endif
54
55#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
56char *realpath(const char *path, char *resolved);
57#endif
58
59#ifndef HAVE_RRESVPORT_AF
60int rresvport_af(int *alport, sa_family_t af);
61#endif
62
63#ifndef HAVE_STRLCPY
64/* #include <sys/types.h> XXX Still needed? */
65size_t strlcpy(char *dst, const char *src, size_t siz);
66#endif
67
68#ifndef HAVE_STRLCAT
69/* #include <sys/types.h> XXX Still needed? */
70size_t strlcat(char *dst, const char *src, size_t siz);
71#endif
72
73#ifndef HAVE_SETENV
74int setenv(register const char *name, register const char *value, int rewrite);
75#endif
76
77#ifndef HAVE_STRMODE
78void strmode(int mode, char *p);
79#endif
80
81#if !defined(HAVE_MKDTEMP) || defined(HAVE_STRICT_MKSTEMP)
82int mkstemps(char *path, int slen);
83int mkstemp(char *path);
84char *mkdtemp(char *path);
85#endif
86
87#ifndef HAVE_DAEMON
88int daemon(int nochdir, int noclose);
89#endif
90
91#ifndef HAVE_DIRNAME
92char *dirname(const char *path);
93#endif
94
95#if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA)
96char *inet_ntoa(struct in_addr in);
97#endif
98
99#ifndef HAVE_INET_NTOP
100const char *inet_ntop(int af, const void *src, char *dst, size_t size);
101#endif
102
103#ifndef HAVE_INET_ATON
104int inet_aton(const char *cp, struct in_addr *addr);
105#endif
106
107#ifndef HAVE_STRSEP
108char *strsep(char **stringp, const char *delim);
109#endif
110
111#ifndef HAVE_SETPROCTITLE
112void setproctitle(const char *fmt, ...);
113void compat_init_setproctitle(int argc, char *argv[]);
114#endif
115
116#ifndef HAVE_GETGROUPLIST
117/* #include <grp.h> XXXX Still needed ? */
118int getgrouplist(const char *, gid_t, gid_t *, int *);
119#endif
120
121#if !defined(HAVE_GETOPT) || !defined(HAVE_GETOPT_OPTRESET)
122int BSDgetopt(int argc, char * const *argv, const char *opts);
123#endif
124
125
57/* Home grown routines */ 126/* Home grown routines */
58#include "bsd-arc4random.h"
59#include "bsd-getpeereid.h"
60#include "bsd-misc.h" 127#include "bsd-misc.h"
61#include "bsd-snprintf.h"
62#include "bsd-waitpid.h" 128#include "bsd-waitpid.h"
63 129
130/*#include <sys/types.h> XXX Still needed? * For uid_t, gid_t * */
131
132#ifndef HAVE_GETPEEREID
133int getpeereid(int , uid_t *, gid_t *);
134#endif
135
136#ifndef HAVE_ARC4RANDOM
137unsigned int arc4random(void);
138void arc4random_stir(void);
139#endif /* !HAVE_ARC4RANDOM */
140
141
142
143
144/* #include <sys/types.h> XXX needed? For size_t */
145
146#ifndef HAVE_SNPRINTF
147int snprintf(char *, size_t, const char *, ...);
148#endif
149
150#ifndef HAVE_VSNPRINTF
151int vsnprintf(char *, size_t, const char *, va_list);
152#endif
153
154void *xmmap(size_t size);
155char *xcrypt(const char *password, const char *salt);
156char *shadow_pw(struct passwd *pw);
157
158
64/* rfc2553 socket API replacements */ 159/* rfc2553 socket API replacements */
65#include "fake-rfc2553.h" 160#include "fake-rfc2553.h"
66 161
@@ -70,4 +165,4 @@
70#include "port-irix.h" 165#include "port-irix.h"
71#include "port-aix.h" 166#include "port-aix.h"
72 167
73#endif /* _OPENBSD_H */ 168#endif /* _OPENBSD_COMPAT_H */
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index 16863ec6d..09e7f9e97 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -1,3 +1,5 @@
1/* $Id: port-aix.h,v 1.14 2003/08/29 16:59:52 mouring Exp $ */
2
1/* 3/*
2 * 4 *
3 * Copyright (c) 2001 Gert Doering. All rights reserved. 5 * Copyright (c) 2001 Gert Doering. All rights reserved.
@@ -21,7 +23,6 @@
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 */ 26 */
26 27
27#ifdef _AIX 28#ifdef _AIX
diff --git a/openbsd-compat/port-irix.h b/openbsd-compat/port-irix.h
index bc8cc44ac..67c486307 100644
--- a/openbsd-compat/port-irix.h
+++ b/openbsd-compat/port-irix.h
@@ -1,3 +1,5 @@
1/* $Id: port-irix.h,v 1.4 2003/08/29 16:59:52 mouring Exp $ */
2
1/* 3/*
2 * Copyright (c) 2000 Denis Parker. All rights reserved. 4 * Copyright (c) 2000 Denis Parker. All rights reserved.
3 * Copyright (c) 2000 Michael Stone. All rights reserved. 5 * Copyright (c) 2000 Michael Stone. All rights reserved.
diff --git a/openbsd-compat/realpath.h b/openbsd-compat/realpath.h
deleted file mode 100644
index 25e4075d7..000000000
--- a/openbsd-compat/realpath.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* $Id: realpath.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_REALPATH_H
4#define _BSD_REALPATH_H
5
6#include "config.h"
7
8#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
9
10char *realpath(const char *path, char *resolved);
11
12#endif /* !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) */
13#endif /* _BSD_REALPATH_H */
diff --git a/openbsd-compat/rresvport.h b/openbsd-compat/rresvport.h
deleted file mode 100644
index a52e4515b..000000000
--- a/openbsd-compat/rresvport.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: rresvport.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_RRESVPORT_H
4#define _BSD_RRESVPORT_H
5
6#include "config.h"
7
8#ifndef HAVE_RRESVPORT_AF
9int rresvport_af(int *alport, sa_family_t af);
10#endif /* !HAVE_RRESVPORT_AF */
11
12#endif /* _BSD_RRESVPORT_H */
diff --git a/openbsd-compat/setenv.h b/openbsd-compat/setenv.h
deleted file mode 100644
index 77256d802..000000000
--- a/openbsd-compat/setenv.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/* $Id: setenv.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_SETENV_H
4#define _BSD_SETENV_H
5
6#include "config.h"
7
8#ifndef HAVE_SETENV
9
10int setenv(register const char *name, register const char *value, int rewrite);
11
12#endif /* !HAVE_SETENV */
13
14#endif /* _BSD_SETENV_H */
diff --git a/openbsd-compat/setproctitle.h b/openbsd-compat/setproctitle.h
deleted file mode 100644
index 48d26c6ea..000000000
--- a/openbsd-compat/setproctitle.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/* $Id: setproctitle.h,v 1.3 2003/01/09 22:53:13 djm Exp $ */
2
3#ifndef _BSD_SETPROCTITLE_H
4#define _BSD_SETPROCTITLE_H
5
6#include "config.h"
7
8#ifndef HAVE_SETPROCTITLE
9void setproctitle(const char *fmt, ...);
10void compat_init_setproctitle(int argc, char *argv[]);
11#endif
12
13#endif /* _BSD_SETPROCTITLE_H */
diff --git a/openbsd-compat/strlcat.h b/openbsd-compat/strlcat.h
deleted file mode 100644
index 753668563..000000000
--- a/openbsd-compat/strlcat.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: strlcat.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_STRLCAT_H
4#define _BSD_STRLCAT_H
5
6#include "config.h"
7#ifndef HAVE_STRLCAT
8#include <sys/types.h>
9size_t strlcat(char *dst, const char *src, size_t siz);
10#endif /* !HAVE_STRLCAT */
11
12#endif /* _BSD_STRLCAT_H */
diff --git a/openbsd-compat/strlcpy.h b/openbsd-compat/strlcpy.h
deleted file mode 100644
index 3b137670d..000000000
--- a/openbsd-compat/strlcpy.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: strlcpy.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_STRLCPY_H
4#define _BSD_STRLCPY_H
5
6#include "config.h"
7#ifndef HAVE_STRLCPY
8#include <sys/types.h>
9size_t strlcpy(char *dst, const char *src, size_t siz);
10#endif /* !HAVE_STRLCPY */
11
12#endif /* _BSD_STRLCPY_H */
diff --git a/openbsd-compat/strmode.h b/openbsd-compat/strmode.h
deleted file mode 100644
index 236ecf2f4..000000000
--- a/openbsd-compat/strmode.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/* $Id: strmode.h,v 1.4 2003/08/25 01:10:52 mouring Exp $ */
2
3#ifndef HAVE_STRMODE
4
5void strmode(int mode, char *p);
6
7#endif
diff --git a/openbsd-compat/strsep.h b/openbsd-compat/strsep.h
deleted file mode 100644
index 6ed810ac1..000000000
--- a/openbsd-compat/strsep.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/* $Id: strsep.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
2
3#ifndef _BSD_STRSEP_H
4#define _BSD_STRSEP_H
5
6#include "config.h"
7
8#ifndef HAVE_STRSEP
9char *strsep(char **stringp, const char *delim);
10#endif /* HAVE_STRSEP */
11
12#endif /* _BSD_STRSEP_H */
diff --git a/openbsd-compat/vis.c b/openbsd-compat/vis.c
index b8dd20226..e6a2ce98d 100644
--- a/openbsd-compat/vis.c
+++ b/openbsd-compat/vis.c
@@ -26,7 +26,7 @@
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE. 27 * SUCH DAMAGE.
28 */ 28 */
29#include "config.h" 29#include "includes.h"
30#if !defined(HAVE_STRNVIS) 30#if !defined(HAVE_STRNVIS)
31 31
32#if defined(LIBC_SCCS) && !defined(lint) 32#if defined(LIBC_SCCS) && !defined(lint)
diff --git a/openbsd-compat/vis.h b/openbsd-compat/vis.h
index 9a3365317..1c131cc85 100644
--- a/openbsd-compat/vis.h
+++ b/openbsd-compat/vis.h
@@ -32,7 +32,7 @@
32 * @(#)vis.h 5.9 (Berkeley) 4/3/91 32 * @(#)vis.h 5.9 (Berkeley) 4/3/91
33 */ 33 */
34 34
35#include "config.h" 35#include "includes.h"
36#if !defined(HAVE_STRNVIS) 36#if !defined(HAVE_STRNVIS)
37 37
38#ifndef _VIS_H_ 38#ifndef _VIS_H_
diff --git a/openbsd-compat/xcrypt.h b/openbsd-compat/xcrypt.h
deleted file mode 100644
index 16c55fc67..000000000
--- a/openbsd-compat/xcrypt.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * Copyright (c) 2003 Ben Lindstrom. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26
27char *xcrypt(const char *password, const char *salt);
28char *shadow_pw(struct passwd *pw);
diff --git a/openbsd-compat/xmmap.h b/openbsd-compat/xmmap.h
deleted file mode 100644
index cae884060..000000000
--- a/openbsd-compat/xmmap.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * Copyright (c) 2002 Tim Rice. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25/* $Id: xmmap.h,v 1.2 2003/06/02 02:25:27 tim Exp $ */
26
27void *xmmap(size_t size);