Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/kern Pull up revision 1.57 (requested by sommerfeld):
details: https://anonhg.NetBSD.org/src/rev/9eb03bc95c4a
branches: netbsd-1-4
changeset: 470941:9eb03bc95c4a
user: he <he%NetBSD.org@localhost>
date: Fri Oct 06 15:35:10 2000 +0000
description:
Pull up revision 1.57 (requested by sommerfeld):
Introduce the issetugid() system call.
diffstat:
sys/kern/kern_prot.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diffs (34 lines):
diff -r 8294e226b993 -r 9eb03bc95c4a sys/kern/kern_prot.c
--- a/sys/kern/kern_prot.c Fri Oct 06 15:34:21 2000 +0000
+++ b/sys/kern/kern_prot.c Fri Oct 06 15:35:10 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_prot.c,v 1.53.2.1 1999/06/21 19:21:51 cgd Exp $ */
+/* $NetBSD: kern_prot.c,v 1.53.2.2 2000/10/06 15:35:10 he Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
@@ -505,6 +505,24 @@
return (0);
}
+int
+sys_issetugid(p, v, retval)
+ struct proc *p;
+ void *v;
+ register_t *retval;
+{
+ /*
+ * Note: OpenBSD sets a P_SUGIDEXEC flag set at execve() time,
+ * we use P_SUGID because we consider changing the owners as
+ * "tainting" as well.
+ * This is significant for procs that start as root and "become"
+ * a user without an exec - programs cannot know *everything*
+ * that libc *might* have put in their data segment.
+ */
+ *retval = (p->p_flag & P_SUGID) != 0;
+ return 0;
+}
+
/* ARGSUSED */
int
sys_setgroups(p, v, retval)
Home |
Main Index |
Thread Index |
Old Index