summaryrefslogtreecommitdiff
path: root/sandbox-systrace.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2015-01-05 16:09:55 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2015-01-05 16:09:55 +0000
commitc0bbca73c6f7f15d5401332151fc9f9755abaf8f (patch)
tree1bbed0bec45f927ff35eedaf91618215ccbf5fb7 /sandbox-systrace.c
parent12459a528f0a5dfa735c6917135c071754daa020 (diff)
Notes
Diffstat (limited to 'sandbox-systrace.c')
-rw-r--r--sandbox-systrace.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sandbox-systrace.c b/sandbox-systrace.c
index 6706c9a80536..aaa3d8f0a62f 100644
--- a/sandbox-systrace.c
+++ b/sandbox-systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sandbox-systrace.c,v 1.9 2014/01/31 16:39:19 tedu Exp $ */
+/* $OpenBSD: sandbox-systrace.c,v 1.13 2014/07/17 00:10:56 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller <djm@mindrot.org>
*
@@ -52,7 +52,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
+
+#ifdef SYS_sendsyslog
+ { SYS_sendsyslog, SYSTR_POLICY_PERMIT },
+#endif
{ SYS_close, SYSTR_POLICY_PERMIT },
{ SYS_exit, SYSTR_POLICY_PERMIT },
{ SYS_getpid, SYSTR_POLICY_PERMIT },