Skip to content

Commit 9a415c2

Browse files
authored
dhcpcd: fix more permissions errors (#351225)
2 parents 67bef9e + 483e446 commit 9a415c2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

nixos/modules/config/resolvconf.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,12 @@ in
161161

162162
script = ''
163163
${lib.getExe cfg.package} -u
164-
files=(/run/resolvconf ${lib.escapeShellArgs cfg.subscriberFiles})
165-
chgrp -R resolvconf "''${files[@]}"
166-
chmod -R g=u "''${files[@]}"
164+
chgrp resolvconf ${lib.escapeShellArgs cfg.subscriberFiles}
165+
chmod g=u ${lib.escapeShellArgs cfg.subscriberFiles}
166+
${lib.getExe' pkgs.acl "setfacl"} -R \
167+
-m group:resolvconf:rwx \
168+
-m default:group:resolvconf:rwx \
169+
/run/resolvconf
167170
'';
168171
};
169172

nixos/modules/services/networking/dhcpcd.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ in
249249
ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind";
250250
Restart = "always";
251251
AmbientCapabilities = [ "CAP_NET_ADMIN" "CAP_NET_RAW" "CAP_NET_BIND_SERVICE" ];
252-
ReadWritePaths = [ "/proc/sys/net/ipv6" ]
252+
ReadWritePaths = [ "/proc/sys/net/ipv4" "/proc/sys/net/ipv6" ]
253253
++ lib.optionals useResolvConf ([ "/run/resolvconf" ] ++ config.networking.resolvconf.subscriberFiles);
254254
DeviceAllow = "";
255255
LockPersonality = true;

0 commit comments

Comments
 (0)