Windows spooler sends SMB blocks with non-sequential order.

Jeremy Allison jra at
Tue May 17 22:56:51 GMT 2005

On Wed, May 18, 2005 at 08:16:39AM +1000, Andrew Tridgell wrote:
> Arcady,
> I'm guessing that what you are referring to is the print_job_write()
> call in smbd/fileio.c. If the file is a print file then write_file()
> discards the position argument and calls print_job_write(), which
> always writes to the end of the file, regardless of the specified
> offset.
> Jeremy, do you remember why this was done? Maybe very early windows
> clients used bogus or zero offsets in writes to printer shares?
> Unless there is some reason to think that some clients do give bogus
> offsets, I don't see why we shouldn't honor the offset given in the
> write request.

Already coding it up :-).

My guess is that early clients send -1 for this which is why
we just ignored it. I'd need to check DOS clients to be sure


More information about the samba-technical mailing list