summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-09-21 11:30:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:05 -0500
commit3e9d7c4db396482f30cf6291239a6d6b764d963c (patch)
tree51c47dcd968fe04469fd8746b5b29c46fb0ae2d9 /source4
parentfc9262d57cfa2b912e7a81bb6499b3d9af22865d (diff)
downloadsamba-3e9d7c4db396482f30cf6291239a6d6b764d963c.tar.gz
samba-3e9d7c4db396482f30cf6291239a6d6b764d963c.tar.bz2
samba-3e9d7c4db396482f30cf6291239a6d6b764d963c.zip
r25282: add WINBIND-STRUCT-INTERFACE_VERSION test
metze (This used to be commit d610281cc11351fdc4ed0e4242341530fe56c5bf)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/winbind/struct_based.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c
index 9cc7432816..4afb3b76be 100644
--- a/source4/torture/winbind/struct_based.c
+++ b/source4/torture/winbind/struct_based.c
@@ -55,6 +55,26 @@
DO_STRUCT_REQ_REP_EXT(op,req,rep,NSS_STATUS_SUCCESS,true,__noop=true,NULL); \
} while (0)
+static bool torture_winbind_struct_interface_version(struct torture_context *torture)
+{
+ struct winbindd_request req;
+ struct winbindd_response rep;
+
+ ZERO_STRUCT(req);
+ ZERO_STRUCT(rep);
+
+ torture_comment(torture, "Running WINBINDD_INTERFACE_VERSION (struct based)\n");
+
+ DO_STRUCT_REQ_REP(WINBINDD_INTERFACE_VERSION, &req, &rep);
+
+ torture_assert_int_equal(torture,
+ rep.data.interface_version,
+ WINBIND_INTERFACE_VERSION,
+ "winbind server and client doesn't match");
+
+ return true;
+}
+
static bool torture_winbind_struct_ping(struct torture_context *torture)
{
struct timeval tv = timeval_current();
@@ -258,6 +278,7 @@ struct torture_suite *torture_winbind_struct_init(void)
{
struct torture_suite *suite = torture_suite_create(talloc_autofree_context(), "STRUCT");
+ 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, "LIST_TRUSTDOM", torture_winbind_struct_list_trustdom);
torture_suite_add_simple_test(suite, "GETDCNAME", torture_winbind_struct_getdcname);