diff options
author | Günther Deschner <gd@samba.org> | 2013-01-14 17:26:31 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2013-01-16 11:42:13 +0100 |
commit | a4dcf7b94d8f2d8180bb5b390f49e89e2c956a88 (patch) | |
tree | 28136af45498a9d5f94527baf6fa52854af4770a /source3/rpc_server/spoolss | |
parent | 6bb7bf9ebb0671be19419ba54955dd929494c8e8 (diff) | |
download | samba-a4dcf7b94d8f2d8180bb5b390f49e89e2c956a88.tar.gz samba-a4dcf7b94d8f2d8180bb5b390f49e89e2c956a88.tar.bz2 samba-a4dcf7b94d8f2d8180bb5b390f49e89e2c956a88.zip |
spoolss: Make OpenPrinterEx work with NDR64 by using UserInfo Container.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/rpc_server/spoolss')
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_nt.c | 14 |
1 files changed, 8 insertions, 6 deletions
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; } |