|
|
04eccc |
From 13a348670fef0047555395ce6977e86e0005f8bd Mon Sep 17 00:00:00 2001
|
|
|
e0630b |
From: Bastien Nocera <hadess@hadess.net>
|
|
|
e0630b |
Date: Wed, 13 Sep 2017 15:37:11 +0200
|
|
|
04eccc |
Subject: [PATCH 3/4] systemd: Add more filesystem lockdown
|
|
|
e0630b |
|
|
|
e0630b |
We can only access the configuration file as read-only and read-write
|
|
|
e0630b |
to the Bluetooth cache directory and sub-directories.
|
|
|
e0630b |
---
|
|
|
04eccc |
Makefile.am | 3 +++
|
|
|
e0630b |
src/bluetooth.service.in | 4 ++++
|
|
|
04eccc |
2 files changed, 7 insertions(+)
|
|
|
e0630b |
|
|
|
e0630b |
diff --git a/Makefile.am b/Makefile.am
|
|
|
04eccc |
index ac88c12e0..0a6d09847 100644
|
|
|
e0630b |
--- a/Makefile.am
|
|
|
e0630b |
+++ b/Makefile.am
|
|
|
04eccc |
@@ -617,6 +617,9 @@
|
|
|
e0630b |
|
|
|
e0630b |
SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
|
|
|
b05691 |
$(SED) -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
|
|
|
04eccc |
+ -e 's,@libexecdir\@,$(libexecdir),g' \
|
|
|
e0630b |
+ -e 's,@statedir\@,$(statedir),g' \
|
|
|
e0630b |
+ -e 's,@confdir\@,$(confdir),g' \
|
|
|
e0630b |
< $< > $@
|
|
|
e0630b |
|
|
|
04eccc |
if RUN_RST2MAN
|
|
|
e0630b |
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
|
|
|
b05691 |
index 7c2f60bb4..4daedef2a 100644
|
|
|
e0630b |
--- a/src/bluetooth.service.in
|
|
|
e0630b |
+++ b/src/bluetooth.service.in
|
|
|
e0630b |
@@ -17,6 +17,10 @@ LimitNPROC=1
|
|
|
e0630b |
ProtectHome=true
|
|
|
e0630b |
ProtectSystem=full
|
|
|
e0630b |
PrivateTmp=true
|
|
|
e0630b |
+ProtectKernelTunables=true
|
|
|
e0630b |
+ProtectControlGroups=true
|
|
|
e0630b |
+ReadWritePaths=@statedir@
|
|
|
e0630b |
+ReadOnlyPaths=@confdir@
|
|
|
e0630b |
|
|
|
e0630b |
# Privilege escalation
|
|
|
e0630b |
NoNewPrivileges=true
|
|
|
e0630b |
--
|
|
|
04eccc |
2.21.0
|
|
|
e0630b |
|