[SCM] Samba Shared Repository - branch v3-6-test updated

Günther Deschner gd at samba.org
Thu Sep 30 11:48:07 MDT 2010


The branch, v3-6-test has been updated
       via  12f6df2 s4-smbtorture: add new EnumPrinters test to test printername/servername behaviour in EnumPrinter and GetPrinter calls.
       via  574d943 s4-smbtorture: rework spoolss_EnumPrintProcDataTypes test.
       via  5bed864 s4-smbtorture: rework test_EnumPrintProcessors to let it test more combinations.
       via  68c81c7 s4-smbtorture: remove unneeded dcerpc_mgmt alias.
       via  848b6d8 s4-smbtorture: print out membership in RPC-SPOOLSS-ACCESS.
      from  6e5b496 s3: Add "smbcontrol winbindd ip-dropped <local-ip>"

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 12f6df2b4a7e6a977b4dbcbf5be1847d47226491
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 29 04:49:57 2010 +0200

    s4-smbtorture: add new EnumPrinters test to test printername/servername
    behaviour in EnumPrinter and GetPrinter calls.
    
    Guenther
    (cherry picked from commit 156ab4ec104adf20257b2ef1e361382eac457ee3)

commit 574d9431c777fe2bc936119fbfb115f980230790
Author: Günther Deschner <gd at samba.org>
Date:   Tue Sep 28 00:10:31 2010 +0200

    s4-smbtorture: rework spoolss_EnumPrintProcDataTypes test.
    
    Guenther
    (cherry picked from commit 93d7230d25427af2955a9209335f657b8a901860)

commit 5bed864bf2ae3fbf6c9e9bce50f910472a9b1347
Author: Günther Deschner <gd at samba.org>
Date:   Mon Sep 27 23:33:52 2010 +0200

    s4-smbtorture: rework test_EnumPrintProcessors to let it test more combinations.
    
    Guenther
    (cherry picked from commit a335848a883d98247470b0beb1eed14afec802de)

commit 68c81c7e1a556d4d029f83d02037d0a1ff8e4c08
Author: Günther Deschner <gd at samba.org>
Date:   Mon Sep 27 06:57:36 2010 +0200

    s4-smbtorture: remove unneeded dcerpc_mgmt alias.
    
    Guenther
    (cherry picked from commit d834671f68e1bc0817d8151cd6cc065851263075)

commit 848b6d82d2f54a8292d1db0f8856edceb6c96166
Author: Günther Deschner <gd at samba.org>
Date:   Wed Sep 22 11:04:38 2010 -0700

    s4-smbtorture: print out membership in RPC-SPOOLSS-ACCESS.
    
    Guenther
    (cherry picked from commit a1ced101969e7613bc9e1a83c087dbe56c378abe)

-----------------------------------------------------------------------

Summary of changes:
 source4/torture/drs/wscript_build    |    2 +-
 source4/torture/rpc/spoolss.c        |  373 +++++++++++++++++++++++++++-------
 source4/torture/rpc/spoolss_access.c |    7 +
 source4/torture/wscript_build        |    2 +-
 source4/wscript_build                |    1 -
 5 files changed, 306 insertions(+), 79 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/drs/wscript_build b/source4/torture/drs/wscript_build
