summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_script.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/exec_script.c')
-rw-r--r--sys/kern/exec_script.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c
index 4ad3847350a..e0af44c583d 100644
--- a/sys/kern/exec_script.c
+++ b/sys/kern/exec_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_script.c,v 1.19 2004/05/14 04:00:33 tedu Exp $ */
+/* $OpenBSD: exec_script.c,v 1.20 2004/06/23 05:16:35 marius Exp $ */
/* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */
/*
@@ -46,6 +46,12 @@
#include <sys/exec_script.h>
+#include "systrace.h"
+
+#if NSYSTRACE > 0
+#include <dev/systrace.h>
+#endif
+
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
#define FDSCRIPTS /* Need this for safe set-id scripts. */
#endif
@@ -214,8 +220,13 @@ check_shell:
if ((epp->ep_flags & EXEC_HASFD) == 0) {
#endif
/* normally can't fail, but check for it if diagnostic */
- error = copyinstr(epp->ep_name, *tmpsap++, MAXPATHLEN,
+#if NSYSTRACE > 0
+ error = copystr(epp->ep_name, *tmpsap++, MAXPATHLEN,
(size_t *)0);
+#else
+ error = copyinstr(epp->ep_name, *tmpsap++, MAXPATHLEN,
+ (size_t *)0);
+#endif
#ifdef DIAGNOSTIC
if (error != 0)
panic("exec_script: copyinstr couldn't fail");