idmap: Pass up the xid2sids unix-ids from the idmap child
authorVolker Lendecke <vl@samba.org>
Wed, 21 Dec 2016 10:29:08 +0000 (11:29 +0100)
committerUri Simchoni <uri@samba.org>
Tue, 27 Dec 2016 19:20:27 +0000 (20:20 +0100)
When asking for gid2sid with an idmap backend that does ID_TYPE_BOTH
and the sid in question is actually a user, the parent winbind needs
to know about it. The next commit will prime the gencache also after
xid2sid calls, and if we filled it with a ID_TYPE_GID entry, a later
sid2uid call would fail.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12484

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
librpc/idl/winbind.idl
source3/winbindd/winbindd_dual_srv.c

index 60c875b04c3081a3fb10270b7a2153ff12f7ee5e..ec472c57ede509525fed8f903aedbddc010569ce 100644 (file)
@@ -59,7 +59,7 @@ interface winbind
     NTSTATUS wbint_UnixIDs2Sids(
        [in,string,charset(UTF8)] char *domain_name,
        [in] uint32 num_ids,
-       [in] unixid xids[num_ids],
+       [in,out] unixid xids[num_ids],
        [out] dom_sid sids[num_ids]
        );
 
index 4a581d33e0daf6466cfb0bef334205e5c10ca49b..7b804183d1040fe17b133b6b010bc964e22bf9e5 100644 (file)
@@ -233,6 +233,7 @@ NTSTATUS _wbint_UnixIDs2Sids(struct pipes_struct *p,
        }
 
        for (i=0; i<r->in.num_ids; i++) {
+               r->out.xids[i] = maps[i]->xid;
                sid_copy(&r->out.sids[i], maps[i]->sid);
        }