Add seperate entries for 16 bit uid/gid calls, so that border cases

like 0xffff can be handled better (not done yet).
This commit is contained in:
fvdl 2000-12-18 14:40:02 +00:00
parent 0bda0568cf
commit 4d193ccde8
2 changed files with 68 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_file.c,v 1.30 2000/12/01 12:28:33 jdolecek Exp $ */
/* $NetBSD: linux_file.c,v 1.31 2000/12/18 14:40:02 fvdl Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -643,12 +643,12 @@ linux_sys_chmod(p, v, retval)
}
int
linux_sys_chown(p, v, retval)
linux_sys_chown16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct linux_sys_chown_args /* {
struct linux_sys_chown16_args /* {
syscallarg(const char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
@ -668,12 +668,12 @@ linux_sys_chown(p, v, retval)
}
int
linux_sys_fchown(p, v, retval)
linux_sys_fchown16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct linux_sys_fchown_args /* {
struct linux_sys_fchown16_args /* {
syscallarg(int) fd;
syscallarg(int) uid;
syscallarg(int) gid;
@ -690,12 +690,12 @@ linux_sys_fchown(p, v, retval)
}
int
linux_sys_lchown(p, v, retval)
linux_sys_lchown16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct linux_sys_lchown_args /* {
struct linux_sys_lchown16_args /* {
syscallarg(char *) path;
syscallarg(int) uid;
syscallarg(int) gid;

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_misc.c,v 1.77 2000/12/13 21:41:23 augustss Exp $ */
/* $NetBSD: linux_misc.c,v 1.78 2000/12/18 14:40:03 fvdl Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@ -871,12 +871,12 @@ linux_sys_personality(p, v, retval)
* The calls are here because of type conversions.
*/
int
linux_sys_setreuid(p, v, retval)
linux_sys_setreuid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct linux_sys_setreuid_args /* {
struct linux_sys_setreuid16_args /* {
syscallarg(int) ruid;
syscallarg(int) euid;
} */ *uap = v;
@ -891,12 +891,12 @@ linux_sys_setreuid(p, v, retval)
}
int
linux_sys_setregid(p, v, retval)
linux_sys_setregid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
struct linux_sys_setregid_args /* {
struct linux_sys_setregid16_args /* {
syscallarg(int) rgid;
syscallarg(int) egid;
} */ *uap = v;
@ -1071,6 +1071,62 @@ linux_sys_getresuid(p, v, retval)
return (copyout(&pc->p_svuid, SCARG(uap, suid), sizeof(uid_t)));
}
/*
* XXX fix these for 0xffff == -1 for old Linux uids return case.
*/
int
linux_sys_setuid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
return sys_setuid(p, v, retval);
}
int
linux_sys_getuid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
return sys_getuid(p, v, retval);
}
int
linux_sys_setgid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
return sys_setgid(p, v, retval);
}
int
linux_sys_getgid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
return sys_getgid(p, v, retval);
}
int
linux_sys_geteuid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
return sys_geteuid(p, v, retval);
}
int
linux_sys_getegid16(p, v, retval)
struct proc *p;
void *v;
register_t *retval;
{
return sys_getegid(p, v, retval);
}
int
linux_sys_ptrace(p, v, retval)
struct proc *p;