diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2181,11 +2181,6 @@ bcopy(&src->cr_startcopy, &dest->cr_startcopy, (unsigned)((caddr_t)&src->cr_endcopy - (caddr_t)&src->cr_startcopy)); - /* - * Avoid an assertion in crsetgroups() -> crextend(). To be removed as - * 'cr_ngroups' is moved out of the bcopied area. - */ - dest->cr_ngroups = 0; dest->cr_flags = src->cr_flags; crsetgroups(dest, src->cr_ngroups, src->cr_groups); uihold(dest->cr_uidinfo); diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -72,20 +72,22 @@ u_int cr_users; /* (c) proc + thread using this cred */ u_int cr_flags; /* credential flags */ struct auditinfo_addr cr_audit; /* Audit properties. */ -#define cr_startcopy cr_uid +#define cr_startcopy cr_ispare + u_int cr_ispare; /* spare integer */ + gid_t cr_rgid; /* real group id */ + gid_t cr_svgid; /* saved group id */ uid_t cr_uid; /* effective user id */ uid_t cr_ruid; /* real user id */ uid_t cr_svuid; /* saved user id */ - int cr_ngroups; /* number of groups */ - gid_t cr_rgid; /* real group id */ - gid_t cr_svgid; /* saved group id */ struct uidinfo *cr_uidinfo; /* per euid resource consumption */ struct uidinfo *cr_ruidinfo; /* per ruid resource consumption */ struct prison *cr_prison; /* jail(2) */ struct loginclass *cr_loginclass; /* login class */ - void *cr_pspare2[2]; /* general use 2 */ + void *cr_pspare[1]; /* spare pointer */ #define cr_endcopy cr_label struct label *cr_label; /* MAC label */ + u_int cr_ispare2; /* spare integer */ + int cr_ngroups; /* number of groups */ gid_t *cr_groups; /* groups */ int cr_agroups; /* Available groups */ /* storage for small groups */