Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

1.88. logrotate

1.88.1. RHBA-2011:0816: logrotate bug fix update

An updated logrotate package that fixes various bugs is now available for Red Hat Enterprise Linux 5.
The logrotate utility simplifies the administration of multiple log files, allowing the automatic rotation, compression, removal, and mailing of log files.
This update fixes the following bugs:
* When the logrotate.status file was corrupted, the logrotate utility correctly displayed an error message, but did not return a non-zero exit code to indicate a failure. With this update, a patch has been applied to address this issue, and a corrupted logrotate.status file now causes logrotate to terminate with error code 1 as expected. (BZ#461494)
* The "size" configuration option allows a user to specify the minimum size a particular file must reach in order for logrotate to start rotating it. Prior to this update, the maximum supported value of this option was limited to 4 gigabytes. With this update, this limit has been increased to 16 exabytes. (BZ#484075)
* When used to rotate the /var/log/btmp file, previous versions of the logrotate utility incorrectly changed the permissions of this file to "0644". With this update, a default configuration entry for the /var/log/btmp file has been added to ensure the permissions are correctly set to "0600". (BZ#485553)
* The "missingok" configuration option allows a user to prevent the logrotate utility from reporting an error when a particular log file is missing. Previously, the presence of a wildcard character (typically "*") in a file name caused logrotate to ignore this option. With this update, a patch has been applied to address this issue, and the use of the wildcard characters in the file names no longer causes logrotate to ignore the "missingok" option. (BZ#540119)
* Prior to this update, when the logrotate utility failed to rename a log file, it did not detect this error and incorrectly overwrote or even deleted the original file. To prevent a loss of potentially important logs, this update adapts the utility not to rotate files that cannot be renamed. (BZ#567365)
* Previously, a recursive use of the "include" directive in a configuration file caused the logrotate utility to terminate unexpectedly with a segmentation fault. This update applies an upstream patch that limits the maximum level of recursion, and the recursive use of the "include" directive no longer causes logrotate to crash. (BZ#574784)
* Due to an error in the application logic, the logrotate utility passed an argument with a wildcard to the prerotate and postrotate scripts even when the "sharedscripts" configuration option was specified. With this update, this error no longer occurs, and specifying the "sharedscripts" option now causes logrotate to correctly pass a full path to a particular log. (BZ#579680)
* Previously, the logrotate(8) manual page did not provide a description of the arguments that are passed to the prerotate and postrotate scripts. This update extends the manual page to include this information. (BZ#474013)
* Previously, the "AUTHORS" section of the logrotate(8) manual page did not include the current maintainer of the logrotate utility. This error has been fixed, and logrotate(8) now contains an up-to-date list of authors. Additionally, the manual page now provides a link to the project homepage. (BZ#622059)
* In the logrotate(8) manual page, the description of the "size" configuration option stated that log files are rotated when they grow bigger than the specified file size. Since this description was rather vague, this update corrects the manual page to provide a more accurate description of this option. (BZ#638591)
* Previously, the logrotate(8) manual page did not provide a description of the "-?", "--help", "--verbose", and "--debug" command line options. This error has been fixed, and the manual page now covers all supported command line options as expected. (BZ#642936)
All users of logrotate are advised to upgrade to this updated package, which fixes these bugs.