summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-10-04 04:08:25 +0000
committerderaadt <deraadt@openbsd.org>2015-10-04 04:08:25 +0000
commitc7945561b5c70c389ca623eddf8073bf7fd2c238 (patch)
treeadcacaefb7a26e91d4f12dea5984a393ea8cd470
parentspelling (diff)
downloadwireguard-openbsd-c7945561b5c70c389ca623eddf8073bf7fd2c238.tar.xz
wireguard-openbsd-c7945561b5c70c389ca623eddf8073bf7fd2c238.zip
Allow sysctl read of vm.vm_psstrings, as setproctitle() uses this to
find the ps buffer. Few programs want to do their first setproctitle() rather late...
-rw-r--r--sys/kern/kern_tame.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_tame.c b/sys/kern/kern_tame.c
index d616c053e27..712b71f5697 100644
--- a/sys/kern/kern_tame.c
+++ b/sys/kern/kern_tame.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_tame.c,v 1.55 2015/10/04 01:56:54 deraadt Exp $ */
+/* $OpenBSD: kern_tame.c,v 1.56 2015/10/04 04:08:25 deraadt Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -809,6 +809,12 @@ tame_sysctl_check(struct proc *p, int namelen, int *name, void *new)
if (new)
return (EFAULT);
+ /* setproctitle() */
+ if (namelen == 2 &&
+ name[0] == CTL_VM &&
+ name[1] == VM_PSSTRINGS)
+ return (0);
+
/* getifaddrs() */
if ((p->p_p->ps_tame & TAME_INET) &&
namelen == 6 &&