summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-07-26 09:40:49 +0000
committerJean-François Micouleau <jfm@samba.org>2000-07-26 09:40:49 +0000
commit1e3a5503cd27109e3b79da9d1115ef80317e6849 (patch)
treec11a9d15ebe87b069116a1e7bd8feb56e50f8175 /source3/rpc_parse
parent18db0514fddf15c9aa5eeefa18891bbf3e0637f5 (diff)
downloadsamba-1e3a5503cd27109e3b79da9d1115ef80317e6849.tar.gz
samba-1e3a5503cd27109e3b79da9d1115ef80317e6849.tar.bz2
samba-1e3a5503cd27109e3b79da9d1115ef80317e6849.zip
Found out that we are crashing spoolss in enumprinterdata.
So fixed enumprinterdatas in rpcclient to debug the server code, and found that the parsing code was missing 2 prs_align(). We are not crashing NT anymore. :-) J.F. (This used to be commit 883f7402d495182aeff85152216cc8b3cfc18bef)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_spoolss.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index b0223d2803..bee8bae8cf 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -2434,7 +2434,7 @@ uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info)
size += 4;
/* JRA !!!! TESTME - WHAT ABOUT prs_align.... !!! */
size += sec_desc_size( info->secdesc );
-
+
size+=size_of_device_mode( info->devmode );
size+=size_of_relative_string( &info->servername );
@@ -4581,6 +4581,10 @@ BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_
return False;
if(!prs_uint16s(False, "value", ps, depth, r_u->value, r_u->valuesize))
return False;
+
+ if(!prs_align(ps))
+ return False;
+
if(!prs_uint32("realvaluesize", ps, depth, &r_u->realvaluesize))
return False;
@@ -4591,6 +4595,9 @@ BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_
return False;
if(!prs_uint8s(False, "data", ps, depth, r_u->data, r_u->datasize))
return False;
+ if(!prs_align(ps))
+ return False;
+
if(!prs_uint32("realdatasize", ps, depth, &r_u->realdatasize))
return False;
if(!prs_uint32("status", ps, depth, &r_u->status))