diff options
| author | 2019-05-13 22:55:27 +0000 | |
|---|---|---|
| committer | 2019-05-13 22:55:27 +0000 | |
| commit | 1de745bca436d2f8732f18785f95bf07a0af4fd5 (patch) | |
| tree | 0b7e97ab8390170d430b7d0f71291029c45228b4 /sys/kern/kern_pledge.c | |
| parent | Remove unused pad check, which is handled by tls1_cbc_remove_padding() now. (diff) | |
| download | wireguard-openbsd-1de745bca436d2f8732f18785f95bf07a0af4fd5.tar.xz wireguard-openbsd-1de745bca436d2f8732f18785f95bf07a0af4fd5.zip | |
Add a kernel implementation of realpath() as __realpath().
We want this so that we can stop allowing readlink() on traversed
vnodes in unveil().
This includes all the kernel side and the system call.
This is not yet used in libc for realpath, so nothing calls this yet.
The libc wrapper will be committed later.
Testing by many, and ports build by naddy@
ok deraadt@
Diffstat (limited to 'sys/kern/kern_pledge.c')
| -rw-r--r-- | sys/kern/kern_pledge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 04ade838271..6c68e592122 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.251 2019/02/14 15:41:47 florian Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.252 2019/05/13 22:55:27 beck Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -253,6 +253,7 @@ const uint64_t pledge_syscalls[SYS_MAXSYSCALL] = { [SYS_stat] = PLEDGE_STDIO, [SYS_access] = PLEDGE_STDIO, [SYS_readlink] = PLEDGE_STDIO, + [SYS___realpath] = PLEDGE_STDIO, /* XXX Fix me Theo! Fix me! */ [SYS_adjtime] = PLEDGE_STDIO, /* setting requires "settime" */ [SYS_adjfreq] = PLEDGE_SETTIME, |
