summaryrefslogtreecommitdiff
path: root/sys/kern/exec_script.c
diff options
context:
space:
mode:
authorelad <elad@NetBSD.org>2006-12-20 11:35:29 +0000
committerelad <elad@NetBSD.org>2006-12-20 11:35:29 +0000
commit368ec17e692892cc73b006b43de1025563d0f2ec (patch)
treea739c225eb323439a5610a7a5a45bd3ed270363e /sys/kern/exec_script.c
parentd05a6603f69c715593b05cfda32568f23a732b99 (diff)
Remove the third argument from check_exec() and just check for ep_flags
in the exec_package to know if we need to use VERIEXEC_DIRECT or VERIEXEC_INDIRECT. Suggested by and okay yamt@
Diffstat (limited to 'sys/kern/exec_script.c')
-rw-r--r--sys/kern/exec_script.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c
index db1d4cb9321..907b98f1976 100644
--- a/sys/kern/exec_script.c
+++ b/sys/kern/exec_script.c
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_script.c,v 1.52 2006/07/26 09:33:57 dogcow Exp $ */
+/* $NetBSD: exec_script.c,v 1.53 2006/12/20 11:35:29 elad Exp $ */
/*
* Copyright (c) 1993, 1994, 1996 Christopher G. Demetriou
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.52 2006/07/26 09:33:57 dogcow Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.53 2006/12/20 11:35:29 elad Exp $");
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
#define FDSCRIPTS /* Need this for safe set-id scripts. */
@@ -56,10 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.52 2006/07/26 09:33:57 dogcow Exp
#include <sys/exec_script.h>
#include <sys/exec_elf.h>
-#if NVERIEXEC > 0
-#include <sys/verified_exec.h>
-#endif /* NVERIEXEC > 0 */
-
#ifdef SYSTRACE
#include <sys/systrace.h>
#endif /* SYSTRACE */
@@ -276,11 +272,7 @@ check_shell:
scriptvp = epp->ep_vp;
oldpnbuf = epp->ep_ndp->ni_cnd.cn_pnbuf;
-#if NVERIEXEC > 0
- if ((error = check_exec(l, epp, VERIEXEC_INDIRECT)) == 0) {
-#else
- if ((error = check_exec(l, epp, 0)) == 0) {
-#endif /* NVERIEXEC > 0 */
+ if ((error = check_exec(l, epp)) == 0) {
/* note that we've clobbered the header */
epp->ep_flags |= EXEC_DESTR|EXEC_HASES;