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)
committerKarolin Seeger <kseeger@samba.org>
Thu, 9 Oct 2014 19:10:04 +0000 (21:10 +0200)
commitf88c10665e628eed0b03bcabef3216b32e1bc05b
tree48d51f3d8f39c6998f6d8febcf531529d32f7bfd
parentf42f4d0a197f73050fdabd663a6472d396a74b80
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

(cherry picked from commit 9c9216410faf707edc4ba05f2b715d45f7f51ca4)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10838
Invalid id mappings for users/groups migrated from another domain
source3/winbindd/wb_sids2xids.c