summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-04-11 18:52:09 +0000
committerJeremy Allison <jra@samba.org>2002-04-11 18:52:09 +0000
commit440a0099ea30fbf47ad2be2f014a4a1df1eaf783 (patch)
treeb2f7cf97d422984f447ac445339a5dafc5ac4471 /source3
parent5928c293ff5d0b864172b559cb82d1aa089d9a4a (diff)
downloadsamba-440a0099ea30fbf47ad2be2f014a4a1df1eaf783.tar.gz
samba-440a0099ea30fbf47ad2be2f014a4a1df1eaf783.tar.bz2
samba-440a0099ea30fbf47ad2be2f014a4a1df1eaf783.zip
HP2500C driver writes devmode with private data that ends
on a 2 byte boundary. We then miss-parse the desired_access. Also added other fixes to ensure we align after private data (discussed with Gerry). Jeremy. (This used to be commit 4369a58765f382e118e5393c805336484671cbf9)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_parse/parse_spoolss.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 1cbb97c337..b74ee3c5c5 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -746,6 +746,9 @@ static BOOL spoolss_io_printer_default(char *desc, PRINTER_DEFAULT *pd, prs_stru
if (!spoolss_io_devmode_cont("", &pd->devmode_cont, ps, depth))
return False;
+ if (!prs_align(ps))
+ return False;
+
if (!prs_uint32("access_required", ps, depth, &pd->access_required))
return False;
@@ -3832,6 +3835,9 @@ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps
if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
return False;
+ if(!prs_align(ps))
+ return False;
+
switch (q_u->level)
{
case 2:
@@ -4623,6 +4629,9 @@ BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct
if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
return False;
+ if(!prs_align(ps))
+ return False;
+
switch (q_u->level) {
case 2:
ptr_sec_desc = q_u->info.info_2->secdesc_ptr;