Re: [PATCH] Coverity issue 740457

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 12 Feb 2013 02:54:02 +1300

On 12/02/2013 1:37 a.m., Kinkie wrote:
>> * the string created by tempnam() apparently needs to be xfree()'d when
>> done.
> doh! Ok.
>
>> * please add a comment in the #else condition noting the tempnam() is
>> officially obsolete from POSIX-2008.1.
>> (in a few more years we should drop the #else code entirely.)
> Done.
> we may want to shuffle this to compat/ somewhere.
>
>> * please also add a note that tmpfile() is not an option since we desire the
>> /tmp file to stick around after process exit for administrators use.
> Do we? There's an unlink(filename) call at the end of that function
>
>> As a followup change we need to consider that this whole process leaves a
>> /tmp file sitting around from every crash, which could over time build up.
>> I'm in two minds about how desirable this behaviour is.
> Generally /tmp is either a ramdisk or there are system tools to clean
> accumulated cruft up. I wouldn't worry about this.
>
>> + we could check for the files on startup and do something when Squid is
>> re-started after a crash.
>> + administrator can manually find the file even if the mail attempt failed
>> (known to happen).
>>
>> - the files build up over time and could be a big waste of disk space.
> See above.
>
>

Very well. +1.

Amos
Received on Mon Feb 11 2013 - 13:54:17 MST

This archive was generated by hypermail 2.2.0 : Mon Feb 11 2013 - 12:01:34 MST