const poisoning and CHECK_ALT_CREAT fixes.
This commit is contained in:
parent
49692434d8
commit
a30a9f3d94
@ -1,4 +1,4 @@
|
||||
$NetBSD: syscalls.master,v 1.29 1998/12/18 18:49:59 drochner Exp $
|
||||
$NetBSD: syscalls.master,v 1.30 1999/02/09 20:30:38 christos Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
@ -47,17 +47,18 @@
|
||||
2 NOARGS { int sys_fork(void); }
|
||||
3 NOARGS { int sys_read(int fd, char *buf, u_int nbyte); }
|
||||
4 NOARGS { int sys_write(int fd, char *buf, u_int nbyte); }
|
||||
5 STD { int ultrix_sys_open(char *path, int flags, \
|
||||
5 STD { int ultrix_sys_open(const char *path, int flags, \
|
||||
int mode); }
|
||||
6 NOARGS { int sys_close(int fd); }
|
||||
7 NOARGS { int compat_43_sys_wait(void); } owait
|
||||
8 STD { int ultrix_sys_creat(char *path, int mode); }
|
||||
8 STD { int ultrix_sys_creat(const char *path, int mode); }
|
||||
9 NOARGS { int sys_link(char *path, char *link); }
|
||||
10 NOARGS { int sys_unlink(char *path); }
|
||||
11 STD { int ultrix_sys_execv(char *path, char **argp); }
|
||||
11 STD { int ultrix_sys_execv(const char *path, char **argp); }
|
||||
12 NOARGS { int sys_chdir(char *path); }
|
||||
13 OBSOL time
|
||||
14 STD { int ultrix_sys_mknod(char *path, int mode, int dev); }
|
||||
14 STD { int ultrix_sys_mknod(const char *path, int mode, \
|
||||
int dev); }
|
||||
15 NOARGS { int sys_chmod(char *path, int mode); }
|
||||
16 NOARGS { int sys___posix_chown(char *path, int uid, int gid); }
|
||||
17 NOARGS { int sys_obreak(char *nsize); } break
|
||||
@ -78,15 +79,15 @@
|
||||
30 OBSOL v7 utime
|
||||
31 OBSOL v7 stty
|
||||
32 OBSOL v7 gtty
|
||||
33 STD { int ultrix_sys_access(char *path, int flags); }
|
||||
33 STD { int ultrix_sys_access(const char *path, int flags); }
|
||||
34 OBSOL v7 nice
|
||||
35 OBSOL v7 ftime
|
||||
36 NOARGS { int sys_sync(void); }
|
||||
37 NOARGS { int sys_kill(int pid, int signum); }
|
||||
38 STD { int ultrix_sys_stat(char *path, \
|
||||
38 STD { int ultrix_sys_stat(const char *path, \
|
||||
struct stat43 *ub); } stat43
|
||||
39 OBSOL v7 setpgrp
|
||||
40 STD { int ultrix_sys_lstat(char *path, \
|
||||
40 STD { int ultrix_sys_lstat(const char *path, \
|
||||
struct stat43 *ub); } lstat43
|
||||
41 NOARGS { int sys_dup(u_int fd); }
|
||||
42 NOARGS { int sys_pipe(void); }
|
||||
@ -107,7 +108,7 @@
|
||||
56 UNIMPL v7 mpxchan
|
||||
57 NOARGS { int sys_symlink(char *path, char *link); }
|
||||
58 NOARGS { int sys_readlink(char *path, char *buf, int count); }
|
||||
59 STD { int ultrix_sys_execve(char *path, char **argp, \
|
||||
59 STD { int ultrix_sys_execve(const char *path, char **argp, \
|
||||
char **envp); }
|
||||
60 NOARGS { int sys_umask(int newmask); }
|
||||
61 NOARGS { int sys_chroot(char *path); }
|
||||
@ -252,7 +253,7 @@
|
||||
#endif
|
||||
159 NOARGS { int compat_43_sys_getdirentries(int fd, char *buf, \
|
||||
u_int count, long *basep); }
|
||||
160 STD { int ultrix_sys_statfs(char *path, \
|
||||
160 STD { int ultrix_sys_statfs(const char *path, \
|
||||
struct ultrix_statfs *buf); }
|
||||
161 STD { int ultrix_sys_fstatfs(int fd, \
|
||||
struct ultrix_statfs *buf); }
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ultrix_pathname.c,v 1.7 1998/08/09 20:37:57 perry Exp $ */
|
||||
/* $NetBSD: ultrix_pathname.c,v 1.8 1999/02/09 20:30:38 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -90,7 +90,7 @@ ultrix_sys_creat(p, v, retval)
|
||||
struct sys_open_args ap;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
ULTRIX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
|
||||
@ -146,7 +146,7 @@ ultrix_sys_execv(p, v, retval)
|
||||
register_t *retval;
|
||||
{
|
||||
struct ultrix_sys_execv_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(char **) argv;
|
||||
} */ *uap = v;
|
||||
struct sys_execve_args ap;
|
||||
@ -169,7 +169,7 @@ ultrix_sys_execve(p, v, retval)
|
||||
register_t *retval;
|
||||
{
|
||||
struct ultrix_sys_execve_args /* {
|
||||
syscallarg(char *) path;
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(char **) argv;
|
||||
syscallarg(char **) envp;
|
||||
} */ *uap = v;
|
||||
@ -198,7 +198,6 @@ ultrix_sys_open(p, v, retval)
|
||||
int ret;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
|
||||
/* convert open flags into NetBSD flags */
|
||||
l = SCARG(uap, flags);
|
||||
@ -209,6 +208,10 @@ ultrix_sys_open(p, v, retval)
|
||||
r |= ((l & 0x0100) ? O_EXLOCK : 0);
|
||||
r |= ((l & 0x2000) ? O_FSYNC : 0);
|
||||
|
||||
if (r & O_CREAT)
|
||||
ULTRIX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
else
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(uap, flags) = r;
|
||||
ret = sys_open(p, (struct sys_open_args *)uap, retval);
|
||||
|
||||
@ -326,7 +329,7 @@ ultrix_sys_mknod(p, v, retval)
|
||||
struct ultrix_sys_mknod_args *uap = v;
|
||||
|
||||
caddr_t sg = stackgap_init(p->p_emul);
|
||||
ULTRIX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
ULTRIX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
||||
if (S_ISFIFO(SCARG(uap, mode)))
|
||||
return sys_mkfifo(p, uap, retval);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ultrix_util.h,v 1.4 1998/09/05 14:50:27 christos Exp $ */
|
||||
/* $NetBSD: ultrix_util.h,v 1.5 1999/02/09 20:30:38 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -73,4 +73,7 @@ extern const char ultrix_emul_path[];
|
||||
#define ULTRIX_CHECK_ALT_EXIST(p, sgp, path) \
|
||||
CHECK_ALT_EXIST(p, sgp, ultrix_emul_path, path)
|
||||
|
||||
#define ULTRIX_CHECK_ALT_CREAT(p, sgp, path) \
|
||||
CHECK_ALT_CREAT(p, sgp, ultrix_emul_path, path)
|
||||
|
||||
#endif /* !_ULTRIX_UTIL_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user