This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
question about NSS [SUCCESS=merge] semantics
- From: DJ Delorie <dj at redhat dot com>
- To: libc-alpha at sourceware dot org
- Cc: Stephen Gallagher <sgallagh at redhat dot com>
- Date: Mon, 01 May 2017 14:58:19 -0400
- Subject: question about NSS [SUCCESS=merge] semantics
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9C0E9C0B2A2A
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9C0E9C0B2A2A
If two services both have the same user in a given group, and the
merge feature needs to merge them, do we de-duplicate the user or not?
Do we also dedup the groups when enumerating?
The wiki proposing the feature says to dedup, but neither the man page
nor the patch submission mentions it.
I.e.
group test1 [SUCCESS=merge] test2
with...
test1: mygroup::4:alpha,beta,gamma
test2: mygroup::4:alpha,delta
There are two interesting cases (well, three):
getgrgid(4) -> alpha,beta,gamma,delta
-OR-
getgrgid(4) -> alpha,beta,gamma,alpha,delta
and also:
getgrent() returns which?
mygroup:4:alpha,beta,gamma,delta
-OR-
mygroup:4:alpha,beta,gamma,alpha,delta
-OR-
mygroup:4:alpha,beta,gamma,delta
mygroup:4:alpha,delta
(i.e. two parts: dedup users, and/or dedup groups)