Merge 3fc1ab210b8772ee9f867499c0b1a7bb4bcdd285 from 3.2.
authorJeremy Allison <jra@samba.org>
Tue, 6 May 2008 18:23:24 +0000 (11:23 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 6 May 2008 18:23:24 +0000 (11:23 -0700)
    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.

source/rpc_parse/parse_spoolss.c
source/rpc_server/srv_spoolss_nt.c

index 38141515dc1fa8aa73884c8c26c077fe62cac34b..ba8a32709b7cd78a85680d72a8cc4ac6dace487e 100644 (file)
@@ -2130,7 +2130,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;
                
index 40ad81a44952aba25de199a63d8ae8dce0268ef5..5ccc91c8288af52fee936f676d720573736128ba 100644 (file)
@@ -9476,8 +9476,13 @@ 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;