s3-winbindd: Do not use domain SID from LookupSids for Sids2UnixIDs call
authorChristof Schmitt <cs@samba.org>
Thu, 11 Sep 2014 23:39:21 +0000 (16:39 -0700)
committerVolker Lendecke <vl@samba.org>
Mon, 29 Sep 2014 11:15:18 +0000 (13:15 +0200)
commit9c9216410faf707edc4ba05f2b715d45f7f51ca4
tree9805817b957e4ee574647fc10a00bd1a8860e788
parent16594e7fc0a46249a48d0d0635de0c1050ecd340
s3-winbindd: Do not use domain SID from LookupSids for Sids2UnixIDs call

Create a new lsa_RefDomainList and populate it with the domain SID from
the original query. That avoids the problem that for migrated objects,
LookupSids returns the SID of the new domain, and combining that with
the RID from the input results in an invalid SID.

A better fix would be querying the RID of the user in the new domain,
but the approach here at least avoids id mappings entries for invalid
SIDs.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Sep 29 13:15:18 CEST 2014 on sn-devel-104
source3/winbindd/wb_sids2xids.c