imgact_shell.c (2112) | imgact_shell.c (3098) |
---|---|
1/* 2 * Copyright (c) 1993, David Greenman 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * | 1/* 2 * Copyright (c) 1993, David Greenman 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * |
31 * $Id: imgact_shell.c,v 1.4 1994/08/13 03:50:23 wollman Exp $ | 31 * $Id: imgact_shell.c,v 1.5 1994/08/18 22:34:56 wollman Exp $ |
32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/resourcevar.h> 37#include <sys/exec.h> 38#include <sys/imgact.h> 39#include <sys/kernel.h> --- 12 unchanged lines hidden (view full) --- 52 * at iparams->stringbase is the minimal successful exit requirement. 53 */ 54int 55exec_shell_imgact(iparams) 56 struct image_params *iparams; 57{ 58 const char *image_header = iparams->image_header; 59 const char *ihp, *line_endp; | 32 */ 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/resourcevar.h> 37#include <sys/exec.h> 38#include <sys/imgact.h> 39#include <sys/kernel.h> --- 12 unchanged lines hidden (view full) --- 52 * at iparams->stringbase is the minimal successful exit requirement. 53 */ 54int 55exec_shell_imgact(iparams) 56 struct image_params *iparams; 57{ 58 const char *image_header = iparams->image_header; 59 const char *ihp, *line_endp; |
60 int length; | |
61 char *interp; | 60 char *interp; |
62 char **argv; | |
63 64 /* a shell script? */ 65 if (((short *) image_header)[0] != SHELLMAGIC) 66 return(-1); 67 68 /* 69 * Don't allow a shell script to be the shell for a shell 70 * script. :-) --- 75 unchanged lines hidden --- | 61 62 /* a shell script? */ 63 if (((short *) image_header)[0] != SHELLMAGIC) 64 return(-1); 65 66 /* 67 * Don't allow a shell script to be the shell for a shell 68 * script. :-) --- 75 unchanged lines hidden --- |