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

Function crsetgroups

freebsd/kern/kern_prot.c:2317–2326  ·  view source on GitHub ↗

* Copy groups in to a credential after expanding it if required. * Truncate the list to (ngroups_max + 1) if it is too large. */

Source from the content-addressed store, hash-verified

2315 * Truncate the list to (ngroups_max + 1) if it is too large.
2316 */
2317void
2318crsetgroups(struct ucred *cr, int ngrp, gid_t *groups)
2319{
2320
2321 if (ngrp > ngroups_max + 1)
2322 ngrp = ngroups_max + 1;
2323
2324 crextend(cr, ngrp);
2325 crsetgroups_locked(cr, ngrp, groups);
2326}
2327
2328/*
2329 * Get login name, if available.

Callers 2

crcopyFunction · 0.85
vfs_hang_addrlistFunction · 0.85

Calls 2

crextendFunction · 0.85
crsetgroups_lockedFunction · 0.85

Tested by

no test coverage detected