diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | openbsd-compat/bsd-closefrom.c | 7 |
3 files changed, 18 insertions, 3 deletions
@@ -1,6 +1,8 @@ | |||
1 | 20060817 | 1 | 20060817 |
2 | - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c] | 2 | - (dtucker) [openbsd-compat/fake-rfc2553.c openbsd-compat/setproctitle.c] |
3 | Include stdlib.h for malloc and friends. | 3 | Include stdlib.h for malloc and friends. |
4 | - (dtucker) [configure.ac openbsd-compat/bsd-closefrom.c] Use F_CLOSEM fcntl | ||
5 | for closefrom() on AIX. Pointed out by William Ahern. | ||
4 | 6 | ||
5 | 20060816 | 7 | 20060816 |
6 | - (djm) [audit-bsm.c] Sprinkle in some headers | 8 | - (djm) [audit-bsm.c] Sprinkle in some headers |
@@ -5214,4 +5216,4 @@ | |||
5214 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 5216 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
5215 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 5217 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
5216 | 5218 | ||
5217 | $Id: ChangeLog,v 1.4480 2006/08/17 08:55:27 dtucker Exp $ | 5219 | $Id: ChangeLog,v 1.4481 2006/08/17 09:35:49 dtucker Exp $ |
diff --git a/configure.ac b/configure.ac index 31dac052e..7a296ae8b 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.348 2006/08/04 09:44:23 dtucker Exp $ | 1 | # $Id: configure.ac,v 1.349 2006/08/17 09:35:49 dtucker Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -15,7 +15,7 @@ | |||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | ||
17 | AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) | 17 | AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) |
18 | AC_REVISION($Revision: 1.348 $) | 18 | AC_REVISION($Revision: 1.349 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | 20 | ||
21 | AC_CONFIG_HEADER(config.h) | 21 | AC_CONFIG_HEADER(config.h) |
@@ -180,6 +180,12 @@ case "$host" in | |||
180 | [#include <usersec.h>] | 180 | [#include <usersec.h>] |
181 | ) | 181 | ) |
182 | AC_CHECK_FUNCS(setauthdb) | 182 | AC_CHECK_FUNCS(setauthdb) |
183 | AC_CHECK_DECL(F_CLOSEM, | ||
184 | AC_DEFINE(USE_FCNTL_CLOSEM, 1, [Use F_CLOSEM fcntl for closefrom]), | ||
185 | [], | ||
186 | [ #include <limits.h> | ||
187 | #include <fcntl.h> ] | ||
188 | ) | ||
183 | check_for_aix_broken_getaddrinfo=1 | 189 | check_for_aix_broken_getaddrinfo=1 |
184 | AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.]) | 190 | AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.]) |
185 | AC_DEFINE(SETEUID_BREAKS_SETUID, 1, | 191 | AC_DEFINE(SETEUID_BREAKS_SETUID, 1, |
diff --git a/openbsd-compat/bsd-closefrom.c b/openbsd-compat/bsd-closefrom.c index 3f17302d1..e7a521e43 100644 --- a/openbsd-compat/bsd-closefrom.c +++ b/openbsd-compat/bsd-closefrom.c | |||
@@ -22,6 +22,9 @@ | |||
22 | #include <sys/param.h> | 22 | #include <sys/param.h> |
23 | #include <unistd.h> | 23 | #include <unistd.h> |
24 | #include <stdio.h> | 24 | #include <stdio.h> |
25 | #ifdef HAVE_FCNTL_H | ||
26 | # include <fcntl.h> | ||
27 | #endif | ||
25 | #include <limits.h> | 28 | #include <limits.h> |
26 | #include <stdlib.h> | 29 | #include <stdlib.h> |
27 | #include <stddef.h> | 30 | #include <stddef.h> |
@@ -76,6 +79,10 @@ closefrom(int lowfd) | |||
76 | } | 79 | } |
77 | (void) closedir(dirp); | 80 | (void) closedir(dirp); |
78 | } else | 81 | } else |
82 | #elif defined(USE_FCNTL_CLOSEM) | ||
83 | if (fcntl(lowfd, F_CLOSEM, 0) != -1) { | ||
84 | return; | ||
85 | } else | ||
79 | #endif | 86 | #endif |
80 | { | 87 | { |
81 | /* | 88 | /* |