[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Tue Mar 16 03:43:51 MDT 2010


The branch, master has been updated
       via  4379b08... s3-spoolss: be very strict on OpenPrinter{Ex} failures for bad names.
      from  d7de3fa... s4:dsdb - fix up warnings

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4379b082b80e4976120860310259248eea09f863
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 16 00:01:16 2010 +0100

    s3-spoolss: be very strict on OpenPrinter{Ex} failures for bad names.
    
    Guenther

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

Summary of changes:
 source4/torture/rpc/spoolss.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 728ecd1..7ce0a7c 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -4047,10 +4047,8 @@ static bool test_OpenPrinter_badname(struct torture_context *tctx,
 
 	status = dcerpc_spoolss_OpenPrinter(p, tctx, &op);
 	torture_assert_ntstatus_ok(tctx, status, "OpenPrinter failed");
-	if (!W_ERROR_EQUAL(WERR_INVALID_PRINTER_NAME,op.out.result)) {
-		torture_comment(tctx, "OpenPrinter(%s) unexpected result[%s] should be WERR_INVALID_PRINTER_NAME\n",
-			name, win_errstr(op.out.result));
-	}
+	torture_assert_werr_equal(tctx, op.out.result, WERR_INVALID_PRINTER_NAME,
+		"unexpected result");
 
 	if (W_ERROR_IS_OK(op.out.result)) {
 		ret &=test_ClosePrinter(tctx, p, &handle);
@@ -4068,10 +4066,8 @@ static bool test_OpenPrinter_badname(struct torture_context *tctx,
 
 	status = dcerpc_spoolss_OpenPrinterEx(p, tctx, &opEx);
 	torture_assert_ntstatus_ok(tctx, status, "OpenPrinterEx failed");
-	if (!W_ERROR_EQUAL(WERR_INVALID_PARAM,opEx.out.result)) {
-		torture_comment(tctx, "OpenPrinterEx(%s) unexpected result[%s] should be WERR_INVALID_PARAM\n",
-			name, win_errstr(opEx.out.result));
-	}
+	torture_assert_werr_equal(tctx, opEx.out.result, WERR_INVALID_PARAM,
+		"unexpected result");
 
 	if (W_ERROR_IS_OK(opEx.out.result)) {
 		ret &=test_ClosePrinter(tctx, p, &handle);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list