Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/compat/linux/common Pull up revision 1.63 (requeste...



details:   https://anonhg.NetBSD.org/src/rev/69724007fb80
branches:  netbsd-1-4
changeset: 470858:69724007fb80
user:      he <he%NetBSD.org@localhost>
date:      Tue Aug 15 21:33:15 2000 +0000

description:
Pull up revision 1.63 (requested by abs):
  Enable basic versions of Linux fsuid calls.

diffstat:

 sys/compat/linux/common/linux_misc.c |  33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diffs (47 lines):

diff -r e2735fcb5734 -r 69724007fb80 sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c      Mon Aug 14 14:29:18 2000 +0000
+++ b/sys/compat/linux/common/linux_misc.c      Tue Aug 15 21:33:15 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_misc.c,v 1.53 1999/02/09 20:37:19 christos Exp $ */
+/*     $NetBSD: linux_misc.c,v 1.53.2.1 2000/08/15 21:33:15 he Exp $   */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -870,6 +870,37 @@
        return sys_setregid(p, &bsa, retval);
 }
 
+/*
+ * We have nonexistant fsuid == uid.
+ * If call is no-op return 0, otherwise ENOSYS.
+ */
+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 (ENOSYS);
+        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___sysctl(p, v, retval)
        struct proc *p;



Home | Main Index | Thread Index | Old Index