Page MenuHomeFreeBSD

nscd step5
Needs ReviewPublic

Authored by david_crossfamilyweb.com on Oct 16 2024, 2:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 2, 6:32 AM
Unknown Object (File)
Nov 8 2024, 12:33 AM
Unknown Object (File)
Oct 23 2024, 6:03 AM
Unknown Object (File)
Oct 16 2024, 1:57 PM
Subscribers

Details

Reviewers
markj
Summary

add 'pivot' lookup type, add handling for grouplist (via pivot) lookup and marshal and key extract functions.

Normal 'group' lookup functions take an identifier for a group (id or name) and return a group entry.
The getgrouplist(3) call dispatches to the NS method 'getgroupmembersip', which is given the name of a USER, and returns a list of GIDs. This is a unique access method to the group(5) database that does not have an analog in the other entity databases, it corresponds mostly like a 'pivot table'. Where a regular query is 'given a row id, give me a set of columns', this is 'given a column (a member of group), give me the rows that match'

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

There are quite a few style bugs here, and the change appears to contain two unrelated pieces: one to use reentrant group look up functions, and the other which introduces "pivot" lookups.

The review description should really explain what a pivot lookup is, and what problem it solves.

usr.sbin/nscd/agents/group.c
99
214
233

The part of the change above is related to the previous patch, not this one.

246
342
354
355
356
360

Implemented all changes save for pulling thread safety into step4