From 21bb7ea94809608f2a8e2516b55ef8f34fe35e3b Mon Sep 17 00:00:00 2001 From: Izorkin Date: Wed, 16 Oct 2024 16:43:04 +0300 Subject: [PATCH] nixos/dhcpcd: update sandboxing options --- nixos/modules/services/networking/dhcpcd.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index 4e3f21c0f3e4..ed4a0951f704 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -249,6 +249,7 @@ in ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind"; Restart = "always"; AmbientCapabilities = [ "CAP_NET_ADMIN" "CAP_NET_RAW" "CAP_NET_BIND_SERVICE" ]; + CapabilityBoundingSet = [ "CAP_NET_ADMIN" "CAP_NET_RAW" "CAP_NET_BIND_SERVICE" ]; ReadWritePaths = [ "/proc/sys/net/ipv4" ] ++ lib.optional cfgN.enableIPv6 "/proc/sys/net/ipv6" ++ lib.optionals useResolvConf ([ "/run/resolvconf" ] ++ config.networking.resolvconf.subscriberFiles); @@ -276,7 +277,7 @@ in RestrictSUIDSGID = true; SystemCallFilter = [ "@system-service" - "~@aio" "~@chown" "~@keyring" "~@memlock" + "~@aio" "~@keyring" "~@memlock" "~@mount" "~@privileged" "~@resources" ]; SystemCallArchitectures = "native"; UMask = "0027";