idmap: Initialize all idmap domains at startup
commitef0c91195533d95ba4fb7947ff5f69c20aa677b8
authorVolker Lendecke <vl@samba.org>
Wed, 19 Aug 2015 15:00:46 +0000 (19 17:00 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 24 Aug 2015 14:16:11 +0000 (24 16:16 +0200)
tree5ce22729cc0f9a84ebf1e4ba1f3a7858de8fcc88
parentd36de86639b7782e1e959d61917d8f19fdfc902c
idmap: Initialize all idmap domains at startup

So far we have initialized idmap domains on demand indexed by name.
For sid2xid this works okay, because we could do lookupsids before
and thus get the name. For xid2sid this is more problematic. We
have to rely on enumtrustdoms to work completely, and we have to
look at the list of winbind domains in the parent to get the domain
name. Relying on domain->have_idmap_config is not particularly nice.

This patch re-works initialization of idmap domains by scanning all
parametric parameters, scanning for :backend configuration settings.
This way we get a complete list of :range definitions. This means
we can rely on the idmap domain array to be complete. This in turn
means we can live without the domain name to find a domain, we can
do a range search by uid or gid.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11464
source3/winbindd/idmap.c