winbind: Fix passing idmap failure from wb_sids2xids back to callers
authorChristof Schmitt <cs@samba.org>
Mon, 26 Sep 2016 21:27:28 +0000 (14:27 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 20 Oct 2016 08:45:26 +0000 (10:45 +0200)
If the idmap call in wb_sids2xids fails, the callers expect xid.type to
be set to ID_TYPE_NOT_SPECIFIED, not the internal type field that is
initialized from the lookupsids call.

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

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 30 02:10:29 CEST 2016 on sn-devel-144

(cherry picked from commit 1f9501cad63717d6e4ea01974f853b199f359b40)

source3/winbindd/wb_sids2xids.c

index e16917f1545a9a40985dc3f3dd70973f4c515d95..25260be3384c2cc00802b3a401785400361da0c3 100644 (file)
@@ -305,7 +305,7 @@ static void wb_sids2xids_done(struct tevent_req *subreq)
                 * All we can do here is to report "not mapped"
                 */
                for (i=0; i<src->num_ids; i++) {
-                       src->ids[i].type = ID_TYPE_NOT_SPECIFIED;
+                       src->ids[i].xid.type = ID_TYPE_NOT_SPECIFIED;
                }
        }