[Samba] Spool files not deleted when "printing = cups"
James Matheson
jmrm at eng.cam.ac.uk
Tue Sep 3 16:58:01 GMT 2002
We're using the built-in CUPS interface for printing from Samba and this,
as shipped, leaves the spool files in the directory defined by
[printers]
path = whatever
in smb.conf. Other printing types typically explicitely delete these
files as part of the print command but the CUPS interface doesn't
offer any facility to do this. A possible solution is, as in the
attached patch, to delete the file at the end of cups_job_submit().
print_cups.c.dist is as distributed in samba-2.2.5.tar.gz .
A cleaner (more generic) alternative might be to add a configuration option
applicable to all printing types which does the deletion, eg
remove printfile = yes
--
James M.R.Matheson
Head of Computer Systems Group, E-mail: jmrm at eng.cam.ac.uk
University Engineering Dept, Phone: +44-1223-332756/332711
Trumpington Street, Fax: +44-1223-332662
Cambridge CB2 1PZ, WWW: http://www.eng.cam.ac.uk/~jmrm/
England.
-----------------------------------------------------------------
*** source/printing/print_cups.c.dist Fri May 3 02:03:31 2002
--- source/printing/print_cups.c Tue Sep 3 11:59:56 2002
***************
*** 662,669 ****
--- 662,671 ----
DEBUG(0,("Unable to print file to `%s' - %s\n", PRINTERNAME(snum),
ippErrorString(cupsLastError())));
httpClose(http);
+ if (unlink (pjob->filename) != 0)
+ DEBUG(0,("Unable to unlink CUPS spool file %s\n", pjob->filename));
return (ret);
}
More information about the samba
mailing list