logrotate/logrotate-3.7.9-compressoptions.patch

16 lines
714 B
Diff
Raw Normal View History

Index: logrotate-3.8.1/config.c
===================================================================
--- logrotate-3.8.1.orig/config.c
+++ logrotate-3.8.1/config.c
@@ -192,7 +192,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;