forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path9005-journal-disable-keyed-hashes-for-compatibility.patch
38 lines (31 loc) · 1.39 KB
/
9005-journal-disable-keyed-hashes-for-compatibility.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From cedff283957de7bb7f01af87c5f68802436e4a55 Mon Sep 17 00:00:00 2001
From: Ben Cressey <bcressey@amazon.com>
Date: Thu, 12 Nov 2020 16:18:15 +0000
Subject: [PATCH 9005/9007] journal: disable keyed hashes for compatibility
Otherwise the journal is not readable by older versions of systemd.
This is applied as a patch so it will fail to apply when upstream
removes the environment variable override.
Signed-off-by: Ben Cressey <bcressey@amazon.com>
---
src/libsystemd/sd-journal/journal-file.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c
index 505e4f7..d184ec6 100644
--- a/src/libsystemd/sd-journal/journal-file.c
+++ b/src/libsystemd/sd-journal/journal-file.c
@@ -3290,13 +3290,12 @@ int journal_file_open(
#endif
};
- /* We turn on keyed hashes by default, but provide an environment variable to turn them off, if
- * people really want that */
+ /* Turn off keyed hashes by default. */
r = getenv_bool("SYSTEMD_JOURNAL_KEYED_HASH");
if (r < 0) {
if (r != -ENXIO)
log_debug_errno(r, "Failed to parse $SYSTEMD_JOURNAL_KEYED_HASH environment variable, ignoring.");
- f->keyed_hash = true;
+ f->keyed_hash = false;
} else
f->keyed_hash = r;
--
2.33.1