From fa8de76521f2de93b6b4bf6e79b0c4a3d90e6d60 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 22 Jul 2022 00:29:21 +0200 Subject: [PATCH] Revert "openldap: load client config from /etc, not the nix store" --- nixos/tests/openldap.nix | 12 +----------- pkgs/development/libraries/openldap/default.nix | 3 +-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/nixos/tests/openldap.nix b/nixos/tests/openldap.nix index 96459d21a5ef..3c388119d5d2 100644 --- a/nixos/tests/openldap.nix +++ b/nixos/tests/openldap.nix @@ -13,17 +13,10 @@ let objectClass: organizationalUnit ou: users ''; - ldapClientConfig = { - enable = true; - loginPam = false; - nsswitch = false; - server = "ldap://"; - base = "dc=example"; - }; testScript = '' machine.wait_for_unit("openldap.service") machine.succeed( - 'ldapsearch -LLL -D "cn=root,dc=example" -w notapassword', + 'ldapsearch -LLL -D "cn=root,dc=example" -w notapassword -b "dc=example"', ) ''; in { @@ -64,7 +57,6 @@ in { }; declarativeContents."dc=example" = dbContents; }; - users.ldap = ldapClientConfig; }; }) { inherit pkgs system; }; @@ -84,7 +76,6 @@ in { rootpw = "notapassword"; declarativeContents."dc=example" = dbContents; }; - users.ldap = ldapClientConfig; }; }) { inherit system pkgs; }; @@ -97,7 +88,6 @@ in { enable = true; configDir = "/var/db/slapd.d"; }; - users.ldap = ldapClientConfig; }; testScript = let diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index e6f2c218a5bf..551a0827eee2 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -97,7 +97,7 @@ stdenv.mkDerivation rec { "CC=${stdenv.cc.targetPrefix}cc" "STRIP=" # Disable install stripping as it breaks cross-compiling. We strip binaries anyway in fixupPhase. "prefix=${placeholder "out"}" - "sysconfdir=/etc" + "sysconfdir=${placeholder "out"}/etc" "systemdsystemunitdir=${placeholder "out"}/lib/systemd/system" # contrib modules require these "moduledir=${placeholder "out"}/lib/modules" @@ -134,7 +134,6 @@ stdenv.mkDerivation rec { installFlags = [ "prefix=${placeholder "out"}" - "sysconfdir=${placeholder "out"}/etc" "moduledir=${placeholder "out"}/lib/modules" "INSTALL=install" ];