double 'ctlinnd flushlogs' deletes news, errlog

Florian Schlichting fschlich at cis.fu-berlin.de
Wed Apr 10 10:14:41 UTC 2013


Hi Julien,

I just noticed a critical flaw in your recent commit to flush process /
exploder channels. You introduced a second call to 'ctlinnd flushlogs'
in scanlogs. Unfortunately, when 'ctlinnd flushlogs' is called, innd
doesn't just flush its logs, it also rotates (moves) its log and errlog
to news.old and errlog.old, overwriting what's already there. So the
second call effectively destroys both logs. This happens in
innd/innd.c:ReopenLog().

From ctlinnd(8):

   flushlogs
       Close the news and error log files and rename them to add ".old" to
       the file name, then open fresh news and error logs.  

Perhaps innd should stop do the .old rotation and restrict itself to
flushing, and scanlogs should mv to .old rather than cp, and not just
"in case innd is down", and the then the first invocation of 'ctlinnd
flushlogs' can be deleted?

Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5565 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20130410/02d58628/attachment.bin>


More information about the inn-workers mailing list