Unveiling unveil(2).
authorbeck <beck@openbsd.org>
Fri, 13 Jul 2018 09:25:22 +0000 (09:25 +0000)
committerbeck <beck@openbsd.org>
Fri, 13 Jul 2018 09:25:22 +0000 (09:25 +0000)
commit8b23add8c74b86d0da67de43302cf21b97b028be
treef1c0090b4f820a76d34793eb08027661681a4d3c
parentbd0653fd81e6682b3d4749f89bcdb1c1db9fc141
Unveiling unveil(2).
This brings unveil into the tree, disabled by default - Currently
this will return EPERM on all attempts to use it until we are
fully certain it is ready for people to start using, but this
now allows for others to do more tweaking and experimentation.

Still needs to send the unveil's across forks and execs before
fully enabling.

Many thanks to robert@ and deraadt@ for extensive testing.
ok deraadt@
26 files changed:
include/unistd.h
lib/libc/Symbols.list
lib/libc/hidden/unistd.h
lib/libc/sys/Makefile.inc
lib/libc/sys/pledge.2
lib/libc/sys/unveil.2 [new file with mode: 0644]
regress/sys/kern/Makefile
sys/conf/files
sys/kern/init_sysent.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_pledge.c
sys/kern/kern_unveil.c [new file with mode: 0644]
sys/kern/syscalls.c
sys/kern/syscalls.master
sys/kern/vfs_lookup.c
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c
sys/sys/namei.h
sys/sys/pledge.h
sys/sys/proc.h
sys/sys/syscall.h
sys/sys/syscallargs.h
sys/sys/vnode.h
usr.bin/kdump/ktrstruct.c