Page MenuHomeFreeBSD

nscd step6
Needs ReviewPublic

Authored by david_crossfamilyweb.com on Wed, Oct 16, 3:10 AM.

Details

Reviewers
markj
Summary

minor code quality fixups for getpwent.
implement libc side of grouplist and pivot lookups for caching

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

lib/libc/gen/getgrent.c
209
370

original_ngroups is an "untrusted" value, i.e., it comes from nscd. This code should at least verify that

  1. it's non-negative,
  2. that original_ngroups * sizeof(gid_t) won't overflow,

before doing math with it.