diff options
author | deraadt@openbsd.org <deraadt@openbsd.org> | 2015-05-18 15:06:05 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-05-21 15:06:06 +1000 |
commit | 7cc44ef74133a473734bbcbd3484f24d6a7328c5 (patch) | |
tree | 58bbf14c8477808c50b3932520754d3f3339861b /sandbox-systrace.c | |
parent | 9173d0fbe44de7ebcad8a15618e13a8b8d78902e (diff) |
upstream commit
getentropy() and sendsyslog() have been around long
enough. openssh-portable may want the #ifdef's but not base. discussed with
djm few weeks back
Upstream-ID: 0506a4334de108e3fb6c66f8d6e0f9c112866926
Diffstat (limited to 'sandbox-systrace.c')
-rw-r--r-- | sandbox-systrace.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sandbox-systrace.c b/sandbox-systrace.c index f30e70575..f8a552898 100644 --- a/sandbox-systrace.c +++ b/sandbox-systrace.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sandbox-systrace.c,v 1.14 2015/01/20 23:14:00 deraadt Exp $ */ | 1 | /* $OpenBSD: sandbox-systrace.c,v 1.15 2015/05/18 15:06:05 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> | 3 | * Copyright (c) 2011 Damien Miller <djm@mindrot.org> |
4 | * | 4 | * |
@@ -50,8 +50,9 @@ struct sandbox_policy { | |||
50 | 50 | ||
51 | /* Permitted syscalls in preauth. Unlisted syscalls get SYSTR_POLICY_KILL */ | 51 | /* Permitted syscalls in preauth. Unlisted syscalls get SYSTR_POLICY_KILL */ |
52 | static const struct sandbox_policy preauth_policy[] = { | 52 | static const struct sandbox_policy preauth_policy[] = { |
53 | { SYS_open, SYSTR_POLICY_NEVER }, | 53 | { SYS_clock_gettime, SYSTR_POLICY_PERMIT }, |
54 | 54 | { SYS_close, SYSTR_POLICY_PERMIT }, | |
55 | { SYS_exit, SYSTR_POLICY_PERMIT }, | ||
55 | #ifdef SYS_getentropy | 56 | #ifdef SYS_getentropy |
56 | /* OpenBSD 5.6 and newer use getentropy(2) to seed arc4random(3). */ | 57 | /* OpenBSD 5.6 and newer use getentropy(2) to seed arc4random(3). */ |
57 | { SYS_getentropy, SYSTR_POLICY_PERMIT }, | 58 | { SYS_getentropy, SYSTR_POLICY_PERMIT }, |
@@ -59,23 +60,20 @@ static const struct sandbox_policy preauth_policy[] = { | |||
59 | /* Previous releases used sysctl(3)'s kern.arnd variable. */ | 60 | /* Previous releases used sysctl(3)'s kern.arnd variable. */ |
60 | { SYS___sysctl, SYSTR_POLICY_PERMIT }, | 61 | { SYS___sysctl, SYSTR_POLICY_PERMIT }, |
61 | #endif | 62 | #endif |
62 | |||
63 | #ifdef SYS_sendsyslog | ||
64 | { SYS_sendsyslog, SYSTR_POLICY_PERMIT }, | ||
65 | #endif | ||
66 | { SYS_close, SYSTR_POLICY_PERMIT }, | ||
67 | { SYS_exit, SYSTR_POLICY_PERMIT }, | ||
68 | { SYS_getpid, SYSTR_POLICY_PERMIT }, | 63 | { SYS_getpid, SYSTR_POLICY_PERMIT }, |
69 | { SYS_gettimeofday, SYSTR_POLICY_PERMIT }, | 64 | { SYS_gettimeofday, SYSTR_POLICY_PERMIT }, |
70 | { SYS_clock_gettime, SYSTR_POLICY_PERMIT }, | ||
71 | { SYS_madvise, SYSTR_POLICY_PERMIT }, | 65 | { SYS_madvise, SYSTR_POLICY_PERMIT }, |
72 | { SYS_mmap, SYSTR_POLICY_PERMIT }, | 66 | { SYS_mmap, SYSTR_POLICY_PERMIT }, |
73 | { SYS_mprotect, SYSTR_POLICY_PERMIT }, | 67 | { SYS_mprotect, SYSTR_POLICY_PERMIT }, |
74 | { SYS_mquery, SYSTR_POLICY_PERMIT }, | 68 | { SYS_mquery, SYSTR_POLICY_PERMIT }, |
75 | { SYS_poll, SYSTR_POLICY_PERMIT }, | ||
76 | { SYS_munmap, SYSTR_POLICY_PERMIT }, | 69 | { SYS_munmap, SYSTR_POLICY_PERMIT }, |
70 | { SYS_open, SYSTR_POLICY_NEVER }, | ||
71 | { SYS_poll, SYSTR_POLICY_PERMIT }, | ||
77 | { SYS_read, SYSTR_POLICY_PERMIT }, | 72 | { SYS_read, SYSTR_POLICY_PERMIT }, |
78 | { SYS_select, SYSTR_POLICY_PERMIT }, | 73 | { SYS_select, SYSTR_POLICY_PERMIT }, |
74 | #ifdef SYS_sendsyslog | ||
75 | { SYS_sendsyslog, SYSTR_POLICY_PERMIT }, | ||
76 | #endif | ||
79 | { SYS_shutdown, SYSTR_POLICY_PERMIT }, | 77 | { SYS_shutdown, SYSTR_POLICY_PERMIT }, |
80 | { SYS_sigprocmask, SYSTR_POLICY_PERMIT }, | 78 | { SYS_sigprocmask, SYSTR_POLICY_PERMIT }, |
81 | { SYS_write, SYSTR_POLICY_PERMIT }, | 79 | { SYS_write, SYSTR_POLICY_PERMIT }, |