From 07f20e3f57660ac916bbc46eb39163ac5f06f94d Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 30 Sep 2007 09:15:04 +0000 Subject: r25439: Extend the SHOW_SEQUENCE test somewhat to walk the list of trusted domains. Michael (This used to be commit d24eecb80ef55160e9e9c4863c59d9af15e4f5ca) --- source4/torture/winbind/struct_based.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source4/torture/winbind') diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index 44e19df6b7..4add3563bd 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -589,9 +589,15 @@ static bool torture_winbind_struct_show_sequence(struct torture_context *torture { struct winbindd_request req; struct winbindd_response rep; + bool ok; + struct torture_trust_domain *domlist = NULL; + int i; + torture_comment(torture, "Running WINBINDD_SHOW_SEQUENCE (struct based)\n"); + torture_comment(torture, " - Running WINBINDD_SHOW_SEQUENCE without domain:\n"); + ZERO_STRUCT(req); ZERO_STRUCT(rep); @@ -601,6 +607,22 @@ static bool torture_winbind_struct_show_sequence(struct torture_context *torture torture_comment(torture, "%s", (char *)rep.extra_data.data); } + torture_comment(torture, " - getting list of trusted domains\n"); + ok = get_trusted_domains(torture, &domlist); + torture_assert(torture, ok, "failed to get trust list"); + + for (i=0; domlist[i].netbios_name; i++) { + ZERO_STRUCT(req); + ZERO_STRUCT(rep); + fstrcpy(req.domain_name, domlist[i].netbios_name); + torture_comment(torture, " - Running WINBINDD_SHOW_SEQUENCE " + "for domain %s:\n", req.domain_name); + DO_STRUCT_REQ_REP(WINBINDD_SHOW_SEQUENCE, &req, &rep); + if (rep.extra_data.data) { + torture_comment(torture, "%s", (char *)rep.extra_data.data); + } + } + return true; } -- cgit