summaryrefslogtreecommitdiff
path: root/sys/kern/kern_prot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_prot.c')
-rw-r--r--sys/kern/kern_prot.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 6eb98c91f4c..7a86e67f46b 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_prot.c,v 1.15 2001/06/18 13:18:36 art Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.16 2001/06/19 07:54:37 deraadt Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
@@ -53,7 +53,6 @@
#include <sys/timeb.h>
#include <sys/times.h>
#include <sys/malloc.h>
-#include <sys/filedesc.h>
#include <sys/mount.h>
#include <sys/syscallargs.h>
@@ -656,20 +655,3 @@ sys_setlogin(p, v, retval)
error = EINVAL;
return (error);
}
-
-/*
- * Check if a process is allowed to raise its privileges.
- */
-int
-proc_cansugid(struct proc *p)
-{
- /* ptrace(2)d processes shouldn't. */
- if ((p->p_flag & P_TRACED) != 0)
- return (EPERM);
-
- /* proceses with shared filedescriptors shouldn't. */
- if (p->p_fd->fd_refcnt > 1)
- return (EPERM);
-
- return (0);
-}