diff options
author | 2015-08-22 20:18:49 +0000 | |
---|---|---|
committer | 2015-08-22 20:18:49 +0000 | |
commit | 430c0dbabc0b49c3b13ba68ed9204b6b4b0d98c3 (patch) | |
tree | 322a56a126346a376ff50a939e8742555c6ea092 /sys/kern/kern_fork.c | |
parent | Explicitly list the symbols permitted to be exported by libc. (diff) | |
download | wireguard-openbsd-430c0dbabc0b49c3b13ba68ed9204b6b4b0d98c3.tar.xz wireguard-openbsd-430c0dbabc0b49c3b13ba68ed9204b6b4b0d98c3.zip |
Move to tame(int flags, char *paths[]) API/ABI.
The pathlist is a whitelist of dirs and files; anything else returns ENOENT.
Recommendation is to use a narrowly defined list. Also add TAME_FATTR, which
permits explicit change operations against "struct stat" fields. Some
other TAME_ flags are refined slightly.
Not cranking libc now, since nothing commited in base uses this and the
timing is uncomfortable for others. Discussed with many; thanks for a
few bug fixes from semarie, doug, guenther.
ok guenther
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r-- | sys/kern/kern_fork.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index e7f7c1b138d..abcb77ba615 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_fork.c,v 1.181 2015/07/19 02:35:35 deraadt Exp $ */ +/* $OpenBSD: kern_fork.c,v 1.182 2015/08/22 20:18:49 deraadt Exp $ */ /* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */ /* @@ -224,6 +224,9 @@ process_new(struct proc *p, struct process *parent, int flags) else pr->ps_vmspace = uvmspace_fork(parent); + if (pr->ps_tamepaths) + pr->ps_tamepaths->wl_ref++; + if (parent->ps_flags & PS_PROFIL) startprofclock(pr); if (flags & FORK_PTRACE) |