Package: acct
Version: 6.4~pre1-3

Hi,

acct's cron.monthly script seems to be severely broken since -3.

What seems to be a good-faith attempt to handle switching between
compressed and uncompressed rotated logfiles gracefully, turns out to be
affected by the following defects:

 - Compressed rotated logfile is no longer uncompressed for processing.
   Instead, a fresh, empty temporary file will be used.

 - The case of having no uncompressed but a compressed logfile isn't
   handled anymore.

 - If no compressed logfile exists, an unconditional 'rm -f ""' will be
   executed, without output redirection(, but simply wrong).

 - Even in the case of having two rotated logfiles, one compressed and
   one uncompressed, for what the change seems to have been meant:
   `ac' is run on both files, but `last' only on the compressed one
   (if it would have been decompressed into the temporary file).

The previous (-1) version's only defect, on the other hand, seems to be
that it unconditionally uses a possibly-existing uncompressed rotated
logfile in addition to the previously detected existing
uncompressed-or-compressed one, and there, too, only for `ac', not for
`last'. It could have been fixed simply be dropping the superflous
'-f /var/log/wtmp.1'.

Apart from the technical details, there seems to be little point in
trying to support using two rotated logfiles at the same time, as they
are assumed to be rotated monthly / contain records for the previous month,
and if really a wtmp.1 and a wtmp.1.gz exist at the same time, one will
almost certainly be out-of-date and be stuck there from a configuration
change whether to compress rotated wtmp files.

Hope this helps in any way and is not (perceived as?) only flames...

Regards, Fabian

-- 
Fabian "zzz" Pietsch - http://zzz.arara.de/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to