syslogd: Only default to log rotation on actual files

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-12-09 13:42:05 +01:00
parent d6b7cd6134
commit 7ee7df058b

View File

@ -2336,10 +2336,6 @@ static struct filed *cfline(char *line)
return NULL;
}
/* default rotate from command line */
f->f_rotatecount = RotateCnt;
f->f_rotatesz = RotateSz;
/* scan through the list of selectors */
for (p = line; *p && *p != '\t' && *p != ' ';) {
@ -2544,6 +2540,14 @@ static struct filed *cfline(char *line)
f->f_flags |= RFC3164;
break;
case F_FILE:
/* default rotate from command line */
if (f->f_rotatesz == 0) {
f->f_rotatecount = RotateCnt;
f->f_rotatesz = RotateSz;
}
/* fallthrough */
default:
/* All other targets default to RFC3164 */
if (f->f_flags & (RFC3164 | RFC5424))