diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-09-12 18:52:18 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-09-12 18:52:18 +0000 |
commit | b6e331faf6310120006605c8c7f13258d62d12b8 (patch) | |
tree | 70e6bab06b569dff725ee6208faec4a6633a7e5d | |
parent | 1df50ed6b6a7e0949408ddb64aab9d3f49d12969 (diff) |
ok, must have read access at least.
-rw-r--r-- | sys/kern/exec_elf.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |