MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cru2x

Function cru2x

freebsd/kern/kern_prot.c:2135–2148  ·  view source on GitHub ↗

* Fill in a struct xucred based on a struct ucred. */

Source from the content-addressed store, hash-verified

2133 * Fill in a struct xucred based on a struct ucred.
2134 */
2135void
2136cru2x(struct ucred *cr, struct xucred *xcr)
2137{
2138 int ngroups;
2139
2140 bzero(xcr, sizeof(*xcr));
2141 xcr->cr_version = XUCRED_VERSION;
2142 xcr->cr_uid = cr->cr_uid;
2143
2144 ngroups = MIN(cr->cr_ngroups, XU_NGROUPS);
2145 xcr->cr_ngroups = ngroups;
2146 bcopy(cr->cr_groups, xcr->cr_groups,
2147 ngroups * sizeof(*cr->cr_groups));
2148}
2149
2150void
2151cru2xt(struct thread *td, struct xucred *xcr)

Callers 8

cru2xtFunction · 0.70
audit_record_ctorFunction · 0.50
udp_getcredFunction · 0.50
sctp_getcredFunction · 0.50
tcp_getcredFunction · 0.50
tcp6_getcredFunction · 0.50
sctp6_getcredFunction · 0.50
udp6_getcredFunction · 0.50

Calls 1

bzeroFunction · 0.85

Tested by

no test coverage detected