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