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