svn commit: samba r25235 - in branches/SAMBA_4_0/source/torture/winbind: .

metze at samba.org metze at samba.org
Wed Sep 19 16:24:12 GMT 2007


Author: metze
Date: 2007-09-19 16:24:12 +0000 (Wed, 19 Sep 2007)
New Revision: 25235

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25235

Log:
add simple WINBIND-STRUCT-GETDCNAME test

metze
Modified:
   branches/SAMBA_4_0/source/torture/winbind/struct_based.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c
===================================================================
--- branches/SAMBA_4_0/source/torture/winbind/struct_based.c	2007-09-19 16:22:19 UTC (rev 25234)
+++ branches/SAMBA_4_0/source/torture/winbind/struct_based.c	2007-09-19 16:24:12 UTC (rev 25235)
@@ -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 @@
 	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");
 



More information about the samba-cvs mailing list