summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-27 17:35:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:51:39 -0500
commit5a616802ff076814f0a105d64a469365aea6910a (patch)
tree28f2a63f735022eb16846fa17780d23e6efedd1a
parentaad487ac94dc242a183de8c6bf0b568088d0c018 (diff)
downloadsamba-5a616802ff076814f0a105d64a469365aea6910a.tar.gz
samba-5a616802ff076814f0a105d64a469365aea6910a.tar.bz2
samba-5a616802ff076814f0a105d64a469365aea6910a.zip
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)
-rw-r--r--source4/torture/rpc/drsuapi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 0129fe9b63..338d2ad759 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -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;
}
}