View | Details | Raw Unified | Return to bug 1192449
Collapse All | Expand All

(-)logrotate-3.13.0/config.c (-3 / +13 lines)
Lines 1023-1030 static int readConfigFile(const char *co Link Here
1023
			}
1023
			}
1024
			
1024
			
1025
			if (isalpha((unsigned char)*start)) {
1025
			if (isalpha((unsigned char)*start)) {
1026
				if ((key = isolateWord(&start, &buf, length)) == NULL)
1026
				key = isolateWord(&start, &buf, length);
1027
					continue;
1027
				if (key == NULL) {
1028
					message(MESS_ERROR, "%s:%d failed to parse keyword\n",
1029
                                configFile, lineNum);
1030
                        RAISE_ERROR();
1031
				}
1032
				if (!isspace((unsigned char)*start) && *start != '=') {
1033
                        message(MESS_ERROR, "%s:%d keyword '%s' not properly"
1034
                                " separated, found %#x\n",
1035
                                configFile, lineNum, key, *start);
1036
                        RAISE_ERROR();
1037
                    }
1028
				if (!strcmp(key, "compress")) {
1038
				if (!strcmp(key, "compress")) {
1029
					newlog->flags |= LOG_FLAG_COMPRESS;
1039
					newlog->flags |= LOG_FLAG_COMPRESS;
1030
				} else if (!strcmp(key, "nocompress")) {
1040
				} else if (!strcmp(key, "nocompress")) {
Lines 1770-1776 static int readConfigFile(const char *co Link Here
1770
				message(MESS_ERROR, "%s:%d lines must begin with a keyword "
1780
				message(MESS_ERROR, "%s:%d lines must begin with a keyword "
1771
					"or a filename (possibly in double quotes)\n",
1781
					"or a filename (possibly in double quotes)\n",
1772
					configFile, lineNum);
1782
					configFile, lineNum);
1773
					state = STATE_SKIP_LINE;
1783
				RAISE_ERROR();
1774
			}
1784
			}
1775
			break;
1785
			break;
1776
		case STATE_SKIP_LINE:
1786
		case STATE_SKIP_LINE:

Return to bug 1192449