1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r22538: same day late at night in au...:-)

fix the strcasecmp_m() returns 0 for a match

also use the correct array element to fill priv->dcinfo

the fixes the problems where ldb changes the order of the search results
when changing the main dc netbios name from "localhost" to "localtest"

metze
(This used to be commit 25fffe385ea039ae19f25730cba6c7ea8684860b)
This commit is contained in:
Stefan Metzmacher 2007-04-27 17:35:15 +00:00 committed by Gerald (Jerry) Carter
parent aad487ac94
commit 5a616802ff

View File

@ -139,19 +139,18 @@ static BOOL test_DsGetDomainControllerInfo(struct dcerpc_pipe *p, TALLOC_CTX *me
case 1:
for (k=0; k < r.out.ctr.ctr1.count; k++) {
if (strcasecmp_m(r.out.ctr.ctr1.array[k].netbios_name,
torture_join_netbios_name(priv->join))) {
torture_join_netbios_name(priv->join)) == 0) {
found = True;
break;
}
}
break;
case 2:
if (r.out.ctr.ctr2.count > 0) {
priv->dcinfo = r.out.ctr.ctr2.array[0];
}
for (k=0; k < r.out.ctr.ctr2.count; k++) {
if (strcasecmp_m(r.out.ctr.ctr2.array[k].netbios_name,
torture_join_netbios_name(priv->join))) {
torture_join_netbios_name(priv->join)) == 0) {
found = True;
priv->dcinfo = r.out.ctr.ctr2.array[k];
break;
}
}