[Pkg-freeradius-maintainers] Bug#872158: logrotate config file overrides global options for other log files

Justin Pasher justinp at distribion.com
Mon Aug 14 17:36:22 UTC 2017


Package: freeradius
Version: 3.0.12+dfsg-5+deb9u1

The logrotate config file that ships with freeradius sets global options 
in its file (/etc/logrotate.d/freeradius). These options do not just 
apply to the freeradius log files, but to all log files that logrotate 
encounters after processing /etc/logrotate.d/freeradius (e.g. other logs 
defined in /etc/logrotate.d with a filename that come later 
alphabetically). You can verify this by making a modification tothe 
global options in/etc/logrotate.d/freeradius(such as adding"maxsize 
1k"), then running logrotate in debug mode:

logrotate -d /etc/logrotate.conf

If you look at the output, you'll notice that all logs files encountered 
after the freeradius log files now have the"maxsize 1k" applied to them 
even if they didn't define it themselves. The global options set within 
/etc/logrotate.d/freeradius are not just global options for the log 
files defined in that file; they are system wide. To avoid conflicting 
with other log file definitions, the options need to be duplicated for 
each log file. You could also just group together everything but 
radius.log if you wanted to avoid a bunch of duplication.

/var/log/freeradius/radius.log {
daily
rotate 52
missingok
compress
delaycompress
notifempty
     copytruncate
}

/var/log/freeradius/checkrad.log /var/log/freeradius/radwatch.log
/var/log/freeradius/radutmp /var/log/freeradius/radwtmp
/var/log/freeradius/sqllog.sql
/var/log/freeradius/radacct/*/detail {
daily
rotate 52
missingok
compress
delaycompress
notifempty
     nocreate
}


--
Justin Pasher



More information about the Pkg-freeradius-maintainers mailing list