winbind: Do per-domain xids2sids calls
authorVolker Lendecke <vl@samba.org>
Tue, 1 Mar 2016 13:34:26 +0000 (14:34 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 30 Mar 2016 12:27:23 +0000 (14:27 +0200)
commita3bd040a5168470580dc2e0a0528afdc6faebe81
tree6e1856b393492109854d7ee44ea7c6e39ffdfb5f
parent50aef48e18e7e0a265c348d2486f687ddad839a0
winbind: Do per-domain xids2sids calls

This prepares the equivalent of 2b1dd01934b657a for xids2sids.

Collecting sids2xids per domain is a bit easier: SIDs carry their own domain
prefix. For the reverse, we need to scan the configuration for all the idmap
range definitions.

It has a separate effect: It enables overlapping idmap ranges. The per-domain
calls are done whenever a range matches. If the idmap child finds a successful
xid2sid mapping, this will be collected as one result. This means that every
range definition can contribute mappings.

If there are two rfc2307 sfu domains with overlapping ranges, the domains will
be queried one after the other for a specific mapping. If the defined ranges
overlap, the admin has to make sure that there are no conflicts, because in the
current code "the first writer wins", and the code does not specify an order
(yet).

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/wb_xids2sids.c