about summary refs log tree commit diff
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2020-06-21 17:01:34 +0200
committerAlyssa Ross <hi@alyssa.is>2020-07-13 23:47:47 +0000
commit45223989b7d9f4652bf1f6389a004b087e145c68 (patch)
treea3d8947c79db685065d5da05edc1c11b47507f79
parentabb58fdc282a79f313144e11489d4e0aee960d23 (diff)
downloadnixlib-45223989b7d9f4652bf1f6389a004b087e145c68.tar
nixlib-45223989b7d9f4652bf1f6389a004b087e145c68.tar.gz
nixlib-45223989b7d9f4652bf1f6389a004b087e145c68.tar.bz2
nixlib-45223989b7d9f4652bf1f6389a004b087e145c68.tar.lz
nixlib-45223989b7d9f4652bf1f6389a004b087e145c68.tar.xz
nixlib-45223989b7d9f4652bf1f6389a004b087e145c68.tar.zst
nixlib-45223989b7d9f4652bf1f6389a004b087e145c68.zip
nixos/users-groups: do not check validity of empty hashes
(cherry picked from commit 751c2ed6e4af9e525fe57b7c0f0ee8a611eab9fa)
-rw-r--r--nixpkgs/nixos/modules/config/users-groups.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixpkgs/nixos/modules/config/users-groups.nix b/nixpkgs/nixos/modules/config/users-groups.nix
index d9261e16773d..278f9ab6d25a 100644
--- a/nixpkgs/nixos/modules/config/users-groups.nix
+++ b/nixpkgs/nixos/modules/config/users-groups.nix
@@ -618,7 +618,8 @@ in {
           content = "${base64}${sep}${base64}";
           mcf = "^${sep}${scheme}${sep}${content}$";
         in
-        if (user.hashedPassword != null
+        if (user.hashedPassword != null   # login disabled
+            && user.hashedPassword != ""  # login without password
             && builtins.match mcf user.hashedPassword == null)
         then
         ''