summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sandbox-systrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/sandbox-systrace.c')
-rw-r--r--usr.bin/ssh/sandbox-systrace.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/ssh/sandbox-systrace.c b/usr.bin/ssh/sandbox-systrace.c
index bf57ff277eb..f05c601161a 100644
--- a/usr.bin/ssh/sandbox-systrace.c
+++ b/usr.bin/ssh/sandbox-systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sandbox-systrace.c,v 1.10 2014/06/13 08:26:29 deraadt Exp $ */
+/* $OpenBSD: sandbox-systrace.c,v 1.11 2014/06/18 02:59:13 matthew Exp $ */
/*
* Copyright (c) 2011 Damien Miller <djm@mindrot.org>
*
@@ -48,11 +48,17 @@ struct sandbox_policy {
static const struct sandbox_policy preauth_policy[] = {
{ SYS_open, SYSTR_POLICY_NEVER },
+#ifdef SYS_getentropy
+ /* OpenBSD 5.6 and newer use getentropy(2) to seed arc4random(3). */
+ { SYS_getentropy, SYSTR_POLICY_PERMIT },
+#else
+ /* Previous releases used sysctl(3)'s kern.arnd variable. */
{ SYS___sysctl, SYSTR_POLICY_PERMIT },
+#endif
+
{ SYS_close, SYSTR_POLICY_PERMIT },
{ SYS_exit, SYSTR_POLICY_PERMIT },
{ SYS_getpid, SYSTR_POLICY_PERMIT },
- { SYS_getentropy, SYSTR_POLICY_PERMIT },
{ SYS_gettimeofday, SYSTR_POLICY_PERMIT },
{ SYS_clock_gettime, SYSTR_POLICY_PERMIT },
{ SYS_madvise, SYSTR_POLICY_PERMIT },