daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
1abbee
From f6a8db04fb20d142e514d805c613a1b3e70c454d Mon Sep 17 00:00:00 2001
1abbee
From: Michael Scherer <misc@redhat.com>
1abbee
Date: Sun, 20 Dec 2015 13:23:33 +0100
1abbee
Subject: [PATCH] Add Seal option in the configuration file for journald-remote
1abbee
1abbee
While journal received remotely can be sealed, it can only be done
1abbee
on the command line using --seal, so for consistency, we will
1abbee
also permit to set it in the configuration file.
1abbee
1abbee
Cherry-picked from: 9d3737f13e9b38f88ed7acc800db66c2f025fac9
1abbee
Resolves: #1329233
1abbee
---
1abbee
 man/journal-remote.conf.xml               | 7 +++++++
1abbee
 src/journal-remote/journal-remote.c       | 1 +
1abbee
 src/journal-remote/journal-remote.conf.in | 1 +
1abbee
 3 files changed, 9 insertions(+)
1abbee
1abbee
diff --git a/man/journal-remote.conf.xml b/man/journal-remote.conf.xml
Pablo Greco 48fc63
index a7b2227182..9a385c7e5e 100644
1abbee
--- a/man/journal-remote.conf.xml
1abbee
+++ b/man/journal-remote.conf.xml
1abbee
@@ -72,6 +72,13 @@
1abbee
     <literal>[Remote]</literal> section:</para>
1abbee
 
1abbee
     <variablelist>
1abbee
+      <varlistentry>
1abbee
+        <term><varname>Seal=</varname></term>
1abbee
+
1abbee
+        <listitem><para>Periodically sign the data in the journal using Forward Secure Sealing.
1abbee
+        </para></listitem>
1abbee
+      </varlistentry>
1abbee
+
1abbee
 
1abbee
       <varlistentry>
1abbee
         <term><varname>SplitMode=</varname></term>
1abbee
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
Pablo Greco 48fc63
index b7cc6d7172..9c515f9c8f 100644
1abbee
--- a/src/journal-remote/journal-remote.c
1abbee
+++ b/src/journal-remote/journal-remote.c
1abbee
@@ -1174,6 +1174,7 @@ static DEFINE_CONFIG_PARSE_ENUM(config_parse_write_split_mode,
1abbee
 
1abbee
 static int parse_config(void) {
1abbee
         const ConfigTableItem items[] = {
1abbee
+                { "Remote",  "Seal",                   config_parse_bool,             0, &arg_seal       },
1abbee
                 { "Remote",  "SplitMode",              config_parse_write_split_mode, 0, &arg_split_mode },
1abbee
                 { "Remote",  "ServerKeyFile",          config_parse_path,             0, &arg_key        },
1abbee
                 { "Remote",  "ServerCertificateFile",  config_parse_path,             0, &arg_cert       },
1abbee
diff --git a/src/journal-remote/journal-remote.conf.in b/src/journal-remote/journal-remote.conf.in
Pablo Greco 48fc63
index 3e32f34def..7122d63362 100644
1abbee
--- a/src/journal-remote/journal-remote.conf.in
1abbee
+++ b/src/journal-remote/journal-remote.conf.in
1abbee
@@ -1,4 +1,5 @@
1abbee
 [Remote]
1abbee
+# Seal=false
1abbee
 # SplitMode=host
1abbee
 # ServerKeyFile=@CERTIFICATEROOT@/private/journal-remote.pem
1abbee
 # ServerCertificateFile=@CERTIFICATEROOT@/certs/journal-remote.pem