/*
 * $Header: /smsa/bsd:include/sys/ucred.h:bsd  1.4  $
 * $Source: /smsa/bsd:include/sys/ucred.h: $
 *
 * Copyright (c) 1988 Acorn Computers Ltd., Cambridge, England
 *
 */
/*	@(#)ucred.h	2.1 88/05/18 4.0NFSSRC SMI; from SMI 1.3 87/09/16	*/

/* 
 * Copyright (c) 1988 by Sun Microsystems, Inc.
 */

#ifndef __sys_ucred_h
#define __sys_ucred_h

#ifndef __sys_param_h
#include "param.h"
#endif
#ifndef __sys_types_h
#include "types.h"
#endif
/*
 * User credential structure
 */
struct ucred {
 	u_short		cr_ref;			/* reference count */
 	uid_t 	 	cr_uid;			/* effective user id */
 	gid_t  		cr_gid;			/* effective group id */
 	uid_t  		cr_ruid;		/* real user id */
 	gid_t		cr_rgid;		/* real group id */
	uid_t		cr_suid;		/* saved set-user-id */
	gid_t		cr_sgid;		/* saved set-group-id */
 	gid_t  		cr_groups[NGROUPS];	/* groups, 0 terminated */
};

#ifdef _KERNEL
#define	crhold(cr)	(cr)->cr_ref++
void crfree();
struct ucred *crget();
struct ucred *crcopy();
struct ucred *crdup();
struct ucred *crgetcred();
#endif/*_KERNEL*/

#endif/*__sys_ucred_h*/

/* EOF ucred.h */
