diff options
author | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
---|---|---|
committer | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
commit | 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch) | |
tree | b9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/logrotate/patches/patch-config_c |
Initial import
Diffstat (limited to 'package/logrotate/patches/patch-config_c')
-rw-r--r-- | package/logrotate/patches/patch-config_c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/package/logrotate/patches/patch-config_c b/package/logrotate/patches/patch-config_c new file mode 100644 index 000000000..deea32c0f --- /dev/null +++ b/package/logrotate/patches/patch-config_c @@ -0,0 +1,59 @@ +$Id$ +--- logrotate-3.7.1.orig/config.c Thu Aug 7 13:13:14 2003 ++++ logrotate-3.7.1/config.c Sat Jan 20 18:54:35 2007 +@@ -142,12 +142,17 @@ static int checkFile(const char * fname) + (!fname[1] || (fname[1] == '.' && !fname[2]))) + return 0; + ++ /* Don't include 'hidden' files either; this breaks Gentoo ++ portage config file management http://bugs.gentoo.org/87683 */ ++ if (fname[0] == '.') ++ return 0; ++ + /* Check if fname is ending in a taboo-extension; if so, return + false */ + for (i = 0; i < tabooCount; i++) { + if (!strcmp(fname + strlen(fname) - strlen(tabooExts[i]), + tabooExts[i])) { +- message(MESS_ERROR, "Ignoring %s, because of %s " ++ message(MESS_DEBUG, "Ignoring %s, because of %s " + "ending\n", fname, tabooExts[i]); + + return 0; +@@ -511,6 +516,14 @@ static int readConfigFile(const char * c + newlog->flags &= ~LOG_FLAG_IFEMPTY; + + *endtag = oldchar, start = endtag; ++ } else if (!strcmp(start, "dateext")) { ++ newlog->flags |= LOG_FLAG_DATEEXT; ++ ++ *endtag = oldchar, start = endtag; ++ } else if (!strcmp(start, "nodateext")) { ++ newlog->flags &= ~LOG_FLAG_DATEEXT; ++ ++ *endtag = oldchar, start = endtag; + } else if (!strcmp(start, "noolddir")) { + newlog->oldDir = NULL; + +@@ -667,6 +680,21 @@ static int readConfigFile(const char * c + message(MESS_ERROR, "%s:%d bad start count '%s'\n", + configFile, lineNum, start); + return 1; ++ } ++ *endtag = oldchar, start = endtag; ++ } ++ } else if (!strcmp(start, "maxage")) { ++ *endtag = oldchar, start = endtag; ++ ++ if (!isolateValue(configFile, lineNum, "maxage count", &start, ++ &endtag)) { ++ oldchar = *endtag, *endtag = '\0'; ++ ++ newlog->rotateAge = strtoul(start, &chptr, 0); ++ if (*chptr || newlog->rotateAge < 0) { ++ message(MESS_ERROR, "%s:%d bad maximum age '%s'\n", ++ configFile, lineNum, start); ++ return 1; + } + *endtag = oldchar, start = endtag; + } |