summaryrefslogtreecommitdiff
path: root/source4/torture/winbind
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-21 11:43:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:05 -0500
commit7ae4b79e94833229459e5903e11e6c3effc85ace (patch)
treebb228abd166f8c360d408560bd417c0f1be8edd2 /source4/torture/winbind
parent3e9d7c4db396482f30cf6291239a6d6b764d963c (diff)
downloadsamba-7ae4b79e94833229459e5903e11e6c3effc85ace.tar.gz
samba-7ae4b79e94833229459e5903e11e6c3effc85ace.tar.bz2
samba-7ae4b79e94833229459e5903e11e6c3effc85ace.zip
r25283: add WINBIND-STRUCT-NETBIOS_NAME test.
this may needs --option="torture:winbindd netbios name=FOO" metze (This used to be commit e67df9b8de4f3c9abc5ddfdad91e2682ddd40e45)
Diffstat (limited to 'source4/torture/winbind')
-rw-r--r--source4/torture/winbind/struct_based.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index 4afb3b76be..a49d8e5d87 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -97,6 +97,30 @@ static bool torture_winbind_struct_ping(struct torture_context *torture)
return true;
}
+static bool torture_winbind_struct_netbios_name(struct torture_context *torture)
+{
+ struct winbindd_request req;
+ struct winbindd_response rep;
+ const char *expected;
+
+ ZERO_STRUCT(req);
+ ZERO_STRUCT(rep);
+
+ torture_comment(torture, "Running WINBINDD_NETBIOS_NAME (struct based)\n");
+
+ DO_STRUCT_REQ_REP(WINBINDD_NETBIOS_NAME, &req, &rep);
+
+ expected = torture_setting_string(torture,
+ "winbindd netbios name",
+ lp_netbios_name());
+
+ torture_assert_str_equal(torture,
+ rep.data.netbios_name, expected,
+ "winbindd's netbios name doesn't match");
+
+ return true;
+}
+
struct torture_trust_domain {
const char *netbios_name;
const char *dns_name;
@@ -280,6 +304,7 @@ struct torture_suite *torture_winbind_struct_init(void)
torture_suite_add_simple_test(suite, "INTERFACE_VERSION", torture_winbind_struct_interface_version);
torture_suite_add_simple_test(suite, "PING", torture_winbind_struct_ping);
+ torture_suite_add_simple_test(suite, "NETBIOS_NAME", torture_winbind_struct_netbios_name);
torture_suite_add_simple_test(suite, "LIST_TRUSTDOM", torture_winbind_struct_list_trustdom);
torture_suite_add_simple_test(suite, "GETDCNAME", torture_winbind_struct_getdcname);