From a6015a858d9658730c0cc9b963ad86a740dd4bb8 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Wed, 13 Jan 2010 14:49:26 +0100 Subject: s3 selftest: Fix the WINBINDD_GETDCNAMEe test. The WINBINDD_GETDCNAME test expected an NSS_STATUS_SUCCESS return from all calls. However, this does not apply for BUILTIN and the DC's own domain. Make the test work again by skipping those two. --- source4/torture/winbind/struct_based.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/torture/winbind/struct_based.c') diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index de1507a67c..d1ae1e5667 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -473,6 +473,9 @@ static bool torture_winbind_struct_getdcname(struct torture_context *torture) { bool ok; bool strict = torture_setting_bool(torture, "strict mode", false); + const char *domain_name = torture_setting_string(torture, + "winbindd netbios domain", + lp_workgroup(torture->lp_ctx)); struct torture_trust_domain *listd = NULL; uint32_t i, count = 0; @@ -485,6 +488,13 @@ static bool torture_winbind_struct_getdcname(struct torture_context *torture) struct winbindd_request req; struct winbindd_response rep; + /* getdcname is not expected to work on "BUILTIN" or our own + * domain */ + if (strequal(listd[i].netbios_name, "BUILTIN") || + strequal(listd[i].netbios_name, domain_name)) { + continue; + } + ZERO_STRUCT(req); ZERO_STRUCT(rep); -- cgit