kern_exec.c (86064318c4664f9d1254439d5aaad1a62c26caa3) kern_exec.c (6ab46d52a5be5dd8055899247f0dcac05f3a481c)
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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: kern_exec.c,v 1.42 1996/06/03 04:07:35 davidg Exp $
26 * $Id: kern_exec.c,v 1.43 1996/06/03 04:12:18 davidg Exp $
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/sysproto.h>
32#include <sys/signalvar.h>
33#include <sys/kernel.h>
34#include <sys/mount.h>

--- 485 unchanged lines hidden (view full) ---

520 for (; argc > 0; --argc) {
521 suword(vectp++, (int)destp);
522 while (*stringp++ != 0)
523 destp++;
524 destp++;
525 }
526
527 /* a null vector table pointer seperates the argp's from the envp's */
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/sysproto.h>
32#include <sys/signalvar.h>
33#include <sys/kernel.h>
34#include <sys/mount.h>

--- 485 unchanged lines hidden (view full) ---

520 for (; argc > 0; --argc) {
521 suword(vectp++, (int)destp);
522 while (*stringp++ != 0)
523 destp++;
524 destp++;
525 }
526
527 /* a null vector table pointer seperates the argp's from the envp's */
528 suword(vectp++, NULL);
528 suword(vectp++, 0);
529
530 suword(&arginfo->ps_envstr, (int)vectp);
531 suword(&arginfo->ps_nenvstr, envc);
532
533 /*
534 * Fill in environment portion of vector table.
535 */
536 for (; envc > 0; --envc) {
537 suword(vectp++, (int)destp);
538 while (*stringp++ != 0)
539 destp++;
540 destp++;
541 }
542
543 /* end of vector table is a null pointer */
529
530 suword(&arginfo->ps_envstr, (int)vectp);
531 suword(&arginfo->ps_nenvstr, envc);
532
533 /*
534 * Fill in environment portion of vector table.
535 */
536 for (; envc > 0; --envc) {
537 suword(vectp++, (int)destp);
538 while (*stringp++ != 0)
539 destp++;
540 destp++;
541 }
542
543 /* end of vector table is a null pointer */
544 suword(vectp, NULL);
544 suword(vectp, 0);
545
546 return (stack_base);
547}
548
549/*
550 * Check permissions of file to execute.
551 * Return 0 for success or error code on failure.
552 */

--- 64 unchanged lines hidden ---
545
546 return (stack_base);
547}
548
549/*
550 * Check permissions of file to execute.
551 * Return 0 for success or error code on failure.
552 */

--- 64 unchanged lines hidden ---