mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
bsd-user: Simplify the implementation of execve
This removes the logic which prepends the emulator to each call to execve and fexecve. This is not necessary with the existing imgact_binmisc support and it avoids the need to install the emulator binary into jail environments when using 'binmiscctl --pre-open'. Signed-off-by: Doug Rabson <dfr@rabson.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Warner Losh <imp@bsdimp.com> Acked-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
ce6c541dcb
commit
e6e102b972
2 changed files with 3 additions and 133 deletions
|
@ -90,7 +90,6 @@ unsigned long reserved_va;
|
|||
|
||||
const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
|
||||
const char *qemu_uname_release;
|
||||
char qemu_proc_pathname[PATH_MAX]; /* full path to exeutable */
|
||||
|
||||
unsigned long target_maxtsiz = TARGET_MAXTSIZ; /* max text size */
|
||||
unsigned long target_dfldsiz = TARGET_DFLDSIZ; /* initial data size limit */
|
||||
|
@ -247,22 +246,6 @@ adjust_ssize(void)
|
|||
setrlimit(RLIMIT_STACK, &rl);
|
||||
}
|
||||
|
||||
static void save_proc_pathname(char *argv0)
|
||||
{
|
||||
int mib[4];
|
||||
size_t len;
|
||||
|
||||
mib[0] = CTL_KERN;
|
||||
mib[1] = KERN_PROC;
|
||||
mib[2] = KERN_PROC_PATHNAME;
|
||||
mib[3] = -1;
|
||||
|
||||
len = sizeof(qemu_proc_pathname);
|
||||
if (sysctl(mib, 4, qemu_proc_pathname, &len, NULL, 0)) {
|
||||
perror("sysctl");
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const char *filename;
|
||||
|
@ -292,7 +275,6 @@ int main(int argc, char **argv)
|
|||
usage();
|
||||
}
|
||||
|
||||
save_proc_pathname(argv[0]);
|
||||
|
||||
error_init(argv[0]);
|
||||
module_call_init(MODULE_INIT_TRACE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue