Most kernel ucred modification should likely be using this API, rather
than crsetgroups() directly, to avoid potential security issues. As of
FreeBSD 15.0, crsetgroups() *only* sets supplementary groups, while
crsetgroups_and_egid() will do both using an array of the same style
that previous versions used for crsetgroups() -- i.e., the first element
is the egid, and the remainder are supplementary groups.
Unlike the previous iteration of crsetgroups(), crsetgroups_and_egid()
is less prone to misuse as the caller must provide a default egid to use
in case the array is empty. This is particularly useful for groups
being set from data provided by userland.