summaryrefslogtreecommitdiffstats
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2005-01-29 23:12:00 +0000
committersobomax <sobomax@FreeBSD.org>2005-01-29 23:12:00 +0000
commitf489acaf0f5bae70444702cdcc02ab81d3b6b51a (patch)
treec697d47092272c8c6973b42ba0a424e9763f7ce5 /sys/compat/svr4
parent1c7b5012657233c6ea65df68e8223e60b6f822a0 (diff)
downloadFreeBSD-src-f489acaf0f5bae70444702cdcc02ab81d3b6b51a.zip
FreeBSD-src-f489acaf0f5bae70444702cdcc02ab81d3b6b51a.tar.gz
o Split out kernel part of execve(2) syscall into two parts: one that
copies arguments into the kernel space and one that operates completely in the kernel space; o use kernel-only version of execve(2) to kill another stackgap in linuxlator/i386. Obtained from: DragonFlyBSD (partially) MFC after: 2 weeks
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/imgact_svr4.c5
-rw-r--r--sys/compat/svr4/svr4_sysvec.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/sys/compat/svr4/imgact_svr4.c b/sys/compat/svr4/imgact_svr4.c
index 90d3b38..39eeb99 100644
--- a/sys/compat/svr4/imgact_svr4.c
+++ b/sys/compat/svr4/imgact_svr4.c
@@ -117,11 +117,6 @@ exec_svr4_imgact(imgp)
VOP_UNLOCK(imgp->vp, 0, td);
- /* copy in arguments and/or environment from old process */
- error = exec_extract_strings(imgp);
- if (error)
- goto fail;
-
/*
* Destroy old process VM and create a new one (with a new stack)
*/
diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c
index 496901a..80e54b0 100644
--- a/sys/compat/svr4/svr4_sysvec.c
+++ b/sys/compat/svr4/svr4_sysvec.c
@@ -215,7 +215,7 @@ svr4_fixup(register_t **stack_base, struct image_params *imgp)
(curthread->td_proc->p_flag & P_SA) == 0,
("unsafe svr4_fixup(), should be curproc"));
args = (Elf32_Auxargs *)imgp->auxargs;
- pos = *stack_base + (imgp->argc + imgp->envc + 2);
+ pos = *stack_base + (imgp->args->argc + imgp->args->envc + 2);
if (args->trace)
AUXARGS_ENTRY(pos, AT_DEBUG, 1);
@@ -238,7 +238,7 @@ svr4_fixup(register_t **stack_base, struct image_params *imgp)
imgp->auxargs = NULL;
(*stack_base)--;
- **stack_base = (register_t)imgp->argc;
+ **stack_base = (register_t)imgp->args->argc;
return 0;
}
OpenPOWER on IntegriCloud