Page MenuHomeFreeBSD

cred: crextend(): Harden, simplify
Needs ReviewPublic

Authored by olce on Fri, Oct 4, 8:07 AM.

Details

Reviewers
mhorne
mjg
emaste
Summary

Harden by adding more assertions. Fix an impact in kern_setgroups().

Simplify by removing the iterative process whose purpose is actually to
determine the closest power of two that is greater than the wanted
number of bytes. Using the proper target quantity (number of bytes)
incidentally helps with eliminating divisions (and the reliance on
sizeof(gid_t) being a power of two).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59726
Build 56612: arc lint + arc unit