diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-28 11:16:24 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-10-28 11:16:24 +0000 |
commit | 7716e9e9a7611ac6973eaebcda833f3795e0b664 (patch) | |
tree | ffab2143b233ce72e5fbd1c8515716564cec7cdc /sys | |
parent | b0d22683bc5c1cd0d47dc81e65db0d1e227d25ba (diff) |
Though sys_ktrace is not yet pledge allowed, prepare by setting
p_pledgenote as required.
XXX open question to guenther regarding FREAD to vnopen() / vnclose()
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_ktrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index e1727956af9..7d824781f30 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.81 2015/10/25 20:39:54 deraadt Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.82 2015/10/28 11:16:23 deraadt Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -446,7 +446,7 @@ sys_ktrace(struct proc *p, void *v, register_t *retval) * an operation which requires a file argument. */ cred = p->p_ucred; - p->p_pledgenote = PLEDGE_CPATH; + p->p_pledgenote = PLEDGE_CPATH | PLEDGE_WPATH; NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, fname), p); if ((error = vn_open(&nd, FREAD|FWRITE|O_NOFOLLOW, 0)) != 0) |