From: Volker Lendecke Date: Fri, 12 Apr 2019 14:56:45 +0000 (+0200) Subject: winbind: Fix overlapping id ranges X-Git-Tag: tdb-1.4.1~321 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3020050bdf9df077ec9a0e962a689557187174ac;p=thirdparty%2Fsamba.git winbind: Fix overlapping id ranges Signed-off-by: Volker Lendecke Reviewed-by: Christof Schmitt Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Apr 24 02:25:56 UTC 2019 on sn-devel-184 --- diff --git a/selftest/knownfail b/selftest/knownfail index 08c4fc06b92..5bc18a69168 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -369,4 +369,3 @@ ^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\) diff --git a/source3/winbindd/wb_xids2sids.c b/source3/winbindd/wb_xids2sids.c index 383fc67bc8d..929a3b8e425 100644 --- a/source3/winbindd/wb_xids2sids.c +++ b/source3/winbindd/wb_xids2sids.c @@ -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; }