svn commit: samba r5498 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc

metze at samba.org metze at samba.org
Tue Feb 22 08:04:53 GMT 2005


Author: metze
Date: 2005-02-22 08:04:52 +0000 (Tue, 22 Feb 2005)
New Revision: 5498

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

Log:
fix OpenPrinter() idl and torture test

metze

Modified:
   branches/SAMBA_4_0/source/librpc/idl/spoolss.idl
   branches/SAMBA_4_0/source/torture/rpc/spoolss.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/spoolss.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/spoolss.idl	2005-02-22 05:11:37 UTC (rev 5497)
+++ branches/SAMBA_4_0/source/librpc/idl/spoolss.idl	2005-02-22 08:04:52 UTC (rev 5498)
@@ -187,12 +187,21 @@
 
 	/******************/
 	/* Function: 0x01 */
+	typedef struct {
+		uint32 foo;
+	} spoolss_Devmode;
+
+	typedef struct {
+		uint32 size;
+		spoolss_Devmode *devmode;
+	} spoolss_DevmodeContainer;
+
 	WERROR spoolss_OpenPrinter(
-		[in] unistr *server,
-		[in] unistr *printer,
-		[in] DATA_BLOB *buffer,
+		[in] unistr *printername,
+		[in] unistr *datatype,
+		[in] spoolss_DevmodeContainer devmode_ctr,
 		[in] uint32 access_mask,
-		[out,ref]   policy_handle *handle
+		[out,ref] policy_handle *handle
 	);
 
 	/******************/
@@ -736,16 +745,7 @@
 	);
 
 	typedef struct {
-		uint32 foo;
-	} spoolss_Devmode;
-
-	typedef struct {
 		uint32 size;
-		spoolss_Devmode *devmode;
-	} spoolss_DevmodeContainer;
-
-	typedef struct {
-		uint32 size;
 		unistr *client;
 		unistr *user;
 		uint32 build;

Modified: branches/SAMBA_4_0/source/torture/rpc/spoolss.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/spoolss.c	2005-02-22 05:11:37 UTC (rev 5497)
+++ branches/SAMBA_4_0/source/torture/rpc/spoolss.c	2005-02-22 08:04:52 UTC (rev 5498)
@@ -646,19 +646,17 @@
 	NTSTATUS status;
 	struct spoolss_OpenPrinter r;
 	struct policy_handle handle;
-	DATA_BLOB blob;
 	BOOL ret = True;
 
-	blob = data_blob(NULL, 0);
+	r.in.printername	= talloc_asprintf(mem_ctx, "\\\\%s\\%s", dcerpc_server_name(p), name);
+	r.in.datatype		= NULL;
+	r.in.devmode_ctr.size	= 0;
+	r.in.devmode_ctr.devmode= NULL;
+	r.in.access_mask	= SEC_FLAG_MAXIMUM_ALLOWED;
+	r.out.handle		= &handle;
 
-	r.in.server = talloc_asprintf(mem_ctx, "\\\\%s\\%s", dcerpc_server_name(p), name);
-	r.in.printer = NULL;
-	r.in.buffer = &blob;
-	r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;	
-	r.out.handle = &handle;
+	printf("\nTesting OpenPrinter(%s)\n", r.in.printername);
 
-	printf("\nTesting OpenPrinter(%s)\n", r.in.server);
-
 	status = dcerpc_spoolss_OpenPrinter(p, mem_ctx, &r);
 	if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
 		printf("OpenPrinter failed - %s/%s\n", 
@@ -667,7 +665,6 @@
 		return True;
 	}
 
-
 	if (!test_GetPrinter(p, mem_ctx, &handle)) {
 		ret = False;
 	}
@@ -679,7 +676,7 @@
 	if (!test_ClosePrinter(p, mem_ctx, &handle)) {
 		ret = False;
 	}
-	
+
 	return ret;
 }
 



More information about the samba-cvs mailing list