Package: logrotate
Version: 3.7.8-4
Severity: critical
Justification: breaks unrelated software


If the directory of a log file specification with wild cards does not exist,
logrotate may mis-parse the config file so badly that it will rotate arbitrary
files appearing in the postrotate script.

Imagine that /bin/sh appears there and it is rotated to /bin/sh.1 . Ouch.
If logrotate fails to parse the config, it must abort, and not
clobber random files.



The interesting part of the "logrotate -d /etc/logrotate.conf" output is
provided below. This is
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/392532 and causes the
apache2 init script to be rotated away.

I could not reproduce this under lenny. I guess it was introduced in 3.7.8.


====================================

including /etc/logrotate.d                   
reading config file apache2                  
error: error accessing /var/log/apache2: No such file or directory
error: apache2:1 glob failed for /var/log/apache2/*.log           
error: found error in /var/log/apache2/*.log , skipping           
removing last 1 log configs                                       
error: apache2:11 lines must begin with a keyword or a filename (possibly in 
double quotes)
error: apache2:12 missing end of line                                           
           
reading config info for /etc/init.d/apache2 reload > /dev/null                  
           
                fi                                                              
           
        endscript                                                               
           
}                                                                               
           

reading config file apt
...
reading config info for /var/log/btmp                                           
                  

Handling 22 logs

rotating pattern: /var/log/apache2/*.log  weekly (4 rotations)
empty log files are rotated, old logs are removed             

rotating pattern: /etc/init.d/apache2 reload > /dev/null
                fi                                      
        endscript                                       
}                                                       


 weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /etc/init.d/apache2              
  log does not need rotating                     
considering log reload                           
error: stat of reload failed: No such file or directory
considering log >                                      
error: stat of > failed: No such file or directory     
considering log /dev/null                              
  log does not need rotating                           
considering log fi                                     
error: stat of fi failed: No such file or directory    
considering log endscript                              
error: stat of endscript failed: No such file or directory
considering log }                                         
error: stat of } failed: No such file or directory        


rotating pattern: /var/log/apt/term.log  monthly (6 rotations)
...



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to