summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-01-25 13:12:28 +1100
committerDamien Miller <djm@mindrot.org>2014-01-25 13:12:28 +1100
commitc96d85376d779b6ac61525b5440010d344d2f23f (patch)
tree31ada9d348dd087092cb4c4d947a61dadae5a3bd
parentf62ecef9939cb3dbeb10602fd705d4db3976d822 (diff)
- (djm) [configure.ac] Do not attempt to use capsicum sandbox unless
sys/capability.h exists and cap_rights_limit is in libc. Fixes build on FreeBSD9x which provides the header but not the libc support.
-rw-r--r--ChangeLog4
-rw-r--r--configure.ac18
2 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index d08718952..9dc664e57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
120130125 120130125
2 - (djm) [configure.ac] Fix detection of capsicum sandbox on FreeBSD 2 - (djm) [configure.ac] Fix detection of capsicum sandbox on FreeBSD
3 - (djm) [configure.ac] Do not attempt to use capsicum sandbox unless
4 sys/capability.h exists and cap_rights_limit is in libc. Fixes
5 build on FreeBSD9x which provides the header but not the libc
6 support.
3 7
420130124 820130124
5 - (djm) [Makefile.in regress/scp-ssh-wrapper.sh regress/scp.sh] Make 9 - (djm) [Makefile.in regress/scp-ssh-wrapper.sh regress/scp.sh] Make
diff --git a/configure.ac b/configure.ac
index 00ca0fb5b..6bf30e82c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.560 2014/01/25 01:34:39 djm Exp $ 1# $Id: configure.ac,v 1.561 2014/01/25 02:12:29 djm 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
17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) 17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
18AC_REVISION($Revision: 1.560 $) 18AC_REVISION($Revision: 1.561 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20AC_LANG([C]) 20AC_LANG([C])
21 21
@@ -120,9 +120,6 @@ AC_CHECK_DECL([PR_SET_NO_NEW_PRIVS], [have_linux_no_new_privs=1], , [
120 #include <sys/types.h> 120 #include <sys/types.h>
121 #include <linux/prctl.h> 121 #include <linux/prctl.h>
122]) 122])
123AC_CHECK_DECL([cap_enter], [have_cap_enter=1], , [
124 #include <sys/capability.h>
125])
126 123
127use_stack_protector=1 124use_stack_protector=1
128use_toolchain_hardening=1 125use_toolchain_hardening=1
@@ -367,6 +364,7 @@ AC_CHECK_HEADERS([ \
367 sys/audit.h \ 364 sys/audit.h \
368 sys/bitypes.h \ 365 sys/bitypes.h \
369 sys/bsdtty.h \ 366 sys/bsdtty.h \
367 sys/capability.h \
370 sys/cdefs.h \ 368 sys/cdefs.h \
371 sys/dir.h \ 369 sys/dir.h \
372 sys/mman.h \ 370 sys/mman.h \
@@ -1637,6 +1635,7 @@ AC_CHECK_FUNCS([ \
1637 bcrypt_pbkdf \ 1635 bcrypt_pbkdf \
1638 bindresvport_sa \ 1636 bindresvport_sa \
1639 blf_enc \ 1637 blf_enc \
1638 cap_rights_limit \
1640 clock \ 1639 clock \
1641 closefrom \ 1640 closefrom \
1642 dirfd \ 1641 dirfd \
@@ -3034,9 +3033,12 @@ elif test "x$sandbox_arg" = "xseccomp_filter" || \
3034 AC_DEFINE([SANDBOX_SECCOMP_FILTER], [1], [Sandbox using seccomp filter]) 3033 AC_DEFINE([SANDBOX_SECCOMP_FILTER], [1], [Sandbox using seccomp filter])
3035elif test "x$sandbox_arg" = "xcapsicum" || \ 3034elif test "x$sandbox_arg" = "xcapsicum" || \
3036 ( test -z "$sandbox_arg" && \ 3035 ( test -z "$sandbox_arg" && \
3037 test "x$have_cap_enter" = "x1") ; then 3036 test "x$ac_cv_header_sys_capability_h" = "x1" && \
3038 test "x$have_cap_enter" != "x1" && \ 3037 test "x$ac_cv_func_cap_rights_limit" = "x1") ; then
3039 AC_MSG_ERROR([capsicum sandbox requires cap_enter function]) 3038 test "x$ac_cv_header_sys_capability_h" != "x1" && \
3039 AC_MSG_ERROR([capsicum sandbox requires sys/capability.h header])
3040 test "x$ac_cv_func_cap_rights_limit" != "x1" && \
3041 AC_MSG_ERROR([capsicum sandbox requires cap_rights_limit function])
3040 SANDBOX_STYLE="capsicum" 3042 SANDBOX_STYLE="capsicum"
3041 AC_DEFINE([SANDBOX_CAPSICUM], [1], [Sandbox using capsicum]) 3043 AC_DEFINE([SANDBOX_CAPSICUM], [1], [Sandbox using capsicum])
3042elif test "x$sandbox_arg" = "xrlimit" || \ 3044elif test "x$sandbox_arg" = "xrlimit" || \