diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-02 01:39:27 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-02 01:39:27 +0000 |
commit | 2ea1cbb65b8b235fda469fab28cc957f0a6b45f4 (patch) | |
tree | 4ac4a59dbfcb0a1e83047c30a69654a03c68a278 | |
parent | d1c8c4fb7ee9fe18e11832915b6aaadd18f67ad6 (diff) |
re-order system calls in order of risk, ok i'll be honest, ordered this
way they look like tame...
ok djm
-rw-r--r-- | usr.bin/ssh/sandbox-systrace.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/usr.bin/ssh/sandbox-systrace.c b/usr.bin/ssh/sandbox-systrace.c index e9900802e30..5da48c1acca 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.17 2015/07/27 16:29:23 guenther Exp $ */ +/* $OpenBSD: sandbox-systrace.c,v 1.18 2015/10/02 01:39:26 deraadt Exp $ */ /* * Copyright (c) 2011 Damien Miller <djm@mindrot.org> * @@ -46,29 +46,36 @@ struct sandbox_policy { /* Permitted syscalls in preauth. Unlisted syscalls get SYSTR_POLICY_KILL */ static const struct sandbox_policy preauth_policy[] = { - { SYS_clock_gettime, SYSTR_POLICY_PERMIT }, - { SYS_close, SYSTR_POLICY_PERMIT }, { SYS_exit, SYSTR_POLICY_PERMIT }, - { SYS_getentropy, SYSTR_POLICY_PERMIT }, - { SYS_getpid, SYSTR_POLICY_PERMIT }, - { SYS_getpgid, SYSTR_POLICY_PERMIT }, - { SYS_gettimeofday, SYSTR_POLICY_PERMIT }, #ifdef SYS_kbind { SYS_kbind, SYSTR_POLICY_PERMIT }, #endif + + { SYS_getpid, SYSTR_POLICY_PERMIT }, + { SYS_getpgid, SYSTR_POLICY_PERMIT }, + { SYS_clock_gettime, SYSTR_POLICY_PERMIT }, + { SYS_gettimeofday, SYSTR_POLICY_PERMIT }, + { SYS_sigprocmask, SYSTR_POLICY_PERMIT }, + + { SYS_getentropy, SYSTR_POLICY_PERMIT }, + + { SYS_sendsyslog, SYSTR_POLICY_PERMIT }, + { SYS_madvise, SYSTR_POLICY_PERMIT }, { SYS_mmap, SYSTR_POLICY_PERMIT }, { SYS_mprotect, SYSTR_POLICY_PERMIT }, { SYS_mquery, SYSTR_POLICY_PERMIT }, { SYS_munmap, SYSTR_POLICY_PERMIT }, - { SYS_open, SYSTR_POLICY_NEVER }, + { SYS_poll, SYSTR_POLICY_PERMIT }, - { SYS_read, SYSTR_POLICY_PERMIT }, { SYS_select, SYSTR_POLICY_PERMIT }, - { SYS_sendsyslog, SYSTR_POLICY_PERMIT }, - { SYS_shutdown, SYSTR_POLICY_PERMIT }, - { SYS_sigprocmask, SYSTR_POLICY_PERMIT }, + { SYS_read, SYSTR_POLICY_PERMIT }, { SYS_write, SYSTR_POLICY_PERMIT }, + { SYS_shutdown, SYSTR_POLICY_PERMIT }, + { SYS_close, SYSTR_POLICY_PERMIT }, + + { SYS_open, SYSTR_POLICY_NEVER }, + { -1, -1 } }; |