--- logrotate/config.c +++ logrotate/config.c @@ -113,7 +113,8 @@ enum { static char *defTabooExts[] = { ".rpmsave", ".rpmorig", "~", ",v", ".disabled", ".dpkg-old", ".dpkg-dist", ".dpkg-new", ".cfsaved", ".ucf-old", ".ucf-dist", ".ucf-new", - ".rpmnew", ".swp", ".cfsaved", ".rhn-cfg-tmp-*" + ".rpmnew", ".swp", ".cfsaved", ".rhn-cfg-tmp-*", + ".gz", ".bz2", ".xz", ".[0-9]", ".[0-9][0-9]", ".[0-9][0-9][0-9]" }; static int defTabooCount = sizeof(defTabooExts) / sizeof(char *); @@ -1420,6 +1420,8 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig) } } } + if (!checkFile(globResult.gl_pathv[i])) + continue; newlog->files[newlog->numFiles] = strdup(globResult.gl_pathv[i]); --- logrotate/logrotate.8 +++ logrotate/logrotate.8 @@ -540,7 +540,29 @@ The current taboo extension list is changed (see the \fBinclude\fR directive for information on the taboo extensions). If a + precedes the list of extensions, the current taboo extension list is augmented, otherwise it is replaced. At startup, the taboo extension list -contains .rpmsave, .rpmorig, ~, .disabled, .dpkg\-old, .dpkg\-dist, .dpkg\-new, .cfsaved, .ucf\-old, .ucf\-dist, .ucf\-new, .rpmnew, .swp, .cfsaved, .rhn\-cfg\-tmp\-* +contains +.IR ~ , +.IR .bz2 , +.IR .cfsaved , +.IR .cfsaved , +.IR .disabled , +.IR .dpkg\-dist , +.IR .dpkg\-new , +.IR .dpkg\-old , +.IR .gz , +.IR .rhn\-cfg\-tmp\-* , +.IR .rpmnew , +.IR .rpmorig , +.IR .rpmsave , +.IR .swp , +.IR .ucf\-dist , +.IR .ucf\-new , +.IR .ucf\-old , +.IR .xz , +.IR .[0-9] , +.IR .[0-9][0-9] , +and +.IR .[0-9][0-9][0-9] . .TP \fBweekly\fR --- logrotate/test/test +++ logrotate/test/test @@ -429,6 +429,54 @@ EOF checkmail test.log.1 newfile +cleanup 991 + +# ------------------------------- Test 991 ------------------------------------ +mkdir subdir +preptest subdir/sample.log 991 8 +$RLR test-config.991 --force + +checkoutput < subdir/sample.log +$RLR test-config.992 --force + +checkoutput <