Mark futex(2) as PLEDGE_STDIO like all other thread-related syscalls.
authormpi <mpi@openbsd.org>
Sat, 29 Apr 2017 08:02:56 +0000 (08:02 +0000)
committermpi <mpi@openbsd.org>
Sat, 29 Apr 2017 08:02:56 +0000 (08:02 +0000)
From semarie@, ok deraadt@

sys/kern/kern_pledge.c

index 4bea704..66a4975 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kern_pledge.c,v 1.206 2017/04/28 13:50:55 mpi Exp $   */
+/*     $OpenBSD: kern_pledge.c,v 1.207 2017/04/29 08:02:56 mpi Exp $   */
 
 /*
  * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -258,8 +258,8 @@ const uint64_t pledge_syscalls[SYS_MAXSYSCALL] = {
         */
        [SYS___tfork] = PLEDGE_STDIO,
        [SYS_sched_yield] = PLEDGE_STDIO,
+       [SYS_futex] = PLEDGE_STDIO,
        [SYS___thrsleep] = PLEDGE_STDIO,
-       [SYS_futex] = PLEDGE_ALWAYS,
        [SYS___thrwakeup] = PLEDGE_STDIO,
        [SYS___threxit] = PLEDGE_STDIO,
        [SYS___thrsigdivert] = PLEDGE_STDIO,