Blame SOURCES/0217-man-document-systemd-analyze-security.patch

ddca0b
From d11fdacaf3c804b60dfe8371062f34ac2b624ac9 Mon Sep 17 00:00:00 2001
ddca0b
From: Jan Synacek <jsynacek@redhat.com>
ddca0b
Date: Fri, 13 Sep 2019 09:23:32 +0200
ddca0b
Subject: [PATCH] man: document systemd-analyze security
ddca0b
ddca0b
(cherry-picked from commit ee93c1e664a7bbc59f1578e285c871999507b14d)
ddca0b
ddca0b
Resolves: #1750343
ddca0b
---
ddca0b
 man/systemd-analyze.xml | 29 +++++++++++++++++++++++++++++
ddca0b
 1 file changed, 29 insertions(+)
ddca0b
ddca0b
diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml
ddca0b
index 7aa10fc68e..f3b595880f 100644
ddca0b
--- a/man/systemd-analyze.xml
ddca0b
+++ b/man/systemd-analyze.xml
ddca0b
@@ -106,6 +106,12 @@
ddca0b
       <arg choice="plain">service-watchdogs</arg>
ddca0b
       <arg choice="opt"><replaceable>BOOL</replaceable></arg>
ddca0b
     </cmdsynopsis>
ddca0b
+    <cmdsynopsis>
ddca0b
+      <command>systemd-analyze</command>
ddca0b
+      <arg choice="opt" rep="repeat">OPTIONS</arg>
ddca0b
+      <arg choice="plain">security</arg>
ddca0b
+      <arg choice="plain" rep="repeat"><replaceable>UNIT</replaceable></arg>
ddca0b
+    </cmdsynopsis>
ddca0b
   </refsynopsisdiv>
ddca0b
 
ddca0b
   <refsect1>
ddca0b
@@ -253,6 +259,29 @@ NAutoVTs=8
ddca0b
     <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
ddca0b
     The hardware watchdog is not affected by this setting.</para>
ddca0b
 
ddca0b
+    <para><command>systemd-analyze security</command> analyzes the security and sandboxing settings of one or more
ddca0b
+    specified service units. If at least one unit name is specified the security settings of the specified service
ddca0b
+    units are inspected and a detailed analysis is shown. If no unit name is specified, all currently loaded,
ddca0b
+    long-running service units are inspected and a terse table with results shown. The command checks for various
ddca0b
+    security-related service settings, assigning each a numeric "exposure level" value, depending on how important a
ddca0b
+    setting is. It then calculates an overall exposure level for the whole unit, which is an estimation in the range
ddca0b
+    0.0…10.0 indicating how exposed a service is security-wise. High exposure levels indicate very little applied
ddca0b
+    sandboxing. Low exposure levels indicate tight sandboxing and strongest security restrictions. Note that this only
ddca0b
+    analyzes the per-service security features systemd itself implements. This means that any additional security
ddca0b
+    mechanisms applied by the service code itself are not accounted for. The exposure level determined this way should
ddca0b
+    not be misunderstood: a high exposure level neither means that there is no effective sandboxing applied by the
ddca0b
+    service code itself, nor that the service is actually vulnerable to remote or local attacks. High exposure levels
ddca0b
+    do indicate however that most likely the service might benefit from additional settings applied to them. Please
ddca0b
+    note that many of the security and sandboxing settings individually can be circumvented — unless combined with
ddca0b
+    others. For example, if a service retains the privilege to establish or undo mount points many of the sandboxing
ddca0b
+    options can be undone by the service code itself. Due to that is essential that each service uses the most
ddca0b
+    comprehensive and strict sandboxing and security settings possible. The tool will take into account some of these
ddca0b
+    combinations and relationships between the settings, but not all. Also note that the security and sandboxing
ddca0b
+    settings analyzed here only apply to the operations executed by the service code itself. If a service has access to
ddca0b
+    an IPC system (such as D-Bus) it might request operations from other services that are not subject to the same
ddca0b
+    restrictions. Any comprehensive security and sandboxing analysis is hence incomplete if the IPC access policy is
ddca0b
+    not validated too.</para>
ddca0b
+
ddca0b
     <para>If no command is passed, <command>systemd-analyze
ddca0b
     time</command> is implied.</para>
ddca0b