From: claudio Date: Mon, 30 Aug 2021 09:05:44 +0000 (+0000) Subject: Make sure unveil remains locked over fork even in the case where the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9b6786052b88c6addb5fa2ce8b326f05d4d18d1c;p=openbsd 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@ --- 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 @@ -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; } /*