]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: set LockPersonality= for all our long-running services (#6819)
authorLennart Poettering <lennart@poettering.net>
Thu, 14 Sep 2017 17:45:40 +0000 (19:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Sep 2017 17:45:40 +0000 (19:45 +0200)
Let's lock things down. Also, using it is the only way how to properly
test this to the fullest extent.

16 files changed:
TODO
units/systemd-coredump@.service.in
units/systemd-hostnamed.service.in
units/systemd-importd.service.in
units/systemd-journal-gatewayd.service.in
units/systemd-journal-remote.service.in
units/systemd-journal-upload.service.in
units/systemd-journald.service.in
units/systemd-localed.service.in
units/systemd-logind.service.in
units/systemd-machined.service.in
units/systemd-networkd.service.in
units/systemd-resolved.service.in
units/systemd-timedated.service.in
units/systemd-timesyncd.service.in
units/systemd-udevd.service.in

diff --git a/TODO b/TODO
index e65733e33405563eb23d8eaa9c506c78314c04a6..cabba100a521ad08eee4af7a93dab0d0c2bb04cb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -27,8 +27,6 @@ Features:
 * dissect: when we discover squashfs, don't claim we had a "writable" partition
   in systemd-dissect
 
-* set LockPersonality= on all our services
-
 * Add AddUser= setting to unit files, similar to DynamicUser=1 which however
   creates a static, persistent user rather than a dynamic, transient user. We
   can leverage code from sysusers.d for this.
index c699a80f3428297f78343762f4f40d8177c45364..d7eaf3398e7070bee39ddb7e173c7f71ef43fcf5 100644 (file)
@@ -33,4 +33,5 @@ RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 StateDirectory=systemd/coredump
index d29e9ff81be325c849bbebddecdb02b6d5dec99c..9bb5ad8cac002f6c72edf1ba2097c179cfcb6367 100644 (file)
@@ -29,4 +29,5 @@ RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 ReadWritePaths=/etc
index 58762055eb6a569c8e1187ac7fce9ed3c77fbdc8..695a5f21cb0066b13d23642e10ca5c996c5c3e03 100644 (file)
@@ -23,3 +23,4 @@ RestrictNamespaces=net
 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
index fd7a9718f7391ebed8442ec565990ba3c9f3cb51..b24d698c8a373c94db6dc35d0838f76c28a6ad1b 100644 (file)
@@ -25,6 +25,7 @@ RestrictRealtime=yes
 RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
 SystemCallArchitectures=native
+LockPersonality=yes
 
 # If there are many split upjournal files we need a lot of fds to
 # access them all and combine
index c24e673d8251ddb20676e6b7f8d3fc8db4aa53b3..92cec21c2fbe8978b8f7e6726a090a4c953c5069 100644 (file)
@@ -27,6 +27,7 @@ RestrictRealtime=yes
 RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
 SystemCallArchitectures=native
+LockPersonality=yes
 LogsDirectory=journal/remote
 
 [Install]
index b0bee3925e3194987ff78897d5cdfbe1ebd971a8..98a4b2bb7af15e62c860d6dcad46366a66a59187 100644 (file)
@@ -28,6 +28,7 @@ RestrictRealtime=yes
 RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
 SystemCallArchitectures=native
+LockPersonality=yes
 StateDirectory=systemd/journal-upload
 
 # If there are many split up journal files we need a lot of fds to
index 1e86d636485618cdf74fe27fc885a3fbcac97b6b..07e03e736ef7cae33997a9334aec9bf6e537dfae 100644 (file)
@@ -29,6 +29,7 @@ RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX AF_NETLINK
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 
 # Increase the default a bit in order to allow many simultaneous
 # services being run since we keep one fd open per service. Also, when
index 90a913881acdd5924e288760798398eeb6f7964f..1366fa791069cc4eff509bb2670391285b15c2f5 100644 (file)
@@ -29,4 +29,5 @@ RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 ReadWritePaths=/etc
index f851373658bad3658a383457030b07497629f656..f6daf7755cd1ccbc08692e528cb1922d774131a4 100644 (file)
@@ -30,6 +30,7 @@ RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 FileDescriptorStoreMax=512
 
 # Increase the default a bit in order to allow many simultaneous
index a4f86aa7c87de98b676c689ae711329963d2a150..fb4df3829310f3e1bde8a5cde7f9460c71e2633b 100644 (file)
@@ -23,6 +23,7 @@ RestrictRealtime=yes
 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 
 # Note that machined cannot be placed in a mount namespace, since it
 # needs access to the host's mount namespace in order to implement the
index 3f0ad77b7d2a9b0f1afcffbb1017ca08810ad237..932dd63964983f0441dffc963f0af36652d6a1d6 100644 (file)
@@ -34,6 +34,7 @@ RestrictRealtime=yes
 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 RuntimeDirectory=systemd/netif
 RuntimeDirectoryPreserve=yes
 
index ba8d3f6bb1656e1760c09cb00626a09ca6ec9cf0..cda83ee9666ceb2a704700ea3cb4dce205248094 100644 (file)
@@ -36,6 +36,7 @@ RestrictRealtime=yes
 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 RuntimeDirectory=systemd/resolve
 RuntimeDirectoryPreserve=yes
 
index 2b5f0744c9bfa7e7752bbaa896c5cf8c53136b0e..9fca1d1905d039a5e1c7813fa953ee1acdb7f146 100644 (file)
@@ -27,4 +27,5 @@ RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX
 SystemCallFilter=~@cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 ReadWritePaths=/etc
index a6e14d24d1384c1bb97f29040020eec9903c001d..8d3f46cf5e227942f24a1b7b8567648c9239f177 100644 (file)
@@ -38,6 +38,7 @@ RestrictNamespaces=yes
 RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
 SystemCallFilter=~@cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap
 SystemCallArchitectures=native
+LockPersonality=yes
 StateDirectory=systemd/timesync
 
 [Install]
index 3b92c6a8662cb760d870bdf58c225b1cae59761a..d3d13ed7cf2ef3291267fb5b02d4e0a3f3277f58 100644 (file)
@@ -28,3 +28,4 @@ MemoryDenyWriteExecute=yes
 RestrictRealtime=yes
 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
 SystemCallArchitectures=native
+LockPersonality=yes