diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-08-30 09:05:45 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-08-30 09:05:45 +0000 |
commit | fefc3c77919a1322e174071c651df764ca925f71 (patch) | |
tree | 346dfde1f5ccd6641232af152b5634c62e552f98 | |
parent | a3ada970a8e215a6d377ed15b9922235d4be49f7 (diff) |
Make sure unveil remains locked over fork even in the case where the
parent just called unveil(NULL, NULL) and nothing else.
With and OK beck@
-rw-r--r-- | sys/kern/kern_unveil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_unveil.c b/sys/kern/kern_unveil.c index 51610c4e436..58afa40022c 100644 --- a/sys/kern/kern_unveil.c +++ b/sys/kern/kern_unveil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_unveil.c,v 1.48 2021/07/16 07:59:38 claudio Exp $ */ +/* $OpenBSD: kern_unveil.c,v 1.49 2021/08/30 09:05:44 claudio Exp $ */ /* * Copyright (c) 2017-2019 Bob Beck <beck@openbsd.org> @@ -205,6 +205,7 @@ unveil_copy(struct process *parent, struct process *child) { size_t i; + child->ps_uvdone = parent->ps_uvdone; if (parent->ps_uvvcount == 0) return; @@ -236,7 +237,6 @@ unveil_copy(struct process *parent, struct process *child) to->uv_cover = from->uv_cover; } child->ps_uvvcount = parent->ps_uvvcount; - child->ps_uvdone = parent->ps_uvdone; } /* |