summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-04-24 14:04:47 -0700
committerJeremy Allison <jra@samba.org>2008-04-24 14:04:47 -0700
commit189eb93b73c4ff0737b702a0682727f5a22bcc38 (patch)
tree4f290744e907d0632938c0a903ffa0c0a978cbbe /source3
parent051ff45c6041accdf4f74d33db16158a3aa95a4c (diff)
downloadsamba-189eb93b73c4ff0737b702a0682727f5a22bcc38.tar.gz
samba-189eb93b73c4ff0737b702a0682727f5a22bcc38.tar.bz2
samba-189eb93b73c4ff0737b702a0682727f5a22bcc38.zip
The first of Martin Zielinski <mz@seh.de> Vista printing patches.
Jerry will test and should get into 3.2 final (and the next 3.0.x release). Jeremy. (This used to be commit 3fc1ab210b8772ee9f867499c0b1a7bb4bcdd285)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_parse/parse_spoolss.c7
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c9
2 files changed, 12 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index bf7166b2ad..ec6d44293d 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -2129,7 +2129,12 @@ static bool smb_io_reldevmode(const char *desc, RPC_BUFFER *buffer, int depth, D
}
buffer->string_at_end -= ((*devmode)->size + (*devmode)->driverextra);
-
+
+ /* mz: we have to align the device mode for VISTA */
+ if (buffer->string_at_end % 4) {
+ buffer->string_at_end += 4 - (buffer->string_at_end % 4);
+ }
+
if(!prs_set_offset(ps, buffer->string_at_end))
return False;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 4c5fcf5341..a7b477e17d 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9626,13 +9626,16 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
/* copy data into the reply */
- r_u->ctr.size = r_u->needed;
+ /* mz: Vista x64 returns 0x6f7 (The stub received bad data), if the
+ response buffer size is != the offered buffer size
+
+ r_u->ctr.size = r_u->needed;
+ */
+ r_u->ctr.size = in_size;
r_u->ctr.size_of_array = r_u->returned;
r_u->ctr.values = enum_values;
-
-
done:
if ( printer )
free_a_printer(&printer, 2);