summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-08-17 11:59:25 +1000
committerDamien Miller <djm@mindrot.org>2011-08-17 11:59:25 +1000
commit1a91c0f163f0a53e092e7832791a09d659567546 (patch)
treef2817ed2624fc4faaebddc238efef3c2db32783a
parent9c08312968c965aca19d21f08407e21f5824f8b4 (diff)
- (djm) [configure.ac] error out if the host lacks the necessary bits for
an explicitly requested sandbox type
-rw-r--r--ChangeLog2
-rw-r--r--configure.ac13
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 724d22119..0b3152824 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
3 OpenSSL 0.9.7. ok djm 3 OpenSSL 0.9.7. ok djm
4 - (djm) [ openbsd-compat/bsd-cygwin_util.c openbsd-compat/bsd-cygwin_util.h] 4 - (djm) [ openbsd-compat/bsd-cygwin_util.c openbsd-compat/bsd-cygwin_util.h]
5 binary_pipe is no longer required on Cygwin; patch from Corinna Vinschen 5 binary_pipe is no longer required on Cygwin; patch from Corinna Vinschen
6 - (djm) [configure.ac] error out if the host lacks the necessary bits for
7 an explicitly requested sandbox type
6 8
720110812 920110812
8 - (dtucker) [openbsd-compat/port-linux.c] Bug 1924: Improve selinux context 10 - (dtucker) [openbsd-compat/port-linux.c] Bug 1924: Improve selinux context
diff --git a/configure.ac b/configure.ac
index 74d5263a4..31e72867f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.478 2011/06/26 21:18:20 djm Exp $ 1# $Id: configure.ac,v 1.479 2011/08/17 01:59:26 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.478 $) 18AC_REVISION($Revision: 1.479 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20AC_LANG([C]) 20AC_LANG([C])
21 21
@@ -2476,7 +2476,7 @@ AC_SUBST([SSH_PRIVSEP_USER])
2476# Decide which sandbox style to use 2476# Decide which sandbox style to use
2477sandbox_arg="" 2477sandbox_arg=""
2478AC_ARG_WITH([sandbox], 2478AC_ARG_WITH([sandbox],
2479 [ --with-sandbox=style Specify privilege separation sandbox (no, rlimit, systrace)], 2479 [ --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace)],
2480 [ 2480 [
2481 if test "x$withval" = "xyes" ; then 2481 if test "x$withval" = "xyes" ; then
2482 sandbox_arg="" 2482 sandbox_arg=""
@@ -2487,15 +2487,22 @@ AC_ARG_WITH([sandbox],
2487) 2487)
2488if test "x$sandbox_arg" = "xsystrace" || \ 2488if test "x$sandbox_arg" = "xsystrace" || \
2489 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then 2489 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
2490 test "x$have_systr_policy_kill" != "x1" && \
2491 AC_MSG_ERROR([systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support])
2490 SANDBOX_STYLE="systrace" 2492 SANDBOX_STYLE="systrace"
2491 AC_DEFINE([SANDBOX_SYSTRACE], [1], [Sandbox using systrace(4)]) 2493 AC_DEFINE([SANDBOX_SYSTRACE], [1], [Sandbox using systrace(4)])
2492elif test "x$sandbox_arg" = "xdarwin" || \ 2494elif test "x$sandbox_arg" = "xdarwin" || \
2493 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \ 2495 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
2494 test "x$ac_cv_header_sandbox_h" = "xyes") ; then 2496 test "x$ac_cv_header_sandbox_h" = "xyes") ; then
2497 test "x$ac_cv_func_sandbox_init" != "xyes" -o \
2498 "x$ac_cv_header_sandbox_h" != "xyes" && \
2499 AC_MSG_ERROR([Darwin seatbelt sandbox requires sandbox.h and sandbox_init function])
2495 SANDBOX_STYLE="darwin" 2500 SANDBOX_STYLE="darwin"
2496 AC_DEFINE([SANDBOX_DARWIN], [1], [Sandbox using Darwin sandbox_init(3)]) 2501 AC_DEFINE([SANDBOX_DARWIN], [1], [Sandbox using Darwin sandbox_init(3)])
2497elif test "x$sandbox_arg" = "xrlimit" || \ 2502elif test "x$sandbox_arg" = "xrlimit" || \
2498 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" ) ; then 2503 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" ) ; then
2504 test "x$ac_cv_func_setrlimit" != "xyes" && \
2505 AC_MSG_ERROR([rlimit sandbox requires setrlimit function])
2499 SANDBOX_STYLE="rlimit" 2506 SANDBOX_STYLE="rlimit"
2500 AC_DEFINE([SANDBOX_RLIMIT], [1], [Sandbox using setrlimit(2)]) 2507 AC_DEFINE([SANDBOX_RLIMIT], [1], [Sandbox using setrlimit(2)])
2501elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \ 2508elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \