dhcpcd: fix more permissions errors (#351225)
This commit is contained in:
commit
9a415c28ae
@ -161,9 +161,12 @@ in
|
|||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
${lib.getExe cfg.package} -u
|
${lib.getExe cfg.package} -u
|
||||||
files=(/run/resolvconf ${lib.escapeShellArgs cfg.subscriberFiles})
|
chgrp resolvconf ${lib.escapeShellArgs cfg.subscriberFiles}
|
||||||
chgrp -R resolvconf "''${files[@]}"
|
chmod g=u ${lib.escapeShellArgs cfg.subscriberFiles}
|
||||||
chmod -R g=u "''${files[@]}"
|
${lib.getExe' pkgs.acl "setfacl"} -R \
|
||||||
|
-m group:resolvconf:rwx \
|
||||||
|
-m default:group:resolvconf:rwx \
|
||||||
|
/run/resolvconf
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ in
|
|||||||
ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind";
|
ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
AmbientCapabilities = [ "CAP_NET_ADMIN" "CAP_NET_RAW" "CAP_NET_BIND_SERVICE" ];
|
AmbientCapabilities = [ "CAP_NET_ADMIN" "CAP_NET_RAW" "CAP_NET_BIND_SERVICE" ];
|
||||||
ReadWritePaths = [ "/proc/sys/net/ipv6" ]
|
ReadWritePaths = [ "/proc/sys/net/ipv4" "/proc/sys/net/ipv6" ]
|
||||||
++ lib.optionals useResolvConf ([ "/run/resolvconf" ] ++ config.networking.resolvconf.subscriberFiles);
|
++ lib.optionals useResolvConf ([ "/run/resolvconf" ] ++ config.networking.resolvconf.subscriberFiles);
|
||||||
DeviceAllow = "";
|
DeviceAllow = "";
|
||||||
LockPersonality = true;
|
LockPersonality = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user