xref: /original-bsd/sys/sys/ucred.h (revision 21439bbc)
1 /*
2  * Copyright (c) 1989 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)ucred.h	7.5 (Berkeley) 02/05/91
8  */
9 
10 #ifndef _UCRED_H_
11 #define	_UCRED_H_
12 
13 /*
14  * Credentials.
15  */
16 struct ucred {
17 	u_short	cr_ref;			/* reference count */
18 	uid_t	cr_uid;			/* effective user id */
19 	short	cr_ngroups;		/* number of groups */
20 	gid_t	cr_groups[NGROUPS];	/* groups */
21 };
22 #define cr_gid cr_groups[0]
23 #define NOCRED ((struct ucred *)-1)
24 
25 #ifdef KERNEL
26 #define	crhold(cr)	(cr)->cr_ref++
27 struct ucred *crget();
28 struct ucred *crcopy();
29 struct ucred *crdup();
30 #endif KERNEL
31 
32 #endif /* !_UCRED_H_ */
33