示例#1
0
int
linux_execve(struct thread *td, struct linux_execve_args *args)
{
    struct image_args eargs;
    char *path;
    int error;

    LCONVPATHEXIST(td, args->path, &path);

    LINUX_CTR(execve);

    error = exec_copyin_args(&eargs, path, UIO_SYSSPACE, args->argp,
                             args->envp);
    free(path, M_TEMP);
    if (error == 0)
        error = linux_common_execve(td, &eargs);
    return (error);
}
示例#2
0
int
linux_execve(struct thread *td, struct linux_execve_args *args)
{
	struct image_args eargs;
	char *newpath;
	int error;

	LCONVPATHEXIST(td, args->path, &newpath);

#ifdef DEBUG
	if (ldebug(execve))
		printf(ARGS(execve, "%s"), newpath);
#endif

	error = exec_copyin_args(&eargs, newpath, UIO_SYSSPACE,
	    args->argp, args->envp);
	free(newpath, M_TEMP);
	if (error == 0)
		error = linux_common_execve(td, &eargs);
	return (error);
}