[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at samba.org
Thu Jan 17 10:54:02 MST 2013


The branch, master has been updated
       via  79fa78e s3-spoolss: use configurable spoolss architecture in compose_spoolss_server_path().
       via  3b94b64 spoolss: make spoolss deal with ndr64 SetForm by using proper container object.
       via  8304fe7 spoolss: make spoolss deal with ndr64 AddForm by using proper container object.
       via  be8c81b s4-torture: add ndr64 spoolss_SetPrinter ndr test.
       via  e8feca0 spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.
      from  e1d50a6 dsdb-operational: Avoid doing the ldb_attr_cmp if bypass flag is not set

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


- Log -----------------------------------------------------------------
commit 79fa78e2851009bc992d5b1bb447cb91d8b68900
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jan 17 16:09:15 2013 +0100

    s3-spoolss: use configurable spoolss architecture in compose_spoolss_server_path().
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Thu Jan 17 18:53:47 CET 2013 on sn-devel-104

commit 3b94b64481a811482dbd01fd55c145a89f2c8c96
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 16 13:41:28 2013 +0100

    spoolss: make spoolss deal with ndr64 SetForm by using proper container object.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 8304fe73f69ea7de57bd2d331038c4664553a9bd
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 16 01:15:49 2013 +0100

    spoolss: make spoolss deal with ndr64 AddForm by using proper container object.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit be8c81bfa3c6a2727eab589a71c6215ca76e3d3a
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 16 00:06:03 2013 +0100

    s4-torture: add ndr64 spoolss_SetPrinter ndr test.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit e8feca012e7b2ff29de58cef80c7511f33989a84
Author: Günther Deschner <gd at samba.org>
Date:   Wed Jan 16 00:04:41 2013 +0100

    spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.
    
    Guenther
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

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

Summary of changes:
 librpc/idl/spoolss.idl                      |   31 ++++++-----
 source3/printing/nt_printing_migrate.c      |    2 -
 source3/rpc_client/init_spoolss.c           |    4 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c |   28 +++++++++-
 source3/rpcclient/cmd_spoolss.c             |   24 ++++----
 source3/utils/net_rpc_printer.c             |    9 ++--
 source4/ntptr/simple_ldb/ntptr_simple_ldb.c |   48 +++++++++---------
 source4/torture/ndr/spoolss.c               |   73 +++++++++++++++++++++++++++
 source4/torture/rpc/spoolss.c               |   32 +++++++-----
 source4/torture/rpc/spoolss_notify.c        |    4 +-
 10 files changed, 178 insertions(+), 77 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 7d8e8de..29aee27 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1011,9 +1011,9 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[string,charset(UTF16)] uint16 *print_processor;
 		[string,charset(UTF16)] uint16 *parameters;
 		[string,charset(UTF16)] uint16 *driver_name;
-		uint32 _devmode_ptr; /* pointer to truncated devicemode */
+		uint32 *_devmode_ptr; /* pointer to truncated devicemode */
 		[string,charset(UTF16)] uint16 *text_status;
-		uint32 _secdesc_ptr;
+		uint32 *_secdesc_ptr;
 		spoolss_JobStatus status;
 		[range(0,99)] uint32 priority;
 		uint32 position;
@@ -1037,9 +1037,9 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[string,charset(UTF16)] uint16 *print_processor;
 		[string,charset(UTF16)] uint16 *parameters;
 		[string,charset(UTF16)] uint16 *driver_name;
-		uint32 _devmode_ptr; /* pointer to truncated devicemode */
+		uint32 *_devmode_ptr; /* pointer to truncated devicemode */
 		[string,charset(UTF16)] uint16 *text_status;
-		uint32 _secdesc_ptr;
+		uint32 *_secdesc_ptr;
 		spoolss_JobStatus status;
 		[range(0,99)] uint32 priority;
 		uint32 position;
@@ -1200,12 +1200,12 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[string,charset(UTF16)] uint16 *drivername;
 		[string,charset(UTF16)] uint16 *comment;
 		[string,charset(UTF16)] uint16 *location;
-		uint32 devmode_ptr;
+		uint32 *devmode_ptr;
 		[string,charset(UTF16)] uint16 *sepfile;
 		[string,charset(UTF16)] uint16 *printprocessor;
 		[string,charset(UTF16)] uint16 *datatype;
 		[string,charset(UTF16)] uint16 *parameters;
-		uint32 secdesc_ptr;
+		uint32 *secdesc_ptr;
 		spoolss_PrinterAttributes attributes;
 		[range(0,99)] uint32 priority;
 		uint32 defaultpriority;
@@ -1217,7 +1217,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 	} spoolss_SetPrinterInfo2;
 
 	typedef struct {
-		uint32 sec_desc_ptr;
+		uint32 *sec_desc_ptr;
 	} spoolss_SetPrinterInfo3;
 
 	typedef struct {
@@ -1244,11 +1244,11 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 	} spoolss_SetPrinterInfo7;
 
 	typedef struct {
-		uint32 devmode_ptr;
+		uint32 *devmode_ptr;
 	} spoolss_SetPrinterInfo8;
 
 	typedef struct {
-		uint32 devmode_ptr;
+		uint32 *devmode_ptr;
 	} spoolss_SetPrinterInfo9;
 
 	typedef [switch_type(uint32)] union {
@@ -1270,7 +1270,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[switch_is(level)] spoolss_SetPrinterInfo info;
 	} spoolss_SetPrinterInfoCtr;
 
