v2.0.6 problem with unique mktemp() file names for printer spooling files...

Christian Günsel guensel at zentraldata.de
Wed May 24 10:46:07 GMT 2000


I'm wondering about the spooling capabilities of samba. I have a
printable share and a custom printer command.
I think normal behaviour for samba is to spool printed files with unique
names, like USER1.FG2HTu in the spooling directory. My samba (version
2.0.6 on a Linux 2.2.10, Suse 6.2) does this correctly if the filename
from windows has only uppercase letters. But in any other case, no
unique filename is created, for example MicrosoftWord-test.doc. This is
very dangerous, because obviously the file can be overwritten by another
print job which uses the same file name. This occurs even before the
printer command from smb.conf is executed, so there is no chance to
handle print jobs savely on my system...

Is this a bug or did I something wrong? I experimented with name
mangling, upper and lower case conversion but nothing did work. I found
nothing about that in the docs/faqs, it seems to be trivial that the
spooling works, but it doesn't.

Any ideas?

Thank you very much
Christian Guensel

   path = /usr/spool/testprint
   comment = Test Dokumentdrucker
   browseable = yes
   printable = yes
   read only = yes
   guest ok = true
   create mode = 0400
   print command = "/usr/local/sbin/handle_printupload %I %s %U 


Christian Günsel, Zentraldata-GmbH Leipzig
guensel at zentraldata.de
Tel.: 0341/1285041

More information about the samba mailing list