logrotate/logrotate-3.7.9-compressoptions.patch
2011-09-07 14:34:08 +00:00

16 lines
714 B
Diff

Index: logrotate-3.7.9/config.c
===================================================================
--- logrotate-3.7.9.orig/config.c
+++ logrotate-3.7.9/config.c
@@ -101,7 +139,9 @@ static char *readPath(const char *config
chptr = start;
while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 ) {
- if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) || iswblank(pwc) ) {
+ if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) ||
+ /* allow more compress options separated by whitespace */
+ ( strcmp(key, "compressoptions") && iswblank(pwc) ) ) {
message(MESS_ERROR, "%s:%d bad %s path %s\n",
configFile, lineNum, key, start);
return NULL;