diff options
| author | maxv <maxv@NetBSD.org> | 2014-02-21 08:11:59 +0000 |
|---|---|---|
| committer | maxv <maxv@NetBSD.org> | 2014-02-21 08:11:59 +0000 |
| commit | 4855680df77d28bfccb546e9cfae77b9cb8fa768 (patch) | |
| tree | d5d1d98165f2fd46b64367d2df0656a63dab1cdb /sys/kern/exec_script.c | |
| parent | d91ba50b1f2201f6aece5635388d036fdcd2b58b (diff) | |
Revert rev1.38. The header already begins with EXEC_SCRIPT_MAGIC="#!".
So it can't be ELFMAG="\177ELF" at the same time.
ok christos@
Diffstat (limited to 'sys/kern/exec_script.c')
| -rw-r--r-- | sys/kern/exec_script.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c index e829625c38a..824209a76d9 100644 --- a/sys/kern/exec_script.c +++ b/sys/kern/exec_script.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec_script.c,v 1.68 2014/02/17 19:29:46 maxv Exp $ */ +/* $NetBSD: exec_script.c,v 1.69 2014/02/21 08:11:59 maxv 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.68 2014/02/17 19:29:46 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exec_script.c,v 1.69 2014/02/21 08:11:59 maxv Exp $"); #if defined(SETUIDSCRIPTS) && !defined(FDSCRIPTS) #define FDSCRIPTS /* Need this for safe set-id scripts. */ @@ -155,13 +155,6 @@ exec_script_makecmds(struct lwp *l, struct exec_package *epp) if (cp >= hdrstr + hdrlinelen) return ENOEXEC; - /* - * If the script has an ELF header, don't exec it. - */ - if (epp->ep_hdrvalid >= sizeof(ELFMAG)-1 && - memcmp(hdrstr, ELFMAG, sizeof(ELFMAG)-1) == 0) - return ENOEXEC; - shellname = NULL; shellarg = NULL; shellarglen = 0; |
