Fix linux32_sys_setres{uid|gid}: -1 does not means the same thing on i386
and amd64...
This commit is contained in:
parent
e099b5edda
commit
84b03d19fe
|
@ -1,10 +1,10 @@
|
|||
/* $NetBSD: linux32_syscall.h,v 1.7 2006/09/05 08:17:09 manu Exp $ */
|
||||
/* $NetBSD: linux32_syscall.h,v 1.8 2006/09/06 08:32:00 manu Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.3 2006/06/25 16:15:39 manu Exp
|
||||
* created from NetBSD: syscalls.master,v 1.4 2006/09/05 08:17:09 manu Exp
|
||||
*/
|
||||
|
||||
#ifndef _LINUX32_SYS_SYSCALL_H_
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* $NetBSD: linux32_syscallargs.h,v 1.7 2006/09/05 08:17:09 manu Exp $ */
|
||||
/* $NetBSD: linux32_syscallargs.h,v 1.8 2006/09/06 08:32:00 manu Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.3 2006/06/25 16:15:39 manu Exp
|
||||
* created from NetBSD: syscalls.master,v 1.4 2006/09/05 08:17:09 manu Exp
|
||||
*/
|
||||
|
||||
#ifndef _LINUX32_SYS_SYSCALLARGS_H_
|
||||
|
@ -350,6 +350,18 @@ struct linux32_sys_fstat64_args {
|
|||
syscallarg(linux32_stat64p) sp;
|
||||
};
|
||||
|
||||
struct linux32_sys_setresuid_args {
|
||||
syscallarg(uid_t) ruid;
|
||||
syscallarg(uid_t) euid;
|
||||
syscallarg(uid_t) suid;
|
||||
};
|
||||
|
||||
struct linux32_sys_setresgid_args {
|
||||
syscallarg(gid_t) rgid;
|
||||
syscallarg(gid_t) egid;
|
||||
syscallarg(gid_t) sgid;
|
||||
};
|
||||
|
||||
struct linux32_sys_getdents64_args {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(linux32_dirent64p_t) dent;
|
||||
|
@ -602,9 +614,9 @@ int netbsd32_setgroups(struct lwp *, void *, register_t *);
|
|||
|
||||
int sys___posix_fchown(struct lwp *, void *, register_t *);
|
||||
|
||||
int linux_sys_setresuid(struct lwp *, void *, register_t *);
|
||||
int linux32_sys_setresuid(struct lwp *, void *, register_t *);
|
||||
|
||||
int linux_sys_setresgid(struct lwp *, void *, register_t *);
|
||||
int linux32_sys_setresgid(struct lwp *, void *, register_t *);
|
||||
|
||||
int linux32_sys_getdents64(struct lwp *, void *, register_t *);
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/* $NetBSD: linux32_syscalls.c,v 1.7 2006/09/05 08:17:09 manu Exp $ */
|
||||
/* $NetBSD: linux32_syscalls.c,v 1.8 2006/09/06 08:32:00 manu Exp $ */
|
||||
|
||||
/*
|
||||
* System call names.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.3 2006/06/25 16:15:39 manu Exp
|
||||
* created from NetBSD: syscalls.master,v 1.4 2006/09/05 08:17:09 manu Exp
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.7 2006/09/05 08:17:09 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.8 2006/09/06 08:32:00 manu Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#if defined(_KERNEL_OPT)
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
/* $NetBSD: linux32_sysent.c,v 1.7 2006/09/05 08:17:09 manu Exp $ */
|
||||
/* $NetBSD: linux32_sysent.c,v 1.8 2006/09/06 08:32:00 manu Exp $ */
|
||||
|
||||
/*
|
||||
* System call switch table.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.3 2006/06/25 16:15:39 manu Exp
|
||||
* created from NetBSD: syscalls.master,v 1.4 2006/09/05 08:17:09 manu Exp
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.7 2006/09/05 08:17:09 manu Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.8 2006/09/06 08:32:00 manu Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_43.h"
|
||||
|
@ -453,12 +453,12 @@ struct sysent linux32_sysent[] = {
|
|||
netbsd32_setgroups }, /* 206 = netbsd32_setgroups */
|
||||
{ 3, s(struct sys___posix_fchown_args), 0,
|
||||
sys___posix_fchown }, /* 207 = __posix_fchown */
|
||||
{ 3, s(struct linux_sys_setresuid_args), 0,
|
||||
linux_sys_setresuid }, /* 208 = setresuid */
|
||||
{ 3, s(struct linux32_sys_setresuid_args), 0,
|
||||
linux32_sys_setresuid }, /* 208 = setresuid */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 209 = unimplemented getresuid */
|
||||
{ 3, s(struct linux_sys_setresgid_args), 0,
|
||||
linux_sys_setresgid }, /* 210 = setresgid */
|
||||
{ 3, s(struct linux32_sys_setresgid_args), 0,
|
||||
linux32_sys_setresgid }, /* 210 = setresgid */
|
||||
{ 0, 0, 0,
|
||||
linux_sys_nosys }, /* 211 = unimplemented getresgid */
|
||||
{ 0, 0, 0,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.4 2006/09/05 08:17:09 manu Exp $
|
||||
$NetBSD: syscalls.master,v 1.5 2006/09/06 08:32:00 manu Exp $
|
||||
|
||||
; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file.
|
||||
; (See syscalls.conf to see what it is processed into.)
|
||||
|
@ -332,10 +332,10 @@
|
|||
206 NOARGS { int netbsd32_setgroups(int gidsetsize, \
|
||||
netbsd32_gid_tp gidset); }
|
||||
207 NOARGS { int sys___posix_fchown(int fd, uid_t uid, gid_t gid); }
|
||||
208 NOARGS { int linux_sys_setresuid(uid_t ruid, uid_t euid, \
|
||||
208 STD { int linux32_sys_setresuid(uid_t ruid, uid_t euid, \
|
||||
uid_t suid); }
|
||||
209 UNIMPL getresuid
|
||||
210 NOARGS { int linux_sys_setresgid(gid_t rgid, gid_t egid, \
|
||||
210 STD { int linux32_sys_setresgid(gid_t rgid, gid_t egid, \
|
||||
gid_t sgid); }
|
||||
211 UNIMPL getresgid
|
||||
212 UNIMPL chown
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_unistd.c,v 1.2 2006/06/13 16:23:57 skd Exp $ */
|
||||
/* $NetBSD: linux32_unistd.c,v 1.3 2006/09/06 08:32:00 manu Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.2 2006/06/13 16:23:57 skd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.3 2006/09/06 08:32:00 manu Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -698,3 +698,43 @@ linux32_sys_fchown16(l, v, retval)
|
|||
|
||||
return sys___posix_fchown(l, &ua, retval);
|
||||
}
|
||||
|
||||
int
|
||||
linux32_sys_setresuid(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct linux32_sys_setresuid_args /* {
|
||||
syscallarg(uid_t) ruid;
|
||||
syscallarg(uid_t) euid;
|
||||
syscallarg(uid_t) suid;
|
||||
} */ *uap = v;
|
||||
struct linux_sys_setresuid_args ua;
|
||||
|
||||
SCARG(&ua, ruid) = (SCARG(uap, ruid) == -1) ? -1 : SCARG(uap, ruid);
|
||||
SCARG(&ua, euid) = (SCARG(uap, euid) == -1) ? -1 : SCARG(uap, euid);
|
||||
SCARG(&ua, suid) = (SCARG(uap, suid) == -1) ? -1 : SCARG(uap, suid);
|
||||
|
||||
return linux_sys_setresuid(l, &ua, retval);
|
||||
}
|
||||
|
||||
int
|
||||
linux32_sys_setresgid(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct linux32_sys_setresgid_args /* {
|
||||
syscallarg(gid_t) rgid;
|
||||
syscallarg(gid_t) egid;
|
||||
syscallarg(gid_t) sgid;
|
||||
} */ *uap = v;
|
||||
struct linux_sys_setresgid_args ua;
|
||||
|
||||
SCARG(&ua, rgid) = (SCARG(uap, rgid) == -1) ? -1 : SCARG(uap, rgid);
|
||||
SCARG(&ua, egid) = (SCARG(uap, egid) == -1) ? -1 : SCARG(uap, egid);
|
||||
SCARG(&ua, sgid) = (SCARG(uap, sgid) == -1) ? -1 : SCARG(uap, sgid);
|
||||
|
||||
return linux_sys_setresgid(l, &ua, retval);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue