Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/netbsd32 fix fexecve



details:   https://anonhg.NetBSD.org/src/rev/66eb7f6d2448
branches:  trunk
changeset: 965417:66eb7f6d2448
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Sep 15 20:26:51 2019 +0000

description:
fix fexecve

diffstat:

 sys/compat/netbsd32/netbsd32_execve.c |  15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diffs (45 lines):

diff -r dfede25e35bd -r 66eb7f6d2448 sys/compat/netbsd32/netbsd32_execve.c
--- a/sys/compat/netbsd32/netbsd32_execve.c     Sun Sep 15 20:26:27 2019 +0000
+++ b/sys/compat/netbsd32/netbsd32_execve.c     Sun Sep 15 20:26:51 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_execve.c,v 1.39 2018/09/03 16:29:29 riastradh Exp $   */
+/*     $NetBSD: netbsd32_execve.c,v 1.40 2019/09/15 20:26:51 christos Exp $    */
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.39 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_execve.c,v 1.40 2019/09/15 20:26:51 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -71,9 +71,8 @@
                syscallarg(netbsd32_charpp) argp;
                syscallarg(netbsd32_charpp) envp;
        } */
-       const char *path = SCARG_P32(uap, path);
 
-       return execve1(l, path, SCARG_P32(uap, argp),
+       return execve1(l, SCARG_P32(uap, path), -1, SCARG_P32(uap, argp),
            SCARG_P32(uap, envp), netbsd32_execve_fetch_element);
 }
 
@@ -86,13 +85,9 @@
                syscallarg(netbsd32_charpp) argp;
                syscallarg(netbsd32_charpp) envp;
        } */
-       struct sys_fexecve_args ua;
 
-       NETBSD32TO64_UAP(fd);
-       NETBSD32TOP_UAP(argp, char * const);
-       NETBSD32TOP_UAP(envp, char * const);
-
-       return sys_fexecve(l, &ua, retval);
+       return execve1(l, NULL, SCARG(uap, fd), SCARG_P32(uap, argp),
+           SCARG_P32(uap, envp), netbsd32_execve_fetch_element);
 }
 
 static int



Home | Main Index | Thread Index | Old Index