Implement sunos_sys_execve(). The previous code simply called

sys_execve() without doing an alternate patch check, which was
incorrect.  Bug pointed out by Krister Walfridsson <cato@df.lth.se>
on port-sparc@NetBSD.ORG.
This commit is contained in:
thorpej 1996-08-26 22:49:43 +00:00
parent a107442de9
commit b0f977ee6b
2 changed files with 22 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sunos_misc.c,v 1.68 1996/08/11 03:16:26 mrg Exp $ */
/* $NetBSD: sunos_misc.c,v 1.69 1996/08/26 22:49:43 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@ -191,6 +191,25 @@ sunos_sys_execv(p, v, retval)
return (sys_execve(p, &ouap, retval));
}
int
sunos_sys_execve(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct sunos_sys_execve_args *uap = v;
struct sys_execve_args ouap;
caddr_t sg = stackgap_init(p->p_emul);
SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
SCARG(&ouap, path) = SCARG(uap, path);
SCARG(&ouap, argp) = SCARG(uap, argp);
SCARG(&ouap, envp) = SCARG(uap, envp);
return (sys_execve(p, &ouap, retval));
}
int
sunos_sys_omsync(p, v, retval)
struct proc *p;

View File

@ -1,4 +1,4 @@
$NetBSD: syscalls.master,v 1.34 1996/06/23 11:15:37 mycroft Exp $
$NetBSD: syscalls.master,v 1.35 1996/08/26 22:49:48 thorpej Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@ -103,7 +103,7 @@
56 OBSOL sunos_owait3
57 NOARGS { int sys_symlink(char *path, char *link); }
58 NOARGS { int sys_readlink(char *path, char *buf, int count); }
59 NOARGS { int sys_execve(char *path, char **argp, \
59 STD { int sunos_sys_execve(char *path, char **argp, \
char **envp); }
60 NOARGS { int sys_umask(int newmask); }
61 NOARGS { int sys_chroot(char *path); }