gerd.lldap: patch to allow starting when resetting admin password

This commit is contained in:
eyjhb 2024-08-26 15:04:58 +02:00
parent 46b64d7ce3
commit 692620ab4b
No known key found for this signature in database
GPG key ID: 609F508E3239F920

View file

@ -1,11 +1,31 @@
{ config, lib, ... }: { config, lib, pkgs, ... }:
let let
svc_domain = "ldap.${config.mine.shared.settings.domain}"; svc_domain = "ldap.${config.mine.shared.settings.domain}";
resetPasswordStartPatch = pkgs.writeText "lldap-reset-password-start.patch" ''
diff --git a/server/src/main.rs b/server/src/main.rs
index 71e4928..63be13c 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -158,7 +158,7 @@ async fn set_up_server(config: Configuration) -> Result<ServerBuilder> {
))?;
}
if config.force_update_private_key || config.force_ldap_user_pass_reset {
- bail!("Restart the server without --force-update-private-key or --force-ldap-user-pass-reset to continue.");
+ // bail!("Restart the server without --force-update-private-key or --force-ldap-user-pass-reset to continue.");
}
let server_builder = infra::ldap_server::build_ldap_server(
&config,
'';
in { in {
services.lldap = { services.lldap = {
enable = true; enable = true;
package = pkgs.lldap.overrideAttrs (old: {
patches = old.patches ++ [ resetPasswordStartPatch ];
});
settings = { settings = {
verbose = true; verbose = true;
ldap_user_email = "fricloudlldap.grief462@simplelogin.com"; ldap_user_email = "fricloudlldap.grief462@simplelogin.com";