summaryrefslogtreecommitdiff
path: root/sandbox-systrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox-systrace.c')
-rw-r--r--sandbox-systrace.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sandbox-systrace.c b/sandbox-systrace.c
index 53fbd47cb..6706c9a80 100644
--- a/sandbox-systrace.c
+++ b/sandbox-systrace.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sandbox-systrace.c,v 1.7 2013/06/01 13:15:52 dtucker Exp $ */ 1/* $OpenBSD: sandbox-systrace.c,v 1.9 2014/01/31 16:39:19 tedu Exp $ */
2/* 2/*
3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org> 3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
4 * 4 *
@@ -66,6 +66,7 @@ static const struct sandbox_policy preauth_policy[] = {
66 { SYS_munmap, SYSTR_POLICY_PERMIT }, 66 { SYS_munmap, SYSTR_POLICY_PERMIT },
67 { SYS_read, SYSTR_POLICY_PERMIT }, 67 { SYS_read, SYSTR_POLICY_PERMIT },
68 { SYS_select, SYSTR_POLICY_PERMIT }, 68 { SYS_select, SYSTR_POLICY_PERMIT },
69 { SYS_shutdown, SYSTR_POLICY_PERMIT },
69 { SYS_sigprocmask, SYSTR_POLICY_PERMIT }, 70 { SYS_sigprocmask, SYSTR_POLICY_PERMIT },
70 { SYS_write, SYSTR_POLICY_PERMIT }, 71 { SYS_write, SYSTR_POLICY_PERMIT },
71 { -1, -1 } 72 { -1, -1 }
@@ -141,7 +142,7 @@ ssh_sandbox_parent(struct ssh_sandbox *box, pid_t child_pid,
141 box->systrace_fd, child_pid, strerror(errno)); 142 box->systrace_fd, child_pid, strerror(errno));
142 143
143 /* Allocate and assign policy */ 144 /* Allocate and assign policy */
144 bzero(&policy, sizeof(policy)); 145 memset(&policy, 0, sizeof(policy));
145 policy.strp_op = SYSTR_POLICY_NEW; 146 policy.strp_op = SYSTR_POLICY_NEW;
146 policy.strp_maxents = SYS_MAXSYSCALL; 147 policy.strp_maxents = SYS_MAXSYSCALL;
147 if (ioctl(box->systrace_fd, STRIOCPOLICY, &policy) == -1) 148 if (ioctl(box->systrace_fd, STRIOCPOLICY, &policy) == -1)