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