diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-09-19 16:24:12 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:06:58 -0500 |
commit | 727386327c8e2e40f9cc590882ac64020828480b (patch) | |
tree | d8788e8f748a4ff597bc53528410db5027e3835f /source4/torture | |
parent | a75ba7c53d28ab2182d70377837d7b9dd8682997 (diff) | |
download | samba-727386327c8e2e40f9cc590882ac64020828480b.tar.gz samba-727386327c8e2e40f9cc590882ac64020828480b.tar.bz2 samba-727386327c8e2e40f9cc590882ac64020828480b.zip |
r25235: add simple WINBIND-STRUCT-GETDCNAME test
metze
(This used to be commit 2abd86f520a74662f8fe0d10b72484459c3d74a9)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/winbind/struct_based.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index 5ecc5c99da..f8cddf589c 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -18,9 +18,11 @@ */ #include "includes.h" +#include "pstring.h" #include "torture/torture.h" #include "torture/winbind/proto.h" #include "nsswitch/winbind_client.h" +#include "param/param.h" #define DO_STRUCT_REQ_REP(op,req,rep) do { \ NSS_STATUS _result; \ @@ -51,11 +53,31 @@ static bool torture_winbind_struct_ping(struct torture_context *torture) return true; } +static bool torture_winbind_struct_getdcname(struct torture_context *torture) +{ + struct winbindd_request req; + struct winbindd_response rep; + + ZERO_STRUCT(req); + ZERO_STRUCT(rep); + + fstrcpy(req.domain_name, lp_workgroup()); + + DO_STRUCT_REQ_REP(WINBINDD_GETDCNAME, &req, &rep); + + /* + * TODO: test all trusted domains + */ + + return true; +} + 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, "PING", torture_winbind_struct_ping); + torture_suite_add_simple_test(suite, "GETDCNAME", torture_winbind_struct_getdcname); suite->description = talloc_strdup(suite, "WINBIND - struct based protocol tests"); |