summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_client/cli_spoolss.c8
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c14
2 files changed, 12 insertions, 10 deletions
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 5c8448b29b..1a8903d82a 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -40,7 +40,7 @@ WERROR rpccli_spoolss_openprinter_ex(struct rpc_pipe_client *cli,
NTSTATUS status;
WERROR werror;
struct spoolss_DevmodeContainer devmode_ctr;
- union spoolss_UserLevel userlevel;
+ struct spoolss_UserLevelCtr userlevel_ctr;
struct spoolss_UserLevel1 level1;
struct dcerpc_binding_handle *b = cli->binding_handle;
@@ -55,15 +55,15 @@ WERROR rpccli_spoolss_openprinter_ex(struct rpc_pipe_client *cli,
level1.minor = 0;
level1.processor = 0;
- userlevel.level1 = &level1;
+ userlevel_ctr.level = 1;
+ userlevel_ctr.user_info.level1 = &level1;
status = dcerpc_spoolss_OpenPrinterEx(b, mem_ctx,
printername,
NULL,
devmode_ctr,
access_desired,
- 1, /* level */
- userlevel,
+ userlevel_ctr,
handle,
&werror);
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 28ef836b41..48a2981986 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -1632,15 +1632,17 @@ WERROR _spoolss_OpenPrinter(struct pipes_struct *p,
struct spoolss_OpenPrinter *r)
{
struct spoolss_OpenPrinterEx e;
+ struct spoolss_UserLevel1 level1;
WERROR werr;
- ZERO_STRUCT(e.in.userlevel);
+ ZERO_STRUCT(level1);
e.in.printername = r->in.printername;
e.in.datatype = r->in.datatype;
e.in.devmode_ctr = r->in.devmode_ctr;
e.in.access_mask = r->in.access_mask;
- e.in.level = 0;
+ e.in.userlevel_ctr.level = 1;
+ e.in.userlevel_ctr.user_info.level1 = &level1;
e.out.handle = r->out.handle;
@@ -1714,12 +1716,12 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
return WERR_INVALID_PARAM;
}
- if (r->in.level > 3) {
+ if (r->in.userlevel_ctr.level > 3) {
return WERR_INVALID_PARAM;
}
- if ((r->in.level == 1 && !r->in.userlevel.level1) ||
- (r->in.level == 2 && !r->in.userlevel.level2) ||
- (r->in.level == 3 && !r->in.userlevel.level3)) {
+ if ((r->in.userlevel_ctr.level == 1 && !r->in.userlevel_ctr.user_info.level1) ||
+ (r->in.userlevel_ctr.level == 2 && !r->in.userlevel_ctr.user_info.level2) ||
+ (r->in.userlevel_ctr.level == 3 && !r->in.userlevel_ctr.user_info.level3)) {
return WERR_INVALID_PARAM;
}