smbclient, SMBwrite vs SMBwriteX
chris at onthe.net.au
Wed Oct 29 00:48:46 GMT 2003
On Tue, Oct 28, 2003 at 12:38:33PM -0800, Richard Sharpe wrote:
> On Tue, 28 Oct 2003, Chris Dunlop wrote:
> > I've been having trouble with a Konica copier/printer returning
> > an error when trying to print, e.g.:
> > $ smbclient //konica/print ' ' -c 'print -' < /tmp/tmp.ps
> > Error writing file: ERRSRV - 22
> > Examining the network traffic revealed that the printer returns
> > the error when smbclient issues an SMBwriteX, and that the
> > MS-Windows printer driver (which works of course) was using
> > SMBwrite rather than SMBwriteX.
> > The patch below implements a '-w' flag for smbclient which makes
> > it use SMBwrite rather than SMBwriteX. (The line numbering may
> > be a bit off as I'm using the source from debian's
> > samba-3.0.0final-1.)
> > With this patch I'm able to print to the Konica.
> > There looks there may be a smattering of these types of problems
> > with other printers as well:
> > http://www.google.com/search?q=smbclient+%22ERRSRV+22%22
> > Possibly these are all using the same buggy (or simply old?)
> > underlying SMB implementation in their firmware.
> Hmmm, did you look at restricting the protocol level? I am
> sure that WriteX is only supported for certain protocol levels
> and above.
No... I know close to nothing about SMB beyond what I learnt
from viewing the data stream (using ethereal - I see you're
involved in that project), I wasn't even aware that there /is/
such a thing as an SMB protocol level. If there is, and it
controls whether to use WriteX or Write then that sounds like it
would be the proper fix.
However from what I could see, there's no facility in smbclient
to set Write vs WriteX via a protocol level:
If this is supposed to be set via a protocol level then that
would be a bug.
> Another question is, what does the printer tell us it supports?
Sorry, again I have to plead ignorance: how do I find out ?
More information about the samba-technical