]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Allow plain mecanism for users login
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 25 Nov 2023 23:01:39 +0000 (00:01 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 25 Nov 2023 23:10:24 +0000 (00:10 +0100)
deploy/flake.lock
flake.lock
flakes/flake.lock
systems/eldiron/base.nix

index f2517ef5d3785c2765baceed4ed307217ea0b1f6..74f3cb350b0753f957474e7a502ae5d5df6408de 100644 (file)
       },
       "locked": {
         "lastModified": 1,
-        "narHash": "sha256-ICKEuT8YaVKsXgdau986YYMhcH+DfeOyD3XQBKUTMOM=",
+        "narHash": "sha256-JZAb5V2upUFe8gDKiHtA0iksciLTuZgtLikxZpE2ZkY=",
         "path": "../flakes",
         "type": "path"
       },
       },
       "locked": {
         "lastModified": 1,
-        "narHash": "sha256-PRhCKLyFpkmjr/RviVw7h3ZBWVHGmlwH1+z9gWIdXsI=",
+        "narHash": "sha256-2TyPGrTzqaeWyBTV2ASZ7Om9XFgFXfuE0dlYrPA5ozI=",
         "path": "../systems/eldiron",
         "type": "path"
       },
index 47a4bd660c00364575444954893bbe41c688f01c..19de0cb77dc3fff7653a5b04a67233431d09cee1 100644 (file)
       },
       "locked": {
         "lastModified": 1,
-        "narHash": "sha256-ICKEuT8YaVKsXgdau986YYMhcH+DfeOyD3XQBKUTMOM=",
+        "narHash": "sha256-JZAb5V2upUFe8gDKiHtA0iksciLTuZgtLikxZpE2ZkY=",
         "path": "./flakes",
         "type": "path"
       },
       },
       "locked": {
         "lastModified": 1,
-        "narHash": "sha256-PRhCKLyFpkmjr/RviVw7h3ZBWVHGmlwH1+z9gWIdXsI=",
+        "narHash": "sha256-2TyPGrTzqaeWyBTV2ASZ7Om9XFgFXfuE0dlYrPA5ozI=",
         "path": "../systems/eldiron",
         "type": "path"
       },
index 6dcee3da21b2f95925911096f596deb0c0fd2847..051086e95042d7f5a0f6e178c22d25af14a57f17 100644 (file)
       },
       "locked": {
         "lastModified": 1,
-        "narHash": "sha256-PRhCKLyFpkmjr/RviVw7h3ZBWVHGmlwH1+z9gWIdXsI=",
+        "narHash": "sha256-2TyPGrTzqaeWyBTV2ASZ7Om9XFgFXfuE0dlYrPA5ozI=",
         "path": "../systems/eldiron",
         "type": "path"
       },
index 24e05fe7d3f6b5a21a14e3d518d9f52692a1c9fa..a77a438e455d9bbe7c207067e4915f861ef6db2b 100644 (file)
         table = ldap_users
         user_column = login
         pw_type = function
-        auth_query = SELECT (mechanism = 'SSHA' AND password = encode(digest( %p || salt, 'sha1'), 'hex')) FROM ldap_users WHERE login = %u OR login || '@' || realm = %u
+        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
         #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
       '';
     };