Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/ucred.h
| Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | |||||
| * This is the external representation of struct ucred. | * This is the external representation of struct ucred. | ||||
| */ | */ | ||||
| struct xucred { | struct xucred { | ||||
| u_int cr_version; /* structure layout version */ | u_int cr_version; /* structure layout version */ | ||||
| uid_t cr_uid; /* effective user id */ | uid_t cr_uid; /* effective user id */ | ||||
| short cr_ngroups; /* number of groups (incl. cr_gid). */ | short cr_ngroups; /* number of groups (incl. cr_gid). */ | ||||
| union { | union { | ||||
| /* | /* | ||||
| * Special little hack to avoid needing a cr_gid macro, which | * The effective GID has been the first element of cr_groups[] | ||||
| * would cause problems if one were to use it with struct ucred | * for historical reasons. It should be accessed using the | ||||
| * which also has a cr_groups member. | * 'cr_gid' identifier. Supplementary groups should be accessed | ||||
| * using cr_sgroups[]. Note that 'cr_ngroups' currently | |||||
| * includes the effective GID. | |||||
| * | |||||
| * XXXOC: On the next API change (requires versioning), please | |||||
| * replace this union with a true unaliased field 'cr_gid' and | |||||
| * make sure that cr_groups[]/'cr_ngroups' only account for | |||||
| * supplementary groups. | |||||
| */ | */ | ||||
| struct { | struct { | ||||
| gid_t cr_gid; /* effective group id */ | gid_t cr_gid; /* effective group id */ | ||||
| gid_t cr_sgroups[XU_NGROUPS - 1]; | gid_t cr_sgroups[XU_NGROUPS - 1]; | ||||
| }; | }; | ||||
| gid_t cr_groups[XU_NGROUPS]; /* groups */ | gid_t cr_groups[XU_NGROUPS]; /* groups */ | ||||
| }; | }; | ||||
| union { | union { | ||||
| void *_cr_unused1; /* compatibility with old ucred */ | void *_cr_unused1; /* compatibility with old ucred */ | ||||
| pid_t cr_pid; | pid_t cr_pid; | ||||
| }; | }; | ||||
| }; | }; | ||||
| #define XUCRED_VERSION 0 | #define XUCRED_VERSION 0 | ||||
| ▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines | |||||