-
Notifications
You must be signed in to change notification settings - Fork 873
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow reading of sysctl kern.somaxconn in "inet", due to
operational behaviour of "go" which is not unreasonable from Jimmy Brush
- Loading branch information
deraadt
committed
Feb 4, 2020
1 parent
67d0e46
commit 5d6a987
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: kern_pledge.c,v 1.257 2020/01/23 01:02:34 dlg Exp $ */ | ||
/* $OpenBSD: kern_pledge.c,v 1.258 2020/02/04 10:09:37 deraadt Exp $ */ | ||
|
||
/* | ||
* Copyright (c) 2015 Nicholas Marriott <[email protected]> | ||
|
@@ -904,6 +904,12 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, void *new) | |
return (0); | ||
} | ||
|
||
if ((p->p_p->ps_pledge & PLEDGE_INET)) { | ||
if (miblen == 2 && /* kern.somaxconn */ | ||
mib[0] == CTL_KERN && mib[1] == KERN_SOMAXCONN) | ||
return (0); | ||
} | ||
|
||
if ((p->p_p->ps_pledge & (PLEDGE_ROUTE | PLEDGE_INET | PLEDGE_DNS))) { | ||
if (miblen == 6 && /* getifaddrs() */ | ||
mib[0] == CTL_NET && mib[1] == PF_ROUTE && | ||
|