summaryrefslogtreecommitdiff
path: root/source4/torture/winbind
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-01-13 14:49:26 +0100
committerKai Blin <kai@samba.org>2010-01-14 15:18:34 +0100
commita6015a858d9658730c0cc9b963ad86a740dd4bb8 (patch)
tree6595b1208e5b098e13fe434cd3eff1452ae9dccc /source4/torture/winbind
parent36db924446b8c6a1627e9abb22f774240678851a (diff)
downloadsamba-a6015a858d9658730c0cc9b963ad86a740dd4bb8.tar.gz
samba-a6015a858d9658730c0cc9b963ad86a740dd4bb8.tar.bz2
samba-a6015a858d9658730c0cc9b963ad86a740dd4bb8.zip
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.
Diffstat (limited to 'source4/torture/winbind')
-rw-r--r--source4/torture/winbind/struct_based.c10
1 files changed, 10 insertions, 0 deletions
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);