svn commit: samba r25280 - in
branches/SAMBA_4_0/source/torture/winbind: .
metze at samba.org
metze at samba.org
Fri Sep 21 10:43:22 GMT 2007
Author: metze
Date: 2007-09-21 10:43:21 +0000 (Fri, 21 Sep 2007)
New Revision: 25280
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25280
Log:
call WINBINDD_GETDCNAME for each domain returned from WINBINDD_LIST_TRUSTDOMS
metze
Modified:
branches/SAMBA_4_0/source/torture/winbind/struct_based.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c
===================================================================
--- branches/SAMBA_4_0/source/torture/winbind/struct_based.c 2007-09-21 10:40:10 UTC (rev 25279)
+++ branches/SAMBA_4_0/source/torture/winbind/struct_based.c 2007-09-21 10:43:21 UTC (rev 25280)
@@ -219,22 +219,38 @@
static bool torture_winbind_struct_getdcname(struct torture_context *torture)
{
- struct winbindd_request req;
- struct winbindd_response rep;
+ bool ok;
+ bool strict = torture_setting_bool(torture, "strict mode", false);
+ struct torture_trust_domain *listd = NULL;
+ uint32_t i;
torture_comment(torture, "Running WINBINDD_GETDCNAME (struct based)\n");
- ZERO_STRUCT(req);
- ZERO_STRUCT(rep);
+ ok = get_trusted_domains(torture, &listd);
+ torture_assert(torture, ok, "failed to get trust list");
- fstrcpy(req.domain_name, lp_workgroup());
+ for (i=0; listd[i].netbios_name; i++) {
+ struct winbindd_request req;
+ struct winbindd_response rep;
- DO_STRUCT_REQ_REP(WINBINDD_GETDCNAME, &req, &rep);
+ ZERO_STRUCT(req);
+ ZERO_STRUCT(rep);
- /*
- * TODO: test all trusted domains
- */
+ fstrcpy(req.domain_name, listd[i].netbios_name);
+ ok = true;
+ DO_STRUCT_REQ_REP_EXT(WINBINDD_GETDCNAME, &req, &rep,
+ NSS_STATUS_SUCCESS,
+ (i <2 || strict), ok = false,
+ talloc_asprintf(torture, "DOMAIN '%s'",
+ req.domain_name));
+ if (!ok) continue;
+
+ /* TODO: check rep.data.dc_name; */
+ torture_comment(torture, "DOMAIN '%s' => DCNAME '%s'\n",
+ req.domain_name, rep.data.dc_name);
+ }
+
return true;
}
More information about the samba-cvs
mailing list