diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1998-03-29 07:59:10 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1998-03-29 07:59:10 +0000 |
| commit | 1e8dabab3f20c1edf0b2b320ee0f140f8cd786b5 (patch) | |
| tree | 8114fecc253be645028155a3a369208061bd0bf4 | |
| parent | 94316d1ddb387c49696baf0b3d9e34af377cf291 (diff) | |
Notes
| -rw-r--r-- | sys/alpha/linux/syscalls.master | 7 | ||||
| -rw-r--r-- | sys/compat/linux/linux_file.c | 23 | ||||
| -rw-r--r-- | sys/i386/linux/linux_file.c | 23 | ||||
| -rw-r--r-- | sys/i386/linux/syscalls.master | 7 |
4 files changed, 50 insertions, 10 deletions
diff --git a/sys/alpha/linux/syscalls.master b/sys/alpha/linux/syscalls.master index 2db053da188f..e25f1fa03be0 100644 --- a/sys/alpha/linux/syscalls.master +++ b/sys/alpha/linux/syscalls.master @@ -1,4 +1,4 @@ - $Id: syscalls.master,v 1.8 1998/03/29 06:35:22 peter Exp $ + $Id: syscalls.master,v 1.9 1998/03/29 07:53:19 peter Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -47,8 +47,7 @@ 13 STD LINUX { int linux_time(linux_time_t *tm); } 14 STD LINUX { int linux_mknod(char *path, int mode, int dev); } 15 STD LINUX { int linux_chmod(char *path, int mode); } -; XXX linux_chown is really meant to be linux_lchown -16 STD LINUX { int linux_chown(char *path, int uid, int gid); } +16 STD LINUX { int linux_lchown(char *path, int uid, int gid); } 17 STD LINUX { int linux_break(char *nsize); } 18 STD LINUX { int linux_stat(char *path, struct ostat *up); } 19 STD LINUX { int linux_lseek(int fdes, long off, int whence); } @@ -253,4 +252,4 @@ 179 UNIMPL LINUX rt_sigsuspend 180 UNIMPL LINUX pread 181 UNIMPL LINUX pwrite -182 UNIMPL LINUX chown +182 STD LINUX { int linux_chown(char *path, int uid, int gid); } diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index f792a3726bc5..32d7cbeba0b6 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_file.c,v 1.18 1998/01/05 01:05:15 jmb Exp $ + * $Id: linux_file.c,v 1.19 1998/01/05 01:17:42 jmb Exp $ */ #include "opt_compat.h" @@ -669,6 +669,27 @@ linux_chown(struct proc *p, struct linux_chown_args *args) } int +linux_lchown(struct proc *p, struct linux_lchown_args *args) +{ + struct lchown_args bsd; + caddr_t sg; + + sg = stackgap_init(); + CHECKALTEXIST(p, &sg, args->path); + +#ifdef DEBUG + printf("Linux-emul(%d): lchown(%s, %d, %d)\n", + p->p_pid, args->path, args->uid, args->gid); +#endif + bsd.path = args->path; + /* XXX size casts here */ + bsd.uid = args->uid; + bsd.gid = args->gid; + + return lchown(p, &bsd); +} + +int linux_mkdir(struct proc *p, struct linux_mkdir_args *args) { struct mkdir_args bsd; diff --git a/sys/i386/linux/linux_file.c b/sys/i386/linux/linux_file.c index f792a3726bc5..32d7cbeba0b6 100644 --- a/sys/i386/linux/linux_file.c +++ b/sys/i386/linux/linux_file.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_file.c,v 1.18 1998/01/05 01:05:15 jmb Exp $ + * $Id: linux_file.c,v 1.19 1998/01/05 01:17:42 jmb Exp $ */ #include "opt_compat.h" @@ -669,6 +669,27 @@ linux_chown(struct proc *p, struct linux_chown_args *args) } int +linux_lchown(struct proc *p, struct linux_lchown_args *args) +{ + struct lchown_args bsd; + caddr_t sg; + + sg = stackgap_init(); + CHECKALTEXIST(p, &sg, args->path); + +#ifdef DEBUG + printf("Linux-emul(%d): lchown(%s, %d, %d)\n", + p->p_pid, args->path, args->uid, args->gid); +#endif + bsd.path = args->path; + /* XXX size casts here */ + bsd.uid = args->uid; + bsd.gid = args->gid; + + return lchown(p, &bsd); +} + +int linux_mkdir(struct proc *p, struct linux_mkdir_args *args) { struct mkdir_args bsd; diff --git a/sys/i386/linux/syscalls.master b/sys/i386/linux/syscalls.master index 2db053da188f..e25f1fa03be0 100644 --- a/sys/i386/linux/syscalls.master +++ b/sys/i386/linux/syscalls.master @@ -1,4 +1,4 @@ - $Id: syscalls.master,v 1.8 1998/03/29 06:35:22 peter Exp $ + $Id: syscalls.master,v 1.9 1998/03/29 07:53:19 peter Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -47,8 +47,7 @@ 13 STD LINUX { int linux_time(linux_time_t *tm); } 14 STD LINUX { int linux_mknod(char *path, int mode, int dev); } 15 STD LINUX { int linux_chmod(char *path, int mode); } -; XXX linux_chown is really meant to be linux_lchown -16 STD LINUX { int linux_chown(char *path, int uid, int gid); } +16 STD LINUX { int linux_lchown(char *path, int uid, int gid); } 17 STD LINUX { int linux_break(char *nsize); } 18 STD LINUX { int linux_stat(char *path, struct ostat *up); } 19 STD LINUX { int linux_lseek(int fdes, long off, int whence); } @@ -253,4 +252,4 @@ 179 UNIMPL LINUX rt_sigsuspend 180 UNIMPL LINUX pread 181 UNIMPL LINUX pwrite -182 UNIMPL LINUX chown +182 STD LINUX { int linux_chown(char *path, int uid, int gid); } |
