84b277
From 72c01067d266a49796b5c64018b2d8c92840255a Mon Sep 17 00:00:00 2001
84b277
From: =?UTF-8?q?Micha=C5=82=20Bartoszkiewicz?= <mbartoszkiewicz@gmail.com>
84b277
Date: Thu, 26 Jun 2014 22:11:35 +0200
84b277
Subject: [PATCH] journald: make MaxFileSec really default to 1month
84b277
84b277
journald.conf(5) states that the default for MaxFileSec is one month,
84b277
but the code didn't respect that.
84b277
84b277
(cherry-picked from e150e82097211f09b911c7784a89ef9efed713ca)
84b277
84b277
Resolves: #1147524
84b277
---
84b277
 src/journal/journald-server.c | 3 +++
84b277
 1 file changed, 3 insertions(+)
84b277
84b277
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
84b277
index 1fcb3d5..a289a50 100644
84b277
--- a/src/journal/journald-server.c
84b277
+++ b/src/journal/journald-server.c
84b277
@@ -67,6 +67,7 @@
84b277
 #define DEFAULT_SYNC_INTERVAL_USEC (5*USEC_PER_MINUTE)
84b277
 #define DEFAULT_RATE_LIMIT_INTERVAL (30*USEC_PER_SEC)
84b277
 #define DEFAULT_RATE_LIMIT_BURST 1000
84b277
+#define DEFAULT_MAX_FILE_USEC USEC_PER_MONTH
84b277
 
84b277
 #define RECHECK_AVAILABLE_SPACE_USEC (30*USEC_PER_SEC)
84b277
 
84b277
@@ -1476,6 +1477,8 @@ int server_init(Server *s) {
84b277
 
84b277
         s->forward_to_syslog = true;
84b277
 
84b277
+        s->max_file_usec = DEFAULT_MAX_FILE_USEC;
84b277
+
84b277
         s->max_level_store = LOG_DEBUG;
84b277
         s->max_level_syslog = LOG_DEBUG;
84b277
         s->max_level_kmsg = LOG_NOTICE;