mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
nixos/wireless: restrict chown /etc/wpa_supplicant scope
Otherwise the recursive chown can fail, hence wpa_supplicant doesn't start, if some read-only file has been bind-mounted into /etc/wpa_supplicant. This can happen if one uses `extraConfigFile` to add a file that is under /etc/wpa_supplicant.
This commit is contained in:
@@ -123,7 +123,8 @@ let
|
||||
# set up imperative config file
|
||||
"+${pkgs.coreutils}/bin/touch /etc/wpa_supplicant/imperative.conf"
|
||||
"+${pkgs.coreutils}/bin/chmod 664 /etc/wpa_supplicant/imperative.conf"
|
||||
"+${pkgs.coreutils}/bin/chown -R wpa_supplicant:wpa_supplicant /etc/wpa_supplicant"
|
||||
"+${pkgs.coreutils}/bin/chown wpa_supplicant:wpa_supplicant /etc/wpa_supplicant"
|
||||
"+${pkgs.coreutils}/bin/chown wpa_supplicant:wpa_supplicant /etc/wpa_supplicant/imperative.conf"
|
||||
]
|
||||
++ lib.optionals cfg.userControlled [
|
||||
# set up client sockets directory
|
||||
|
||||
Reference in New Issue
Block a user