From 997e76e7c026ba7f195acaeee3482396e76ee80c Mon Sep 17 00:00:00 2001 From: alfred Date: Fri, 16 Aug 2002 07:01:43 +0000 Subject: Hide 'struct ucred' behind '#ifdef _KERNEL', this should stop userland from attempting to use it for good. There is a catch, kvm_proc.c needs to '#define _KERNEL' to get at the ucred. Requested by: rwatson --- sys/sys/ucred.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys') diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 7a78810..60b5bd6 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -49,6 +49,7 @@ * Please do not inspect cr_uid directly to determine superuserness. * Only the suser() or suser_cred() function should be used for this. */ +#ifdef _KERNEL struct ucred { u_int cr_ref; /* reference count */ #define cr_startcopy cr_uid @@ -68,6 +69,7 @@ struct ucred { }; #define NOCRED ((struct ucred *)0) /* no credential available */ #define FSCRED ((struct ucred *)-1) /* filesystem credential */ +#endif /* _KERNEL */ /* * This is the external representation of struct ucred. -- cgit v1.1