[cups.bugs] [LOW] STR #3382: cups-lpd creates non-unique files

Jiri Popelka jpopelka at redhat.com
Tue Oct 20 04:21:01 PDT 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

On a heavily loaded server some print jobs are lost and the error
"cups-lpd[19827]: Unable to open temporary data file "/tmp/4a8e53a3e8baf"
- File exists" appears in /var/log/messages (with different /tmp
filenames).

This would appear to be caused by the way in which temporary files are
created in the cupsTempFd() function in cups/tempfile.c - filenames are
based on the current time. This explains why we see the error during high
load, when multiple jobs are submitted at once.

Proposed patch fixes the issue by replacing the time-based filename with
one generated by the standard mkstemp() system call.

Original bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=523152

Link: http://www.cups.org/str.php?L3382
Version: 1.4.1
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cups-mkstemp.patch
URL: <https://lists.cups.org/pipermail/cups/attachments/20091020/c8cc6978/attachment.ksh>


More information about the cups mailing list