fix incorrect spoolss GetPrinterData behaviour

David Disseldorp ddiss at
Fri Nov 5 09:25:01 MDT 2010


Windows can send spoolss GetPrinterData requests with an offered buffer
size of zero, Model and TrayFormTable data is commonly requested in
this way.

Samba's GetPrinterData response for the above case includes the correct
error code (WERR_MORE_DATA), however the type field is set to REG_NONE.
This causes Windows (seen on XP and 2k3) to give up on the request,
the result of which is an incorrect printer device settings page.

If the type field is retained (not set to REG_NONE) when responding with
WERR_MORE_DATA, Windows reissues the GetPrinterData request with an
increased offered buffer size.

The following changes since commit
  s3: Allow disabling of mdns registrations (2010-11-05 12:38:32 +0100)

are available in the git repository at:
  git:// get_printer_data

David Disseldorp (1):
      s3-spoolss: fix spoolss GetPrinterData behaviour

 source3/rpc_server/srv_spoolss_nt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Cheers, David

More information about the samba-technical mailing list