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)
committerJeremy Allison <jra@samba.org>
Fri, 30 Sep 2016 00:10:29 +0000 (02:10 +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

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;
                }
        }