Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/linux32/linux32_machdep.c
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | linux_copyout_rusage(struct rusage *ru, void *uaddr) | ||||
return (copyout(&lru, uaddr, sizeof(struct l_rusage))); | return (copyout(&lru, uaddr, sizeof(struct l_rusage))); | ||||
} | } | ||||
int | int | ||||
linux_execve(struct thread *td, struct linux_execve_args *args) | linux_execve(struct thread *td, struct linux_execve_args *args) | ||||
{ | { | ||||
struct image_args eargs; | struct image_args eargs; | ||||
char *path; | |||||
int error; | int error; | ||||
if (!LUSECONVPATH(td)) { | |||||
error = freebsd32_exec_copyin_args(&eargs, args->path, UIO_USERSPACE, | error = freebsd32_exec_copyin_args(&eargs, args->path, UIO_USERSPACE, | ||||
args->argp, args->envp); | args->argp, args->envp); | ||||
} else { | |||||
LCONVPATHEXIST(args->path, &path); | |||||
error = freebsd32_exec_copyin_args(&eargs, path, UIO_SYSSPACE, | |||||
args->argp, args->envp); | |||||
LFREEPATH(path); | |||||
} | |||||
if (error == 0) | if (error == 0) | ||||
error = linux_common_execve(td, &eargs); | error = linux_common_execve(td, &eargs); | ||||
AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); | AUDIT_SYSCALL_EXIT(error == EJUSTRETURN ? 0 : error, td); | ||||
return (error); | return (error); | ||||
} | } | ||||
CTASSERT(sizeof(struct l_iovec32) == 8); | CTASSERT(sizeof(struct l_iovec32) == 8); | ||||
▲ Show 20 Lines • Show All 604 Lines • Show Last 20 Lines |