From 2c8d261a57333382b880743db074ffe384eb966a Mon Sep 17 00:00:00 2001 From: pefo Date: Thu, 12 Sep 1996 18:52:17 +0000 Subject: [PATCH] ok, must have read access at least. --- sys/kern/exec_elf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index a68c890236e..8b9c774d27a 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.16 1996/09/12 14:43:30 pefo Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.17 1996/09/12 18:52:17 pefo Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -320,6 +320,8 @@ elf_load_file(p, path, epp, ap, last) error = EACCES; goto bad; } + if ((error = VOP_ACCESS(vp, VREAD, p->p_ucred, p)) != 0) + goto bad1; if ((error = elf_read_from(p, nd.ni_vp, 0, (caddr_t) &eh, sizeof(eh))) != 0) goto bad1; -- 2.20.1