From 9b6786052b88c6addb5fa2ce8b326f05d4d18d1c Mon Sep 17 00:00:00 2001 From: claudio Date: Mon, 30 Aug 2021 09:05:44 +0000 Subject: [PATCH] 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@ --- sys/kern/kern_unveil.c | 4 ++-- 1 file 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 @@ -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; } /* -- 2.20.1