summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAaron Bieber <abieber@cvs.openbsd.org>2021-03-25 21:27:46 +0000
committerAaron Bieber <abieber@cvs.openbsd.org>2021-03-25 21:27:46 +0000
commit9f95ab795bb433dac6f2e5349226e36944c98a5a (patch)
treea4d76a9a0cd297751002052c3fcaa1588220a862 /sys
parent785e4d0ebd6c684acedd31a47721d13f90718723 (diff)
Permit kern.somaxconn when the unix pledge is used. Previously this was only
allowed when inet was used. This lets Go programs use 'unix' without also including 'inet'. from Josh Rickmar ok / tree review from deraadt@, commit message cluestick from tb@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_pledge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index 2de0d500e39..daa78925ecf 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.270 2021/02/03 22:46:55 tobhe Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.271 2021/03/25 21:27:45 abieber Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -888,7 +888,7 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new)
return (0);
}
- if ((p->p_p->ps_pledge & PLEDGE_INET)) {
+ if ((p->p_p->ps_pledge & (PLEDGE_INET | PLEDGE_UNIX))) {
if (miblen == 2 && /* kern.somaxconn */
mib[0] == CTL_KERN && mib[1] == KERN_SOMAXCONN)
return (0);