diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-04-06 10:48:10 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-04-06 10:48:10 +0000 |
commit | 1926c1712f5a585e23260e9cfe28e431cf37893d (patch) | |
tree | 33f10dd52ed54dcffa031da86b0314e679ef5874 | |
parent | 77e21b45516f1c6de27c7f19490a0aa4ed0c812f (diff) |
Retain the UF_PLEDGED flag from the original fd during dup(2).
Nothing uses this fd-tracking part of pledge yet.
OK deraadt@
-rw-r--r-- | sys/kern/kern_descrip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index dde0442521a..3cbbee21228 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.144 2018/04/03 09:00:03 mpi Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.145 2018/04/06 10:48:09 bluhm Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -615,7 +615,7 @@ finishdup(struct proc *p, struct file *fp, int old, int new, FREF(oldfp); fdp->fd_ofiles[new] = fp; - fdp->fd_ofileflags[new] = fdp->fd_ofileflags[old] & ~(UF_EXCLOSE|UF_PLEDGED); + fdp->fd_ofileflags[new] = fdp->fd_ofileflags[old] & ~UF_EXCLOSE; fp->f_count++; FRELE(fp, p); if (dup2 && oldfp == NULL) |