summary refs log tree commit diff
path: root/nixos/modules/services/networking/supplicant.nix
diff options
context:
space:
mode:
authorRémy Grünblatt <remy@grunblatt.org>2021-11-16 13:54:34 +0100
committerRémy Grünblatt <remy@grunblatt.org>2021-11-16 13:54:34 +0100
commit9b2faeb38e6f4f33f69d356a000cd5aef02a89c9 (patch)
tree1a5ac7af817eda22100d640ea0fcf0c058568924 /nixos/modules/services/networking/supplicant.nix
parentc6b332cb1a452d6acc3d24d5bebc3f24da5bc3aa (diff)
downloadnixpkgs-9b2faeb38e6f4f33f69d356a000cd5aef02a89c9.tar
nixpkgs-9b2faeb38e6f4f33f69d356a000cd5aef02a89c9.tar.gz
nixpkgs-9b2faeb38e6f4f33f69d356a000cd5aef02a89c9.tar.bz2
nixpkgs-9b2faeb38e6f4f33f69d356a000cd5aef02a89c9.tar.lz
nixpkgs-9b2faeb38e6f4f33f69d356a000cd5aef02a89c9.tar.xz
nixpkgs-9b2faeb38e6f4f33f69d356a000cd5aef02a89c9.tar.zst
nixpkgs-9b2faeb38e6f4f33f69d356a000cd5aef02a89c9.zip
wpa_supplicant: prevent writing non-writable configuration
Diffstat (limited to 'nixos/modules/services/networking/supplicant.nix')
-rw-r--r--nixos/modules/services/networking/supplicant.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/supplicant.nix b/nixos/modules/services/networking/supplicant.nix
index eb24130e519..8df450a11c6 100644
--- a/nixos/modules/services/networking/supplicant.nix
+++ b/nixos/modules/services/networking/supplicant.nix
@@ -43,7 +43,7 @@ let
         path = [ pkgs.coreutils ];
 
         preStart = ''
-          ${optionalString (suppl.configFile.path!=null) ''
+          ${optionalString (suppl.configFile.path!=null && suppl.configFile.writable) ''
             (umask 077 && touch -a "${suppl.configFile.path}")
           ''}
           ${optionalString suppl.userControlled.enable ''