From 5f27abec233604ebe543e4fc833f282a7c835b3f Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 8 Mar 2017 00:42:20 +0100 Subject: [PATCH] nixos/dnscrypt-proxy: more fs isolation for the updater It'd be better to do the update as an unprivileged user; for now, we do our best to minimize the surface available. We filter mount syscalls to prevent the process from undoing the fs isolation. --- nixos/modules/services/networking/dnscrypt-proxy.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dnscrypt-proxy.nix b/nixos/modules/services/networking/dnscrypt-proxy.nix index 636caf25a55..ad1559e21df 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy.nix @@ -285,7 +285,9 @@ in PrivateTmp = true; PrivateDevices = true; ProtectHome = true; - ProtectSystem = true; + ProtectSystem = "strict"; + ReadWritePaths = "${dirOf stateDirectory} ${stateDirectory}"; + SystemCallFilter = "~@mount"; }; };