-	WERROR spoolss_SetPrinter(
+	[public] WERROR spoolss_SetPrinter(
 		[in,ref] policy_handle *handle,
 		[in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
 		[in,ref] spoolss_DevmodeContainer *devmode_ctr,
@@ -2038,10 +2038,14 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[case(2)] spoolss_AddFormInfo2 *info2;
 	} spoolss_AddFormInfo;
 
+	typedef struct {
+		uint32 level;
+		[switch_is(level)] spoolss_AddFormInfo info;
+	} spoolss_AddFormInfoCtr;
+
 	WERROR spoolss_AddForm(
 		[in,ref] policy_handle *handle,
-		[in] uint32 level,
-		[in,switch_is(level)] spoolss_AddFormInfo info
+		[in,ref] spoolss_AddFormInfoCtr *info_ctr
 	);
 
 	/******************/
@@ -2068,8 +2072,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 	WERROR spoolss_SetForm(
 		[in,ref] policy_handle *handle,
 		[in] [string,charset(UTF16)] uint16 form_name[],
-		[in] uint32 level,
-		[in,switch_is(level)] spoolss_AddFormInfo info
+		[in,ref] spoolss_AddFormInfoCtr *info_ctr
 	);
 
 	/******************/
diff --git a/source3/printing/nt_printing_migrate.c b/source3/printing/nt_printing_migrate.c
index 616d7af..94dc3da 100644
--- a/source3/printing/nt_printing_migrate.c
+++ b/source3/printing/nt_printing_migrate.c
@@ -252,8 +252,6 @@ NTSTATUS printing_tdb_migrate_printer(TALLOC_CTX *mem_ctx,
 		}
 
 		devmode_ctr.devmode = &dm;
-
-		info2.devmode_ptr = 1;
 	}
 
 	result = winreg_update_printer(mem_ctx, b,
diff --git a/source3/rpc_client/init_spoolss.c b/source3/rpc_client/init_spoolss.c
index 8b66227..7e29cdc 100644
--- a/source3/rpc_client/init_spoolss.c
+++ b/source3/rpc_client/init_spoolss.c
@@ -107,12 +107,12 @@ void spoolss_printerinfo2_to_setprinterinfo2(const struct spoolss_PrinterInfo2 *
 	s->drivername		= i->drivername;
 	s->comment		= i->comment;
 	s->location		= i->location;
-	s->devmode_ptr		= 0;
+	s->devmode_ptr		= NULL;
 	s->sepfile		= i->sepfile;
 	s->printprocessor	= i->printprocessor;
 	s->datatype		= i->datatype;
 	s->parameters		= i->parameters;
-	s->secdesc_ptr		= 0;
+	s->secdesc_ptr		= NULL;
 	s->attributes		= i->attributes;
 	s->priority		= i->priority;
 	s->defaultpriority	= i->defaultpriority;
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 48a2981..ef854b1 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -8319,7 +8319,7 @@ static WERROR compose_spoolss_server_path(TALLOC_CTX *mem_ctx,
 					  char **path)
 {
 	const char *pservername = NULL;
-	const char *long_archi = SPOOLSS_ARCHITECTURE_NT_X86;
+	const char *long_archi;
 	const char *short_archi;
 
 	*path = NULL;
@@ -8327,6 +8327,10 @@ static WERROR compose_spoolss_server_path(TALLOC_CTX *mem_ctx,
 	/* environment may be empty */
 	if (environment && strlen(environment)) {
 		long_archi = environment;
+	} else {
+		long_archi = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+						  "spoolss", "architecture",
+						  SPOOLSS_ARCHITECTURE_NT_X86);
 	}
 
 	/* servername may be empty */
@@ -8648,7 +8652,7 @@ WERROR _spoolss_DeletePrinterData(struct pipes_struct *p,
 WERROR _spoolss_AddForm(struct pipes_struct *p,
 			struct spoolss_AddForm *r)
 {
-	struct spoolss_AddFormInfo1 *form = r->in.info.info1;
+	struct spoolss_AddFormInfo1 *form;
 	int snum = -1;
 	WERROR status = WERR_OK;
 	struct printer_handle *Printer = find_printer_index_by_hnd(p, r->in.handle);
@@ -8673,6 +8677,15 @@ WERROR _spoolss_AddForm(struct pipes_struct *p,
 		return WERR_ACCESS_DENIED;
 	}
 
+	if (r->in.info_ctr->level != 1) {
+		return WERR_INVALID_LEVEL;
+	}
+
+	form = r->in.info_ctr->info.info1;
+	if (!form) {
+		return WERR_INVALID_PARAM;
+	}
+
 	switch (form->flags) {
 	case SPOOLSS_FORM_USER:
 	case SPOOLSS_FORM_BUILTIN:
@@ -8790,7 +8803,7 @@ done:
 WERROR _spoolss_SetForm(struct pipes_struct *p,
 			struct spoolss_SetForm *r)
 {
-	struct spoolss_AddFormInfo1 *form = r->in.info.info1;
+	struct spoolss_AddFormInfo1 *form;
 	const char *form_name = r->in.form_name;
 	int snum = -1;
 	WERROR status = WERR_OK;
@@ -8817,6 +8830,15 @@ WERROR _spoolss_SetForm(struct pipes_struct *p,
 		return WERR_ACCESS_DENIED;
 	}
 
+	if (r->in.info_ctr->level != 1) {
+		return WERR_INVALID_LEVEL;
+	}
+
+	form = r->in.info_ctr->info.info1;
+	if (!form) {
+		return WERR_INVALID_PARAM;
+	}
+
 	tmp_ctx = talloc_new(p->mem_ctx);
 	if (!tmp_ctx) {
 		return WERR_NOMEM;
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 5263184..ced224b 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -1796,8 +1796,8 @@ static WERROR cmd_spoolss_addprinterex(struct rpc_pipe_client *cli,
 	info2.comment		= "Created by rpcclient";
 	info2.printprocessor	= "winprint";
 	info2.datatype		= "RAW";
-	info2.devmode_ptr	= 0;
-	info2.secdesc_ptr	= 0;
+	info2.devmode_ptr	= NULL;
+	info2.secdesc_ptr	= NULL;
 	info2.attributes 	= PRINTER_ATTRIBUTE_SHARED;
 	info2.priority 		= 0;
 	info2.defaultpriority	= 0;
@@ -2104,7 +2104,7 @@ static WERROR cmd_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
 	WERROR werror;
 	NTSTATUS status;
 	const char *printername;
-	union spoolss_AddFormInfo info;
+	struct spoolss_AddFormInfoCtr info_ctr;
 	struct spoolss_AddFormInfo1 info1;
 	struct spoolss_AddFormInfo2 info2;
 	uint32_t level = 1;
@@ -2145,7 +2145,8 @@ static WERROR cmd_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
 		info1.area.right	= 20;
 		info1.area.bottom	= 30;
 
-		info.info1 = &info1;
+		info_ctr.level		= 1;
+		info_ctr.info.info1	= &info1;
 
 		break;
 	case 2:
@@ -2164,7 +2165,8 @@ static WERROR cmd_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
 		info2.display_name	= argv[2];
 		info2.lang_id		= 0;
 
-		info.info2 = &info2;
+		info_ctr.level		= 2;
+		info_ctr.info.info2	= &info2;
 
 		break;
 	default:
@@ -2174,11 +2176,9 @@ static WERROR cmd_spoolss_addform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
 
 	/* Add the form */
 
-
 	status = dcerpc_spoolss_AddForm(b, mem_ctx,
 					&handle,
-					level,
-					info,
+					&info_ctr,
 					&werror);
 	if (!NT_STATUS_IS_OK(status)) {
 		werror = ntstatus_to_werror(status);
@@ -2203,7 +2203,7 @@ static WERROR cmd_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
 	WERROR werror;
 	NTSTATUS status;
 	const char *printername;
-	union spoolss_AddFormInfo info;
+	struct spoolss_AddFormInfoCtr info_ctr;
 	struct spoolss_AddFormInfo1 info1;
 	struct dcerpc_binding_handle *b = cli->binding_handle;
 
@@ -2236,15 +2236,15 @@ static WERROR cmd_spoolss_setform(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c
 	info1.area.bottom	= 3000;
 	info1.form_name		= argv[2];
 
-	info.info1 = &info1;
+	info_ctr.info.info1 = &info1;
+	info_ctr.level = 1;
 
 	/* Set the form */
 
 	status = dcerpc_spoolss_SetForm(b, mem_ctx,
 					&handle,
 					argv[2],
-					1,
-					info,
+					&info_ctr,
 					&werror);
 	if (!NT_STATUS_IS_OK(status)) {
 		werror = ntstatus_to_werror(status);
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 4fbe14f..9743d08 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -1789,7 +1789,7 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
 
 		for (f = 0; f < num_forms; f++) {
 
-			union spoolss_AddFormInfo info;
+			struct spoolss_AddFormInfoCtr info_ctr;
 			NTSTATUS status;
 
 			/* only migrate FORM_PRINTER types, according to jerry
@@ -1802,16 +1802,15 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
 					   "[%d]\n"),
 					f, forms[f].info1.form_name,
 					forms[f].info1.flags);
-
-			info.info1 = (struct spoolss_AddFormInfo1 *)
+			info_ctr.level = 1;
+			info_ctr.info.info1 = (struct spoolss_AddFormInfo1 *)
 				(void *)&forms[f].info1;
 
 			/* FIXME: there might be something wrong with samba's
 			   builtin-forms */
 			status = dcerpc_spoolss_AddForm(b_dst, mem_ctx,
 							&hnd_dst,
-							1,
-							info,
+							&info_ctr,
 							&result);
 			if (!NT_STATUS_IS_OK(status)) {
 				d_printf(_("\tdcerpc_spoolss_AddForm form %d: [%s] - %s\n"),
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index 04e3806..fe81a0f 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -319,21 +319,21 @@ static WERROR sptr_AddPrintServerForm(struct ntptr_GenericHandle *server, TALLOC
 	 * }
 	 */
 
-	switch (r->in.level) {
+	switch (r->in.info_ctr->level) {
 	case 1:
-		if (!r->in.info.info1) {
+		if (!r->in.info_ctr->info.info1) {
 			return WERR_FOOBAR;
 		}
 		count = sptr_db_search(sptr_db, mem_ctx,
 				       ldb_dn_new(mem_ctx, sptr_db, "CN=Forms,CN=PrintServer"),
 				       &msgs, attrs, "(&(form-name=%s)(objectClass=form))",
-				       r->in.info.info1->form_name);
+				       r->in.info_ctr->info.info1->form_name);
 
 		if (count == 1) return WERR_FOOBAR;
 		if (count > 1) return WERR_FOOBAR;
 		if (count < 0) return WERR_GENERAL_FAILURE;
 
-		if (r->in.info.info1->flags != SPOOLSS_FORM_USER) {
+		if (r->in.info_ctr->info.info1->flags != SPOOLSS_FORM_USER) {
 			return WERR_FOOBAR;
 		}
 
@@ -341,20 +341,20 @@ static WERROR sptr_AddPrintServerForm(struct ntptr_GenericHandle *server, TALLOC
 		W_ERROR_HAVE_NO_MEMORY(msg);
 
 		/* add core elements to the ldb_message for the Form */
-		msg->dn = ldb_dn_new_fmt(msg, sptr_db, "form-name=%s,CN=Forms,CN=PrintServer", r->in.info.info1->form_name);
+		msg->dn = ldb_dn_new_fmt(msg, sptr_db, "form-name=%s,CN=Forms,CN=PrintServer", r->in.info_ctr->info.info1->form_name);
 		SET_STRING(sptr_db, msg, "objectClass", "form");
 
-		SET_UINT(sptr_db, msg, "flags", r->in.info.info1->flags);
+		SET_UINT(sptr_db, msg, "flags", r->in.info_ctr->info.info1->flags);
 
-		SET_STRING(sptr_db, msg, "form-name", r->in.info.info1->form_name);
+		SET_STRING(sptr_db, msg, "form-name", r->in.info_ctr->info.info1->form_name);
 
-		SET_UINT(sptr_db, msg, "size-width", r->in.info.info1->size.width);
-		SET_UINT(sptr_db, msg, "size-height", r->in.info.info1->size.height);
+		SET_UINT(sptr_db, msg, "size-width", r->in.info_ctr->info.info1->size.width);
+		SET_UINT(sptr_db, msg, "size-height", r->in.info_ctr->info.info1->size.height);
 
-		SET_UINT(sptr_db, msg, "area-left", r->in.info.info1->area.left);
-		SET_UINT(sptr_db, msg, "area-top", r->in.info.info1->area.top);
-		SET_UINT(sptr_db, msg, "area-right", r->in.info.info1->area.right);
-		SET_UINT(sptr_db, msg, "area-bottom", r->in.info.info1->area.bottom);
+		SET_UINT(sptr_db, msg, "area-left", r->in.info_ctr->info.info1->area.left);
+		SET_UINT(sptr_db, msg, "area-top", r->in.info_ctr->info.info1->area.top);
+		SET_UINT(sptr_db, msg, "area-right", r->in.info_ctr->info.info1->area.right);
+		SET_UINT(sptr_db, msg, "area-bottom", r->in.info_ctr->info.info1->area.bottom);
 		break;
 	default:
 		return WERR_UNKNOWN_LEVEL;
@@ -383,16 +383,16 @@ static WERROR sptr_SetPrintServerForm(struct ntptr_GenericHandle *server, TALLOC
 	 * }
 	 */
 
-	switch (r->in.level) {
+	switch (r->in.info_ctr->level) {
 	case 1:
-		if (!r->in.info.info1) {
+		if (!r->in.info_ctr->info.info1) {
 			return WERR_FOOBAR;
 		}
 
 		count = sptr_db_search(sptr_db, mem_ctx,
 				       ldb_dn_new(mem_ctx, sptr_db, "CN=Forms,CN=PrintServer"),
 				       &msgs, attrs, "(&(form-name=%s)(objectClass=form))",
-				       r->in.info.info1->form_name);
+				       r->in.info_ctr->info.info1->form_name);
 
 		if (count == 0) return WERR_FOOBAR;
 		if (count > 1) return WERR_FOOBAR;
@@ -409,17 +409,17 @@ static WERROR sptr_SetPrintServerForm(struct ntptr_GenericHandle *server, TALLOC
 		/* add core elements to the ldb_message for the user */
 		msg->dn = msgs[0]->dn;
 
-		SET_UINT(sptr_db, msg, "flags", r->in.info.info1->flags);
+		SET_UINT(sptr_db, msg, "flags", r->in.info_ctr->info.info1->flags);
 
-		SET_STRING(sptr_db, msg, "form-name", r->in.info.info1->form_name);
+		SET_STRING(sptr_db, msg, "form-name", r->in.info_ctr->info.info1->form_name);
 
-		SET_UINT(sptr_db, msg, "size-width", r->in.info.info1->size.width);
-		SET_UINT(sptr_db, msg, "size-height", r->in.info.info1->size.height);
+		SET_UINT(sptr_db, msg, "size-width", r->in.info_ctr->info.info1->size.width);
+		SET_UINT(sptr_db, msg, "size-height", r->in.info_ctr->info.info1->size.height);
 
-		SET_UINT(sptr_db, msg, "area-left", r->in.info.info1->area.left);
-		SET_UINT(sptr_db, msg, "area-top", r->in.info.info1->area.top);
-		SET_UINT(sptr_db, msg, "area-right", r->in.info.info1->area.right);
-		SET_UINT(sptr_db, msg, "area-bottom", r->in.info.info1->area.bottom);
+		SET_UINT(sptr_db, msg, "area-left", r->in.info_ctr->info.info1->area.left);
+		SET_UINT(sptr_db, msg, "area-top", r->in.info_ctr->info.info1->area.top);
+		SET_UINT(sptr_db, msg, "area-right", r->in.info_ctr->info.info1->area.right);
+		SET_UINT(sptr_db, msg, "area-bottom", r->in.info_ctr->info.info1->area.bottom);
 		break;
 	default:
 		return WERR_UNKNOWN_LEVEL;
diff --git a/source4/torture/ndr/spoolss.c b/source4/torture/ndr/spoolss.c
index 437677b..52a5b03 100644
--- a/source4/torture/ndr/spoolss.c
+++ b/source4/torture/ndr/spoolss.c
@@ -1628,6 +1628,77 @@ static const uint8_t openprinterex_64_req_data[] = {
 	0x74, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x00, 0x00
 };
 
+static const uint8_t setprinter_64_req_data[] = {
+	0x00, 0x00, 0x00, 0x00, 0x13, 0xbe, 0x52, 0x2a, 0xe4, 0x67, 0xe8, 0x45,
+	0x8b, 0xb2, 0xd4, 0x15, 0x55, 0xff, 0xbf, 0xfc, 0x00, 0x00, 0x00, 0x00,
+	0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00,
+	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x39, 0x00,
+	0x32, 0x00, 0x2e, 0x00, 0x31, 0x00, 0x36, 0x00, 0x38, 0x00, 0x2e, 0x00,
+	0x33, 0x00, 0x2e, 0x00, 0x37, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x5c, 0x00, 0x5c, 0x00, 0x31, 0x00, 0x39, 0x00, 0x32, 0x00, 0x2e, 0x00,
+	0x31, 0x00, 0x36, 0x00, 0x38, 0x00, 0x2e, 0x00, 0x33, 0x00, 0x2e, 0x00,
+	0x37, 0x00, 0x35, 0x00, 0x5c, 0x00, 0x48, 0x00, 0x50, 0x00, 0x20, 0x00,
+	0x43, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x20, 0x00,
+	0x4c, 0x00, 0x61, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x4a, 0x00,
+	0x65, 0x00, 0x74, 0x00, 0x20, 0x00, 0x32, 0x00, 0x35, 0x00, 0x30, 0x00,
+	0x30, 0x00, 0x20, 0x00, 0x50, 0x00, 0x43, 0x00, 0x4c, 0x00, 0x36, 0x00,
+	0x20, 0x00, 0x43, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x73, 0x00, 0x73, 0x00,
+	0x20, 0x00, 0x44, 0x00, 0x72, 0x00, 0x69, 0x00, 0x76, 0x00, 0x65, 0x00,
+	0x72, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x4c, 0x00, 0x50, 0x00, 0x54, 0x00, 0x31, 0x00, 0x3a, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x63, 0x00, 0x72, 0x00,
+	0x6f, 0x00, 0x73, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x74, 0x00, 0x20, 0x00,
+	0x65, 0x00, 0x6e, 0x00, 0x68, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x63, 0x00,
+	0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x50, 0x00, 0x6f, 0x00, 0x69, 0x00,
+	0x6e, 0x00, 0x74, 0x00, 0x20, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00,
+	0x20, 0x00, 0x50, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00,
+	0x20, 0x00, 0x64, 0x00, 0x72, 0x00, 0x69, 0x00, 0x76, 0x00, 0x65, 0x00,
+	0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x6c, 0x00,
+	0x61, 0x00, 0x20, 0x00, 0x62, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x00, 0x00,
+	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x70, 0x00,
+	0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list