xref: /netbsd/sys/sys/ucred.h (revision c55dd456)
1*c55dd456Sdholland /*	$NetBSD: ucred.h,v 1.36 2011/10/12 23:03:36 dholland Exp $	*/
2fccfa11aScgd 
361f28255Scgd /*
4881ba516Smycroft  * Copyright (c) 1989, 1993
5881ba516Smycroft  *	The Regents of the University of California.  All rights reserved.
661f28255Scgd  *
761f28255Scgd  * Redistribution and use in source and binary forms, with or without
861f28255Scgd  * modification, are permitted provided that the following conditions
961f28255Scgd  * are met:
1061f28255Scgd  * 1. Redistributions of source code must retain the above copyright
1161f28255Scgd  *    notice, this list of conditions and the following disclaimer.
1261f28255Scgd  * 2. Redistributions in binary form must reproduce the above copyright
1361f28255Scgd  *    notice, this list of conditions and the following disclaimer in the
1461f28255Scgd  *    documentation and/or other materials provided with the distribution.
15aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
1661f28255Scgd  *    may be used to endorse or promote products derived from this software
1761f28255Scgd  *    without specific prior written permission.
1861f28255Scgd  *
1961f28255Scgd  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2061f28255Scgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2161f28255Scgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2261f28255Scgd  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2361f28255Scgd  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2461f28255Scgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2561f28255Scgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2661f28255Scgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2761f28255Scgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2861f28255Scgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2961f28255Scgd  * SUCH DAMAGE.
3061f28255Scgd  *
31e5bc90f4Sfvdl  *	@(#)ucred.h	8.4 (Berkeley) 1/9/95
3261f28255Scgd  */
3361f28255Scgd 
34bcbf85dfSmycroft #ifndef _SYS_UCRED_H_
35bcbf85dfSmycroft #define	_SYS_UCRED_H_
3661f28255Scgd 
37*c55dd456Sdholland #ifdef _KERNEL
38*c55dd456Sdholland #include <sys/syslimits.h>
39*c55dd456Sdholland #else
40*c55dd456Sdholland #include <limits.h>
41*c55dd456Sdholland #endif
427d0afa7fSpk 
4361f28255Scgd /*
4461f28255Scgd  * Credentials.
4561f28255Scgd  */
464328373cSchristos 
474328373cSchristos /* Userland's view of credentials. This should not change */
484328373cSchristos struct uucred {
49e2682648Spooka 	unsigned short	cr_unused;		/* not used, compat */
5061f28255Scgd 	uid_t		cr_uid;			/* effective user id */
5195ded74fSjtc 	gid_t		cr_gid;			/* effective group id */
5261f28255Scgd 	short		cr_ngroups;		/* number of groups */
531dd469e2Sdholland 	gid_t		cr_groups[NGROUPS_MAX];	/* groups */
5461f28255Scgd };
554328373cSchristos 
56bcbf85dfSmycroft #endif /* !_SYS_UCRED_H_ */
57