index cd7e3af..7bab5df 100644
--- a/source4/torture/drs/wscript_build
+++ b/source4/torture/drs/wscript_build
@@ -5,7 +5,7 @@ bld.SAMBA_MODULE('TORTURE_DRS',
 	autoproto='proto.h',
 	subsystem='smbtorture',
 	init_function='torture_drs_init',
-	deps='NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER LIBSAMBA-NET LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP dcerpc_server service process_model ntvfs SERVICE_SMB RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_LDB_MODULE',
+	deps='NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL RPC_NDR_NETLOGON dcerpc_atsvc RPC_NDR_DRSUAPI RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER LIBSAMBA-NET LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_UTIL TORTURE_RAP dcerpc_server service process_model ntvfs SERVICE_SMB RPC_NDR_BROWSER LIBCLI_DRSUAPI TORTURE_LDB_MODULE',
 	internal_module=True
 	)
 
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index c1079af..99f2376 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -820,7 +820,8 @@ static bool test_EnumPrintProcessors_level(struct torture_context *tctx,
 					   const char *environment,
 					   uint32_t level,
 					   uint32_t *count_p,
-					   union spoolss_PrintProcessorInfo **info_p)
+					   union spoolss_PrintProcessorInfo **info_p,
+					   WERROR expected_result)
 {
 	struct spoolss_EnumPrintProcessors r;
 	DATA_BLOB blob;
@@ -837,7 +838,8 @@ static bool test_EnumPrintProcessors_level(struct torture_context *tctx,
 	r.out.count = &count;
 	r.out.info = &info;
 
-	torture_comment(tctx, "Testing EnumPrintProcessors level %u\n", r.in.level);
+	torture_comment(tctx, "Testing EnumPrintProcessors(%s) level %u\n",
+		r.in.environment, r.in.level);
 
 	torture_assert_ntstatus_ok(tctx,
 		dcerpc_spoolss_EnumPrintProcessors_r(b, tctx, &r),
@@ -850,7 +852,7 @@ static bool test_EnumPrintProcessors_level(struct torture_context *tctx,
 			dcerpc_spoolss_EnumPrintProcessors_r(b, tctx, &r),
 			"EnumPrintProcessors failed");
 	}
-	torture_assert_werr_ok(tctx, r.out.result,
+	torture_assert_werr_equal(tctx, r.out.result, expected_result,
 		"EnumPrintProcessors failed");
 
 	CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessors, info, level, count, needed, 4);
@@ -871,44 +873,76 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx,
 	struct test_spoolss_context *ctx =
 		talloc_get_type_abort(private_data, struct test_spoolss_context);
 
-	uint16_t levels[] = { 1 };
-	int i, j;
+	uint16_t levels[] = {0, 1, 2, 3, 32, 256 };
+	uint16_t     ok[] = {0, 1, 0, 0, 0, 0 };
+	int i;
 	struct dcerpc_pipe *p = ctx->spoolss_pipe;
 	struct dcerpc_binding_handle *b = p->binding_handle;
 
+	torture_assert(tctx,
+		test_EnumPrintProcessors_level(tctx, b, "phantasy", 1, NULL, NULL, WERR_INVALID_ENVIRONMENT),
+		"test_EnumPrintProcessors_level failed");
+
 	for (i=0;i<ARRAY_SIZE(levels);i++) {
-		int level = levels[i];
 		union spoolss_PrintProcessorInfo *info;
 		uint32_t count;
+		WERROR expected_result = ok[i] ? WERR_OK : WERR_INVALID_LEVEL;
 
 		torture_assert(tctx,
-			test_EnumPrintProcessors_level(tctx, b, ctx->environment, level, &count, &info),
+			test_EnumPrintProcessors_level(tctx, b, ctx->environment, levels[i], &count, &info, expected_result),
 			"test_EnumPrintProcessors_level failed");
-
-		ctx->print_processor_count[level]	= count;
-		ctx->print_processors[level]		= info;
 	}
 
-	for (i=1;i<ARRAY_SIZE(levels);i++) {
-		int level = levels[i];
-		int old_level = levels[i-1];
-		torture_assert_int_equal(tctx, ctx->print_processor_count[level], ctx->print_processor_count[old_level],
-			"EnumPrintProcessors failed");
+	return true;
+}
+
+static bool test_EnumPrintProcDataTypes_level(struct torture_context *tctx,
+					      struct dcerpc_binding_handle *b,
+					      const char *print_processor_name,
+					      uint32_t level,
+					      uint32_t *count_p,
+					      union spoolss_PrintProcDataTypesInfo **info_p,
+					      WERROR expected_result)
+{
+	struct spoolss_EnumPrintProcDataTypes r;
+	DATA_BLOB blob;
+	uint32_t needed;
+	uint32_t count;
+	union spoolss_PrintProcDataTypesInfo *info;
+
+	r.in.servername = "";
+	r.in.print_processor_name = print_processor_name;
+	r.in.level = level;
+	r.in.buffer = NULL;
+	r.in.offered = 0;
+	r.out.needed = &needed;
+	r.out.count = &count;
+	r.out.info = &info;
+
+	torture_comment(tctx, "Testing EnumPrintProcDataTypes(%s) level %u\n",
+		r.in.print_processor_name, r.in.level);
+
+	torture_assert_ntstatus_ok(tctx,
+		dcerpc_spoolss_EnumPrintProcDataTypes_r(b, tctx, &r),
+		"EnumPrintProcDataTypes failed");
+	if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
+		blob = data_blob_talloc_zero(tctx, needed);
+		r.in.buffer = &blob;
+		r.in.offered = needed;
+		torture_assert_ntstatus_ok(tctx,
+			dcerpc_spoolss_EnumPrintProcDataTypes_r(b, tctx, &r),
+			"EnumPrintProcDataTypes failed");
 	}
+	torture_assert_werr_equal(tctx, r.out.result, expected_result,
+		"EnumPrintProcDataTypes failed");
 
-	for (i=0;i<ARRAY_SIZE(levels);i++) {
-		int level = levels[i];
-		for (j=0;j<ctx->print_processor_count[level];j++) {
-#if 0
-			union spoolss_PrintProcessorInfo *cur = &ctx->print_processors[level][j];
-			union spoolss_PrintProcessorInfo *ref = &ctx->print_processors[1][j];
-#endif
-			switch (level) {
-			case 1:
-				/* level 1 is our reference, and it makes no sense to compare it to itself */
-				break;
-			}
-		}
+	CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes, info, level, count, needed, 4);
+
+	if (count_p) {
+		*count_p = count;
+	}
+	if (info_p) {
+		*info_p = info;
 	}
 
 	return true;
@@ -920,57 +954,50 @@ static bool test_EnumPrintProcDataTypes(struct torture_context *tctx,
 	struct test_spoolss_context *ctx =
 		talloc_get_type_abort(private_data, struct test_spoolss_context);
 
-	NTSTATUS status;
-	struct spoolss_EnumPrintProcDataTypes r;
-	uint16_t levels[] = { 1 };
+	uint16_t levels[] = {0, 1, 2, 3, 32, 256 };
+	uint16_t     ok[] = {0, 1, 0, 0, 0, 0 };
 	int i;
 	struct dcerpc_pipe *p = ctx->spoolss_pipe;
 	struct dcerpc_binding_handle *b = p->binding_handle;
 
+	torture_assert(tctx,
+		test_EnumPrintProcDataTypes_level(tctx, b, NULL, 1, NULL, NULL, WERR_UNKNOWN_PRINTPROCESSOR),
+		"test_EnumPrintProcDataTypes_level failed");
+
+	torture_assert(tctx,
+		test_EnumPrintProcDataTypes_level(tctx, b, "nonexisting", 1, NULL, NULL, WERR_UNKNOWN_PRINTPROCESSOR),
+		"test_EnumPrintProcDataTypes_level failed");
+
 	for (i=0;i<ARRAY_SIZE(levels);i++) {
 		int level = levels[i];
-		DATA_BLOB blob;
-		uint32_t needed;
 		uint32_t count;
 		union spoolss_PrintProcDataTypesInfo *info;
+		WERROR expected_result = ok[i] ? WERR_OK : WERR_INVALID_LEVEL;
 
-		r.in.servername = "";
-		r.in.print_processor_name = "winprint";
-		r.in.level = level;
-		r.in.buffer = NULL;
-		r.in.offered = 0;
-		r.out.needed = &needed;
-		r.out.count = &count;
-		r.out.info = &info;
-
-		torture_comment(tctx, "Testing EnumPrintProcDataTypes level %u\n", r.in.level);
-
-		status = dcerpc_spoolss_EnumPrintProcDataTypes_r(b, tctx, &r);
-		torture_assert_ntstatus_ok(tctx, status, "dcerpc_spoolss_EnumPrintProcDataType failed");
-		if (W_ERROR_IS_OK(r.out.result)) {
-			/* TODO: do some more checks here */
-			continue;
-		}
-		torture_assert_werr_equal(tctx, r.out.result, WERR_INSUFFICIENT_BUFFER,
-			"EnumPrintProcDataTypes unexpected return code");
-
-		blob = data_blob_talloc_zero(tctx, needed);
-		r.in.buffer = &blob;
-		r.in.offered = needed;
-
-		status = dcerpc_spoolss_EnumPrintProcDataTypes_r(b, tctx, &r);
-		torture_assert_ntstatus_ok(tctx, status, "dcerpc_spoolss_EnumPrintProcDataTypes failed");
+		torture_assert(tctx,
+			test_EnumPrintProcDataTypes_level(tctx, b, "winprint", level, &count, &info, expected_result),
+			"test_EnumPrintProcDataTypes_level failed");
+	}
 
-		torture_assert_werr_ok(tctx, r.out.result, "EnumPrintProcDataTypes failed");
+	{
+		union spoolss_PrintProcessorInfo *info;
+		uint32_t count;
 
-		CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes, info, r.in.level, count, needed, 4);
+		torture_assert(tctx,
+			test_EnumPrintProcessors_level(tctx, b, ctx->environment, 1, &count, &info, WERR_OK),
+			"test_EnumPrintProcessors_level failed");
 
+		for (i=0; i < count; i++) {
+			torture_assert(tctx,
+				test_EnumPrintProcDataTypes_level(tctx, b, info[i].info1.print_processor_name, 1, NULL, NULL, WERR_OK),
+				"test_EnumPrintProcDataTypes_level failed");
+		}
 	}
 
+
 	return true;
 }
 
-
 static bool test_EnumPrinters(struct torture_context *tctx,
 			      void *private_data)
 {
@@ -4424,7 +4451,7 @@ static bool test_PrintProcessors(struct torture_context *tctx,
 	torture_comment(tctx, "Testing Print Processor Info and winreg consistency\n");
 
 	torture_assert(tctx,
-		test_EnumPrintProcessors_level(tctx, b, environment, 1, &count, &info),
+		test_EnumPrintProcessors_level(tctx, b, environment, 1, &count, &info, WERR_OK),
 		"failed to enum print processors level 1");
 
 	for (i=0; i < count; i++) {
@@ -5722,14 +5749,7 @@ static bool call_OpenPrinterEx(struct torture_context *tctx,
 	NTSTATUS status;
 	struct dcerpc_binding_handle *b = p->binding_handle;
 
-	if (name && name[0]) {
-		r.in.printername = talloc_asprintf(tctx, "\\\\%s\\%s",
-						   dcerpc_server_name(p), name);
-	} else {
-		r.in.printername = talloc_asprintf(tctx, "\\\\%s",
-						   dcerpc_server_name(p));
-	}
-
+	r.in.printername = name;
 	r.in.datatype		= NULL;
 	r.in.devmode_ctr.devmode= devmode;
 	r.in.access_mask	= SEC_FLAG_MAXIMUM_ALLOWED;
@@ -5839,11 +5859,7 @@ static bool test_printer_rename(struct torture_context *tctx,
 		test_GetPrinter_level(tctx, b, &new_handle, 2, &info),
 		"failed to call GetPrinter level 2");
 
-	/* FIXME: we openend with servername! */
-	printer_name = talloc_asprintf(tctx, "\\\\%s\\%s",
-		dcerpc_server_name(p), printer_name_new);
-
-	torture_assert_str_equal(tctx, info.info2.printername, printer_name,
+	torture_assert_str_equal(tctx, info.info2.printername, printer_name_new,
 		"new printer name was not set");
 
 	torture_assert(tctx,
@@ -6023,6 +6039,210 @@ static bool test_EnumPrinters_old(struct torture_context *tctx,
 	return ret;
 }
 
+static bool test_EnumPrinters_level(struct torture_context *tctx,
+				    struct dcerpc_binding_handle *b,
+				    uint32_t flags,
+				    const char *servername,
+				    uint32_t level,
+				    uint32_t *count_p,
+				    union spoolss_PrinterInfo **info_p)
+{
+	struct spoolss_EnumPrinters r;
+	union spoolss_PrinterInfo *info;
+	uint32_t needed;
+	uint32_t count;
+
+	r.in.flags	= flags;
+	r.in.server	= servername;
+	r.in.level	= level;
+	r.in.buffer	= NULL;
+	r.in.offered	= 0;
+	r.out.needed	= &needed;
+	r.out.count	= &count;
+	r.out.info	= &info;
+
+	torture_comment(tctx, "Testing EnumPrinters(%s) level %u\n",
+		r.in.server, r.in.level);
+
+	torture_assert_ntstatus_ok(tctx,
+		dcerpc_spoolss_EnumPrinters_r(b, tctx, &r),
+		"EnumPrinters failed");
+	if (W_ERROR_EQUAL(r.out.result, WERR_INSUFFICIENT_BUFFER)) {
+		DATA_BLOB blob = data_blob_talloc_zero(tctx, needed);
+		r.in.buffer = &blob;
+		r.in.offered = needed;
+		torture_assert_ntstatus_ok(tctx,
+			dcerpc_spoolss_EnumPrinters_r(b, tctx, &r),
+			"EnumPrinters failed");
+	}
+
+	torture_assert_werr_ok(tctx, r.out.result, "EnumPrinters failed");
+
+	CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, needed, 4);
+
+	if (count_p) {
+		*count_p = count;
+	}
+	if (info_p) {
+		*info_p = info;
+	}
+
+	return true;
+}
+
+static const char *get_short_printername(struct torture_context *tctx,
+					 const char *name)
+{
+	const char *short_name;
+
+	if (name[0] == '\\' && name[1] == '\\') {
+		name += 2;
+		short_name = strchr(name, '\\');
+		if (short_name) {
+			return talloc_strdup(tctx, short_name+1);
+		}
+	}
+
+	return name;
+}
+
+static const char *get_full_printername(struct torture_context *tctx,
+					const char *name)
+{
+	const char *full_name = talloc_strdup(tctx, name);
+	char *p;
+
+	if (name && name[0] == '\\' && name[1] == '\\') {
+		name += 2;
+		p = strchr(name, '\\');
+		if (p) {
+			return full_name;
+		}
+	}
+
+	return NULL;
+}
+
+static bool test_OnePrinter_servername(struct torture_context *tctx,
+				       struct dcerpc_pipe *p,
+				       struct dcerpc_binding_handle *b,
+				       const char *servername,
+				       const char *printername)
+{
+	union spoolss_PrinterInfo info;
+	const char *short_name = get_short_printername(tctx, printername);
+	const char *full_name = get_full_printername(tctx, printername);
+
+	if (short_name) {
+		struct policy_handle handle;
+		torture_assert(tctx,
+			call_OpenPrinterEx(tctx, p, short_name, NULL, &handle),
+			"failed to open printer");
+
+		torture_assert(tctx,
+			test_GetPrinter_level(tctx, b, &handle, 2, &info),
+			"failed to get printer info");
+
+		torture_assert_casestr_equal(tctx, info.info2.servername, NULL,
+			"unexpected servername");
+		torture_assert_casestr_equal(tctx, info.info2.printername, short_name,
+			"unexpected printername");
+
+		if (info.info2.devmode) {
+			const char *expected_devicename;
+			expected_devicename = talloc_strndup(tctx, short_name, MIN(strlen(short_name), 31));
+			torture_assert_casestr_equal(tctx, info.info2.devmode->devicename, expected_devicename,
+				"unexpected devicemode devicename");
+		}
+
+		torture_assert(tctx,
+			test_ClosePrinter(tctx, b, &handle),
+			"failed to close printer");
+	}
+
+	if (full_name) {
+		struct policy_handle handle;
+
+		torture_assert(tctx,
+			call_OpenPrinterEx(tctx, p, full_name, NULL, &handle),
+			"failed to open printer");
+
+		torture_assert(tctx,
+			test_GetPrinter_level(tctx, b, &handle, 2, &info),
+			"failed to get printer info");
+
+		torture_assert_casestr_equal(tctx, info.info2.servername, servername,
+			"unexpected servername");
+		torture_assert_casestr_equal(tctx, info.info2.printername, full_name,
+			"unexpected printername");
+
+		if (info.info2.devmode) {
+			const char *expected_devicename;
+			expected_devicename = talloc_strndup(tctx, full_name, MIN(strlen(full_name), 31));
+			torture_assert_casestr_equal(tctx, info.info2.devmode->devicename, expected_devicename,
+				"unexpected devicemode devicename");
+		}
+
+		torture_assert(tctx,
+			test_ClosePrinter(tctx, b, &handle),
+			"failed to close printer");
+	}
+
+	return true;
+}
+
+static bool test_EnumPrinters_servername(struct torture_context *tctx,
+					 void *private_data)
+{
+	struct test_spoolss_context *ctx =
+		talloc_get_type_abort(private_data, struct test_spoolss_context);
+	int i;
+	struct dcerpc_pipe *p = ctx->spoolss_pipe;
+	struct dcerpc_binding_handle *b = p->binding_handle;
+	uint32_t count;
+	union spoolss_PrinterInfo *info;
+	const char *servername;
+	uint32_t flags = PRINTER_ENUM_NAME|PRINTER_ENUM_LOCAL;
+
+	torture_comment(tctx, "Testing servername behaviour in EnumPrinters and GetPrinters\n");
+
+	servername = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
+
+	torture_assert(tctx,
+		test_EnumPrinters_level(tctx, b, flags, servername, 2, &count, &info),
+		"failed to enumerate printers");
+
+	for (i=0; i < count; i++) {
+
+		torture_assert_casestr_equal(tctx, info[i].info2.servername, servername,
+			"unexpected servername");
+
+		torture_assert(tctx,
+			test_OnePrinter_servername(tctx, p, b, servername, info[i].info2.printername),
+			"failed to check printer");
+	}
+
+	servername = "";
+
+	torture_assert(tctx,
+		test_EnumPrinters_level(tctx, b, flags, servername, 2, &count, &info),
+		"failed to enumerate printers");
+
+	for (i=0; i < count; i++) {
+
+		torture_assert_casestr_equal(tctx, info[i].info2.servername, NULL,
+			"unexpected servername");
+
+		torture_assert(tctx,
+			test_OnePrinter_servername(tctx, p, b, servername, info[i].info2.printername),
+			"failed to check printer");
+	}
+
+
+	return true;
+}
+
+
 static bool test_GetPrinterDriver(struct torture_context *tctx,
 				  struct dcerpc_binding_handle *b,
 				  struct policy_handle *handle,
@@ -7482,6 +7702,7 @@ struct torture_suite *torture_rpc_spoolss(TALLOC_CTX *mem_ctx)
 	torture_tcase_add_simple_test(tcase, "enum_printers", test_EnumPrinters);
 	torture_tcase_add_simple_test(tcase, "enum_ports_old", test_EnumPorts_old);
 	torture_tcase_add_simple_test(tcase, "enum_printers_old", test_EnumPrinters_old);
+	torture_tcase_add_simple_test(tcase, "enum_printers_servername", test_EnumPrinters_servername);
 	torture_tcase_add_simple_test(tcase, "enum_printer_drivers_old", test_EnumPrinterDrivers_old);
 	torture_tcase_add_simple_test(tcase, "architecture_buffer", test_architecture_buffer);
 
diff --git a/source4/torture/rpc/spoolss_access.c b/source4/torture/rpc/spoolss_access.c
index 08d1375..fb927fb 100644
--- a/source4/torture/rpc/spoolss_access.c
+++ b/source4/torture/rpc/spoolss_access.c
@@ -144,6 +144,13 @@ static bool spoolss_access_setup_membership(struct torture_context *tctx,
 	struct policy_handle connect_handle, domain_handle;
 	int i;
 
+	torture_comment(tctx,
+		"Setting up BUILTIN membership for %s\n",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list