winbind: Fix overlapping id ranges
authorVolker Lendecke <vl@samba.org>
Fri, 12 Apr 2019 14:56:45 +0000 (16:56 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 24 Apr 2019 02:25:56 +0000 (02:25 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 24 02:25:56 UTC 2019 on sn-devel-184

selftest/knownfail
source3/winbindd/wb_xids2sids.c

index 08c4fc06b929523c86ec802b548aca3175bdbf6c..5bc18a69168ae7f2dee055016a23540ca4763825 100644 (file)
 ^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\)
 ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
 ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
-^idmap.ad.Test gid lookup of Domain Admins in trusted domain.\(ad_member_idmap_ad\)
index 383fc67bc8ddb97ab96ff7886c582974238b90c4..929a3b8e4251cca7099f108505181844ec6ce490 100644 (file)
@@ -302,7 +302,11 @@ static struct tevent_req *wb_xids2sids_dom_send(
                        continue;
                }
                if (state->cached[i]) {
-                       /* already mapped */
+                       /* already found in cache */
+                       continue;
+               }
+               if (!is_null_sid(&state->all_sids[i])) {
+                       /* already mapped in a previously asked domain */
                        continue;
                }
                state->dom_xids[state->num_dom_xids++] = id;
@@ -369,7 +373,11 @@ static void wb_xids2sids_dom_done(struct tevent_req *subreq)
                        continue;
                }
                if (state->cached[i]) {
-                       /* already mapped */
+                       /* already found in cache */
+                       continue;
+               }
+               if (!is_null_sid(&state->all_sids[i])) {
+                       /* already mapped in a previously asked domain */
                        continue;
                }