aboutsummaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-11-26 00:01:39 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-11-26 00:10:24 +0100
commitce983e8b05d17adbf6b8228b990e5a512835ca56 (patch)
treee845f39b07b007178acff1a60cadab0aa2bf2d71 /systems
parent0503b1f07e839e2da7c2b26139eafeaee627a4a6 (diff)
downloadNix-ce983e8b05d17adbf6b8228b990e5a512835ca56.tar.gz
Nix-ce983e8b05d17adbf6b8228b990e5a512835ca56.tar.zst
Nix-ce983e8b05d17adbf6b8228b990e5a512835ca56.zip
Allow plain mecanism for users login
Diffstat (limited to 'systems')
-rw-r--r--systems/eldiron/base.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/systems/eldiron/base.nix b/systems/eldiron/base.nix
index 24e05fe..a77a438 100644
--- a/systems/eldiron/base.nix
+++ b/systems/eldiron/base.nix
@@ -175,7 +175,7 @@
175 table = ldap_users 175 table = ldap_users
176 user_column = login 176 user_column = login
177 pw_type = function 177 pw_type = function
178 auth_query = SELECT (mechanism = 'SSHA' AND password = encode(digest( %p || salt, 'sha1'), 'hex')) FROM ldap_users WHERE login = %u OR login || '@' || realm = %u 178 auth_query = SELECT ((mechanism = 'SSHA' AND password = encode(digest( %p || salt, 'sha1'), 'hex')) OR (mechanism = 'PLAIN' AND password = %p)) FROM ldap_users WHERE login = %u OR login || '@' || realm = %u
179 #pwd_query = WITH newsalt as (select gen_random_bytes(4)) UPDATE ldap_users SET password = encode(digest( %p || (SELECT * FROM newsalt), 'sha1'), 'hex'), salt = (SELECT * FROM newsalt), mechanism = 'SSHA' WHERE login = %u OR login || '@' || realm = %u 179 #pwd_query = WITH newsalt as (select gen_random_bytes(4)) UPDATE ldap_users SET password = encode(digest( %p || (SELECT * FROM newsalt), 'sha1'), 'hex'), salt = (SELECT * FROM newsalt), mechanism = 'SSHA' WHERE login = %u OR login || '@' || realm = %u
180 ''; 180 '';
181 }; 181 };