diff options
author | jasoni <jasoni@cvs.openbsd.org> | 2000-04-12 04:22:41 +0000 |
---|---|---|
committer | jasoni <jasoni@cvs.openbsd.org> | 2000-04-12 04:22:41 +0000 |
commit | 702760c748d018312be23e323c34e8f2541136c5 (patch) | |
tree | bce9e9c1d432d6a70616615ea66e0dc18651bdc9 /sys/compat/linux/linux_misc.c | |
parent | cabd37effc285017205ade2e777b4403d1df045b (diff) |
Implement linux's setfsuid and getfsuid (from NetBSD)
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 3f1653cd7b8..4c5a58e46eb 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.26 2000/02/28 13:29:30 jasoni Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.27 2000/04/12 04:22:40 jasoni Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /* @@ -1440,6 +1440,38 @@ linux_sys_getresuid(p, v, retval) return (copyout(&pc->p_svuid, SCARG(uap, suid), sizeof(uid_t))); } +/* + * We have nonexistent fsuid equal to uid. + * If modification is requested, refuse. + */ +int +linux_sys_setfsuid(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + struct linux_sys_setfsuid_args /* { + syscallarg(uid_t) uid; + } */ *uap = v; + uid_t uid; + + uid = SCARG(uap, uid); + if (p->p_cred->p_ruid != uid) + return sys_nosys(p, v, retval); + else + return (0); +} + +int +linux_sys_getfsuid(p, v, retval) + struct proc *p; + void *v; + register_t *retval; +{ + return sys_getuid(p, v, retval); +} + + int linux_sys_nice(p, v, retval) struct proc *p; |