/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* File with private definitions for the ucred structure for use by the
* kernel and library routines.
*/
#ifndef _SYS_UCRED_H
#define _SYS_UCRED_H
#ifdef _KERNEL
#else
#endif
#ifndef _KERNEL
#include <unistd.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_KERNEL) || _STRUCTURED_PROC != 0
/*
* bitness neutral struct
*
* Add new fixed fields at the end of the structure.
*/
struct ucred_s {
/* The rest goes here */
};
/* Get the process credentials */
/* Get the process privileges */
/* Get the process audit info */
/* Get peer security label info */
#endif /* _KERNEL || _STRUCTURED_PROC != 0 */
/*
* SYS_ucredsys subcodes.
*/
#define UCREDSYS_UCREDGET 0
#ifdef _KERNEL
/* The prcred_t has a variable size; it should be last. */
(is_system_labeled() ? sizeof (bslabel_t) : 0))
struct proc;
const cred_t *);
extern int get_audit_ucrsize(void);
#else
/* Definition only valid for structured proc. */
#if _STRUCTURED_PROC != 0
sizeof (prpriv_t) + \
sizeof (priv_chunk_t) * \
(ip)->priv_infosize + \
sizeof (auditinfo64_addr_t) + \
sizeof (bslabel_t))
#endif
extern struct ucred_s *_ucred_alloc(void);
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_UCRED_H */