X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/43866e378188c25dd1e2208016ab3cbeb086ae6c..55e303ae13a4cf49d70f2294092726f2fffb9ef2:/bsd/sys/ucred.h diff --git a/bsd/sys/ucred.h b/bsd/sys/ucred.h index 23e739a7f..9f044224e 100644 --- a/bsd/sys/ucred.h +++ b/bsd/sys/ucred.h @@ -74,6 +74,17 @@ struct ucred { short cr_ngroups; /* number of groups */ gid_t cr_groups[NGROUPS]; /* groups */ }; +/* + * This is the external representation of struct ucred. + */ +struct xucred { + u_int cr_version; /* structure layout version */ + uid_t cr_uid; /* effective user id */ + short cr_ngroups; /* number of groups */ + gid_t cr_groups[NGROUPS]; /* groups */ +}; +#define XUCRED_VERSION 0 + #define cr_gid cr_groups[0] #define NOCRED ((struct ucred *)0) /* no credential available */ #define FSCRED ((struct ucred *)-1) /* filesystem credential */ @@ -89,7 +100,9 @@ struct ucred *crcopy __P((struct ucred *cr)); struct ucred *crdup __P((struct ucred *cr)); void crfree __P((struct ucred *cr)); struct ucred *crget __P((void)); +int crcmp __P((struct ucred *cr1, struct ucred *cr2)); int suser __P((struct ucred *cred, u_short *acflag)); +void cru2x __P((struct ucred *cr, struct xucred *xcr)); #endif /* KERNEL */ #endif /* __APPLE_API_UNSTABLE */