Your message dated Sun, 4 Apr 2010 13:05:47 +0100
with message-id <[email protected]>
and subject line Re: Bug#576369: logrotate: wtmp/btmp handling
has caused the Debian Bug report #576369,
regarding logrotate: wtmp/btmp handling
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
576369: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576369
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: logrotate
Version: 3.7.8-5
Severity: wishlist
Hi.
Perhaps the handling of wtmp/btmp rotation can be improved a little bit:
1) Since base-files 5.1 (IIRC) the two files are created by default like this:
>chown root:utmp /var/log/wtmp /var/log/btmp /var/log/lastlog
>chmod 664 /var/log/wtmp /var/log/lastlog
>chmod 660 /var/log/btmp
So I guess the lines:
>create 0664 root utmp
>create 0660 root utmp
are no longer required in logrotate.conf.
But it might make sense to let it at just "create", namely if the files
are not automatically recreated externally.
Although the global logrotate default is "create", a user may choose to change
this.
2) Regarding the other three options set for btmp and wtmp:
>missingok
Should this ever happen? And wouldn't it be better to error in
that case? At least both files are created by default in base-files postinst.
>monthly
>rotate 1
Any reason for those two, to not use the global defaults?
3) Personally I'd like the idea, that logrotate really just contains global
defaults that every user is allowed to set, e.g. which compression to use
and which numer of rotations.
Therefore it might make sense:
- to split the handling of btmp/wtmp in a separate file e.g.
/etc/logrotate.d/base-files?!
It might even make sense, that this is moved to the base-files package.
- to disable several global default options a user may probably choose
which do not make sense here, e.g.
nomail
create (see above)
...
Cheers,
Chris.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_DE.UTF-8, LC_CTYPE=en_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages logrotate depends on:
ii anacron 2.3-14 cron-like program that doesn't go
ii base-passwd 3.5.22 Debian base system master password
ii cron 3.0pl1-107 process scheduling daemon
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libpopt0 1.15-1 lib for parsing cmdline parameters
ii libselinux1 2.0.89-4 SELinux runtime shared libraries
Versions of packages logrotate recommends:
ii bsd-mailx [mailx] 8.1.2-0.20100314cvs-1 simple mail user agent
logrotate suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
tags 576369 wontfix
thanks
On Sat, Apr 03, 2010 at 11:16:40PM +0200, Christoph Anton Mitterer wrote:
> Perhaps the handling of wtmp/btmp rotation can be improved a little bit:
>
> 1) Since base-files 5.1 (IIRC) the two files are created by default like this:
> >chown root:utmp /var/log/wtmp /var/log/btmp /var/log/lastlog
> >chmod 664 /var/log/wtmp /var/log/lastlog
> >chmod 660 /var/log/btmp
>
> So I guess the lines:
> >create 0664 root utmp
> >create 0660 root utmp
> are no longer required in logrotate.conf.
>
> But it might make sense to let it at just "create", namely if the files
> are not automatically recreated externally.
> Although the global logrotate default is "create", a user may choose to change
> this.
If a utmp or wtmp is not already present, then it will not be created
by logrotate (as a consequence of the "missingok") nor by anything
else (eg. login).
> 2) Regarding the other three options set for btmp and wtmp:
> >missingok
> Should this ever happen? And wouldn't it be better to error in
> that case? At least both files are created by default in base-files postinst.
It is perfectly correct and desirable behaviour. This is *not* a
bug. Please have a look at bug #199154 to see that this behaviour is
correct.
If utmp/wtmp are present and are being rotated, their replacements
should have the correct ownership and permissions. If they are not
present, then they will neither be created nor rotated.
--
Paul Martin <[email protected]>
--- End Message ---