Vista 64bit and Samba printers

Martin Zielinski mz at
Mon Sep 10 10:24:26 GMT 2007


I'm facing problems using 64bit printer drivers on Samba 3.0.25c with a 
64bit Vista client.

Driver installation works, when I try to connect to the printer it fails
with error 0x6f7 (The stub received bad data).

The reason is, that the EnumPrinterDataEx responses return the "needed" 
size as buffer size (which is different to XP).
Instead it should return the offered buffer size.

--- samba-3.0.25c.orig/source/rpc_server/srv_spoolss_nt.c 
2007-08-20 15:04:50.000000000 +0200
+++ samba-3.0.25c/source/rpc_server/srv_spoolss_nt.c    2007-09-10 
12:23:10.000000000 +0200
@@ -9472,7 +9472,10 @@

         /* copy data into the reply */

-       r_u->ctr.size           = r_u->needed;
+       /* Vista x64 returns 0x6f7 (The stub received bad data), if the 
+          buffer size is != the offered buffer size
+       */
+       r_u->ctr.size           = in_size;

         r_u->ctr.size_of_array  = r_u->returned;
         r_u->ctr.values         = enum_values;


More information about the samba-technical mailing list