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: kern_exec.c,v 1.29 1995/12/09 04:29:11 peter Exp $
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/sysproto.h>
37#include <sys/signalvar.h>
38#include <sys/kernel.h>
39#include <sys/mount.h>
--- 14 unchanged lines hidden (view full) ---
54#include <vm/lock.h>
55#include <vm/pmap.h>
56#include <vm/vm_map.h>
57#include <vm/vm_kern.h>
58#include <vm/vm_extern.h>
59
60#include <machine/reg.h>
61
62static int *exec_copyout_strings __P((struct image_params *));
63
64static int exec_check_permissions(struct image_params *);
65
66/*
67 * execsw_set is constructed for us by the linker. Each of the items
68 * is a pointer to a `const struct execsw', hence the double pointer here.
69 */
70static const struct execsw **execsw =
71 (const struct execsw **)&execsw_set.ls_items[0];
72
73#ifndef _SYS_SYSPROTO_H_
74struct execve_args {
75 char *fname;
76 char **argv;
77 char **envv;
78};
79#endif
--- 505 unchanged lines hidden ---
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: kern_exec.c,v 1.29 1995/12/09 04:29:11 peter Exp $
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/sysproto.h>
37#include <sys/signalvar.h>
38#include <sys/kernel.h>
39#include <sys/mount.h>
--- 14 unchanged lines hidden (view full) ---
54#include <vm/lock.h>
55#include <vm/pmap.h>
56#include <vm/vm_map.h>
57#include <vm/vm_kern.h>
58#include <vm/vm_extern.h>
59
60#include <machine/reg.h>
61
62static int *exec_copyout_strings __P((struct image_params *));
63
64static int exec_check_permissions(struct image_params *);
65
66/*
67 * execsw_set is constructed for us by the linker. Each of the items
68 * is a pointer to a `const struct execsw', hence the double pointer here.
69 */
70static const struct execsw **execsw =
71 (const struct execsw **)&execsw_set.ls_items[0];
72
73#ifndef _SYS_SYSPROTO_H_
74struct execve_args {
75 char *fname;
76 char **argv;
77 char **envv;
78};
79#endif
--- 505 unchanged lines hidden ---