diff options
-rw-r--r-- | sys/compat/freebsd/freebsd_file.c | 13 | ||||
-rw-r--r-- | sys/compat/hpux/hpux_exec.c | 18 | ||||
-rw-r--r-- | sys/compat/ibcs2/ibcs2_misc.c | 36 | ||||
-rw-r--r-- | sys/compat/linux/linux_exec.c | 13 | ||||
-rw-r--r-- | sys/compat/sunos/sunos_misc.c | 20 | ||||
-rw-r--r-- | sys/compat/svr4/svr4_misc.c | 19 | ||||
-rw-r--r-- | sys/compat/ultrix/ultrix_misc.c | 20 |
7 files changed, 99 insertions, 40 deletions
diff --git a/sys/compat/freebsd/freebsd_file.c b/sys/compat/freebsd/freebsd_file.c index 35ceab5ce3a..52d8c6cfe99 100644 --- a/sys/compat/freebsd/freebsd_file.c +++ b/sys/compat/freebsd/freebsd_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: freebsd_file.c,v 1.5 1996/08/02 20:34:45 niklas Exp $ */ +/* $OpenBSD: freebsd_file.c,v 1.6 1997/06/17 11:11:07 deraadt Exp $ */ /* $NetBSD: freebsd_file.c,v 1.3 1996/05/03 17:03:09 christos Exp $ */ /* @@ -400,10 +400,17 @@ freebsd_sys_execve(p, v, retval) syscallarg(char **) argp; syscallarg(char **) envp; } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); + struct sys_execve_args ap; + caddr_t sg; + sg = stackgap_init(p->p_emul); FREEBSD_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_execve(p, uap, retval); + + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return sys_execve(p, &ap, retval); } int diff --git a/sys/compat/hpux/hpux_exec.c b/sys/compat/hpux/hpux_exec.c index 20ae5217a80..8092e485a39 100644 --- a/sys/compat/hpux/hpux_exec.c +++ b/sys/compat/hpux/hpux_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpux_exec.c,v 1.8 1997/03/26 08:11:06 downsj Exp $ */ +/* $OpenBSD: hpux_exec.c,v 1.9 1997/06/17 11:11:08 deraadt Exp $ */ /* $NetBSD: hpux_exec.c,v 1.8 1997/03/16 10:14:44 thorpej Exp $ */ /* @@ -305,10 +305,20 @@ hpux_sys_execve(p, v, retval) void *v; register_t *retval; { - struct hpux_sys_execve_args *uap = v; + struct hpux_sys_execve_args /* { + syscallarg(char *) path; + syscallarg(char **) argv; + syscallarg(char **) envp; + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; - caddr_t sg = stackgap_init(p->p_emul); + sg = stackgap_init(p->p_emul); HPUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return (sys_execve(p, (struct sys_execve_args *)&uap, retval)); + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return (sys_execve(p, &ap, retval)); } diff --git a/sys/compat/ibcs2/ibcs2_misc.c b/sys/compat/ibcs2/ibcs2_misc.c index d24bd0df34a..59bcee1414b 100644 --- a/sys/compat/ibcs2/ibcs2_misc.c +++ b/sys/compat/ibcs2/ibcs2_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ibcs2_misc.c,v 1.8 1997/01/23 16:12:18 niklas Exp $ */ +/* $OpenBSD: ibcs2_misc.c,v 1.9 1997/06/17 11:11:09 deraadt Exp $ */ /* $NetBSD: ibcs2_misc.c,v 1.23 1997/01/15 01:37:49 perry Exp $ */ /* @@ -200,14 +200,17 @@ ibcs2_sys_execv(p, v, retval) syscallarg(char *) path; syscallarg(char **) argp; } */ *uap = v; - struct sys_execve_args ea; - caddr_t sg = stackgap_init(p->p_emul); + struct sys_execve_args ap; + caddr_t sg; + sg = stackgap_init(p->p_emul); IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - SCARG(&ea, path) = SCARG(uap, path); - SCARG(&ea, argp) = SCARG(uap, argp); - SCARG(&ea, envp) = NULL; - return sys_execve(p, &ea, retval); + + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = NULL; + + return sys_execve(p, &ap, retval); } int @@ -216,15 +219,22 @@ ibcs2_sys_execve(p, v, retval) void *v; register_t *retval; { - struct sys_execve_args /* { + struct ibcs2_sys_execve_args /* { syscallarg(char *) path; - syscallarg(char **) argp; + syscallarg(char **) argv; syscallarg(char **) envp; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; - IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_execve(p, uap, retval); + sg = stackgap_init(p->p_emul); + IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); + + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return sys_execve(p, &ap, retval); } int diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c index 37c868c889b..1f05664cb2b 100644 --- a/sys/compat/linux/linux_exec.c +++ b/sys/compat/linux/linux_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_exec.c,v 1.4 1996/12/23 02:56:49 deraadt Exp $ */ +/* $OpenBSD: linux_exec.c,v 1.5 1997/06/17 11:11:10 deraadt Exp $ */ /* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /* @@ -491,7 +491,7 @@ linux_sys_uselib(p, v, retval) /* * Execve(2). Just check the alternate emulation path, and pass it on - * to the NetBSD execve(). + * to the regular execve(). */ int linux_sys_execve(p, v, retval) @@ -503,11 +503,16 @@ linux_sys_execve(p, v, retval) syscallarg(char *) path; syscallarg(char **) argv; syscallarg(char **) envp; - } */ *uap = v; + } */ *uap = v; + struct sys_execve_args ap; caddr_t sg; sg = stackgap_init(p->p_emul); LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_execve(p, uap, retval); + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return sys_execve(p, &ap, retval); } diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index a05365a238c..5f509ad15b4 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos_misc.c,v 1.9 1997/01/15 23:00:00 kstailey Exp $ */ +/* $OpenBSD: sunos_misc.c,v 1.10 1997/06/17 11:11:11 deraadt Exp $ */ /* $NetBSD: sunos_misc.c,v 1.65 1996/04/22 01:44:31 christos Exp $ */ /* @@ -182,12 +182,22 @@ sunos_sys_execve(p, v, retval) void *v; register_t *retval; { - struct sunos_sys_execve_args *uap = v; - - caddr_t sg = stackgap_init(p->p_emul); + struct sunos_sys_execve_args /* { + syscallarg(char *) path; + syscallarg(char **) argv; + syscallarg(char **) envp; + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; + + sg = stackgap_init(p->p_emul); SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return (sys_execve(p, (struct sys_execve_args *)&uap, retval)); + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return (sys_execve(p, &ap, retval)); } int diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 26ed549f208..74b2a86659b 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: svr4_misc.c,v 1.9 1997/03/28 22:03:46 kstailey Exp $ */ +/* $OpenBSD: svr4_misc.c,v 1.10 1997/06/17 11:11:12 deraadt Exp $ */ /* $NetBSD: svr4_misc.c,v 1.42 1996/12/06 03:22:34 christos Exp $ */ /* @@ -143,8 +143,9 @@ svr4_sys_execv(p, v, retval) syscallarg(char **) argv; } */ *uap = v; struct sys_execve_args ap; - caddr_t sg = stackgap_init(p->p_emul); + caddr_t sg; + sg = stackgap_init(p->p_emul); SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); SCARG(&ap, path) = SCARG(uap, path); @@ -161,16 +162,22 @@ svr4_sys_execve(p, v, retval) void *v; register_t *retval; { - struct sys_execve_args /* { + struct svr4_sys_execve_args /* { syscallarg(char *) path; syscallarg(char **) argv; syscallarg(char **) envp; - } */ *uap = v; - caddr_t sg = stackgap_init(p->p_emul); + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; + sg = stackgap_init(p->p_emul); SVR4_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return sys_execve(p, uap, retval); + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return sys_execve(p, &ap, retval); } diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c index f32778caa8b..b79f6300c7e 100644 --- a/sys/compat/ultrix/ultrix_misc.c +++ b/sys/compat/ultrix/ultrix_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ultrix_misc.c,v 1.11 1997/04/12 19:58:02 graichen Exp $ */ +/* $OpenBSD: ultrix_misc.c,v 1.12 1997/06/17 11:11:13 deraadt Exp $ */ /* $NetBSD: ultrix_misc.c,v 1.23 1996/04/07 17:23:04 jonathan Exp $ */ /* @@ -591,10 +591,20 @@ ultrix_sys_execve(p, v, retval) void *v; register_t *retval; { - struct ultrix_sys_execve_args *uap = v; - - caddr_t sg = stackgap_init(p->p_emul); + struct ultrix_sys_execve_args /* { + syscallarg(char *) path; + syscallarg(char **) argv; + syscallarg(char **) envp; + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; + + sg = stackgap_init(p->p_emul); ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return (sys_execve(p, (struct sys_execve_args *)&uap, retval)); + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return (sys_execve(p, &ap, retval)); } |