diff options
author | Damien Miller <djm@mindrot.org> | 2011-06-27 07:18:18 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-06-27 07:18:18 +1000 |
commit | cd5e52ee784f0ff67b60ffeeab335ed64df688a4 (patch) | |
tree | 26405057dba53c82c603b3bb360faf81d6ff9e33 /configure.ac | |
parent | dcbd41e7aff4c7ef10dd13d8833a8cba82f9a794 (diff) |
- (djm) [configure.ac Makefile.in sandbox-darwin.c] Add a sandbox for
Darwin/OS X using sandbox_init() + setrlimit(); feedback and testing
markus@
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 380a8b949..74d5263a4 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.477 2011/06/22 22:30:03 djm Exp $ | 1 | # $Id: configure.ac,v 1.478 2011/06/26 21:18:20 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 | ||
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.477 $) | 18 | AC_REVISION($Revision: 1.478 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -525,6 +525,8 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) | |||
525 | AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV], | 525 | AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV], |
526 | [Define to a Set Process Title type if your system is | 526 | [Define to a Set Process Title type if your system is |
527 | supported by bsd-setproctitle.c]) | 527 | supported by bsd-setproctitle.c]) |
528 | AC_CHECK_FUNCS([sandbox_init]) | ||
529 | AC_CHECK_HEADERS([sandbox.h]) | ||
528 | ;; | 530 | ;; |
529 | *-*-dragonfly*) | 531 | *-*-dragonfly*) |
530 | SSHDLIBS="$SSHDLIBS -lcrypt" | 532 | SSHDLIBS="$SSHDLIBS -lcrypt" |
@@ -2487,6 +2489,11 @@ if test "x$sandbox_arg" = "xsystrace" || \ | |||
2487 | ( 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 |
2488 | SANDBOX_STYLE="systrace" | 2490 | SANDBOX_STYLE="systrace" |
2489 | AC_DEFINE([SANDBOX_SYSTRACE], [1], [Sandbox using systrace(4)]) | 2491 | AC_DEFINE([SANDBOX_SYSTRACE], [1], [Sandbox using systrace(4)]) |
2492 | elif test "x$sandbox_arg" = "xdarwin" || \ | ||
2493 | ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \ | ||
2494 | test "x$ac_cv_header_sandbox_h" = "xyes") ; then | ||
2495 | SANDBOX_STYLE="darwin" | ||
2496 | AC_DEFINE([SANDBOX_DARWIN], [1], [Sandbox using Darwin sandbox_init(3)]) | ||
2490 | elif test "x$sandbox_arg" = "xrlimit" || \ | 2497 | elif test "x$sandbox_arg" = "xrlimit" || \ |
2491 | ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" ) ; then | 2498 | ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" ) ; then |
2492 | SANDBOX_STYLE="rlimit" | 2499 | SANDBOX_STYLE="rlimit" |