Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/kern Pull up revision 1.40 (requested by elad in tick...
details: https://anonhg.NetBSD.org/src/rev/b25859762e72
branches: netbsd-3
changeset: 576423:b25859762e72
user: tron <tron%NetBSD.org@localhost>
date: Sat Jul 02 17:53:58 2005 +0000
description:
Pull up revision 1.40 (requested by elad in ticket #487):
>From marius@openbsd:
Add an exec message so that whenever a set-uid/gid process executes a new
image which we may control, the exec does not go by unnoticed.
diffstat:
sys/kern/exec_script.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 0030a60b819b -r b25859762e72 sys/kern/exec_script.c
--- a/sys/kern/exec_script.c Sat Jul 02 17:53:51 2005 +0000
+++ b/sys/kern/exec_script.c Sat Jul 02 17:53:58 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_script.c,v 1.38.10.1 2005/06/10 15:10:24 tron Exp $ */
+/* $NetBSD: exec_script.c,v 1.38.10.2 2005/07/02 17:53:58 tron 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.38.10.1 2005/06/10 15:10:24 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.38.10.2 2005/07/02 17:53:58 tron Exp $");
#if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS)
#define FDSCRIPTS /* Need this for safe set-id scripts. */
@@ -56,6 +56,10 @@
#include <sys/verified_exec.h>
+#ifdef SYSTRACE
+#include <sys/systrace.h>
+#endif /* SYSTRACE */
+
/*
* exec_script_makecmds(): Check if it's an executable shell script.
*
@@ -225,8 +229,13 @@
if ((epp->ep_flags & EXEC_HASFD) == 0) {
#endif
/* normally can't fail, but check for it if diagnostic */
+#ifdef SYSTRACE
+ error = copystr(epp->ep_name, *tmpsap++, MAXPATHLEN,
+ (size_t *)0);
+#else
error = copyinstr(epp->ep_name, *tmpsap++, MAXPATHLEN,
(size_t *)0);
+#endif /* SYSTRACE */
#ifdef DIAGNOSTIC
if (error != 0)
panic("exec_script: copyinstr couldn't fail");
Home |
Main Index |
Thread Index |
Old Index