printing spool modifications

Andrew Tridgell tridge at samba.org
Wed Jan 13 04:29:14 GMT 1999


> My main remaining problem is this:  is there ANY ANY ANY way for smbd to
> learn what the filename that was printed was.  E.g - if Windows prints "My
> long named document.doc" I'd like to be able to grab that in smbd, and use
> it for another % expansion on this new parameter.

This used to work with Samba. It it isn't working for you then it's
worth spending some time finding out why.

The way it is supposed to work is that the client opens the file,
sends some print data then calls an IPC request telling the server the
full file name and possbly the application doing the printing. This is
handled in Samba by the api_PrintJobInfo() function 0xb in ipc.c which
does a rename on the print file.

You need to capture a print from a windows client then look though the
packets to see whether such a packet was sent. Maybe it's using a
PrintJobInfo sublevel that Samba doesn't know about. If so then it
should be easy to add.

I suggest you work this out before adding changes to the rest of the
code. Be aware that the ipc.c code is quite ugly, but hopefully you
can work out how it works :)


More information about the samba-technical mailing list