diff options
author | Kai Wohlfahrt <kai.wohlfahrt@gmail.com> | 2020-09-27 23:23:31 +0100 |
---|---|---|
committer | Kai Wohlfahrt <kai.wohlfahrt@gmail.com> | 2020-11-21 16:13:03 +0000 |
commit | c96f18feee69f1bd621ba4ddeb180e95d4278f27 (patch) | |
tree | 81e58a796b2f7a9869f59d95ccd5b983a1b39595 | |
parent | db5bb4e26bb1cdc8a79dd639c2585722fdf2ce18 (diff) | |
download | nixpkgs-c96f18feee69f1bd621ba4ddeb180e95d4278f27.tar nixpkgs-c96f18feee69f1bd621ba4ddeb180e95d4278f27.tar.gz nixpkgs-c96f18feee69f1bd621ba4ddeb180e95d4278f27.tar.bz2 nixpkgs-c96f18feee69f1bd621ba4ddeb180e95d4278f27.tar.lz nixpkgs-c96f18feee69f1bd621ba4ddeb180e95d4278f27.tar.xz nixpkgs-c96f18feee69f1bd621ba4ddeb180e95d4278f27.tar.zst nixpkgs-c96f18feee69f1bd621ba4ddeb180e95d4278f27.zip |
nixos/openldap: migrate sssd-ldap to new settings
-rw-r--r-- | nixos/tests/openldap.nix | 14 | ||||
-rw-r--r-- | nixos/tests/sssd-ldap.nix | 24 |
2 files changed, 26 insertions, 12 deletions
diff --git a/nixos/tests/openldap.nix b/nixos/tests/openldap.nix index e9339523ca9..392fae24346 100644 --- a/nixos/tests/openldap.nix +++ b/nixos/tests/openldap.nix @@ -26,14 +26,12 @@ in { enable = true; settings = { children = { - "cn=schema" = { - includes = [ - "${pkgs.openldap}/etc/schema/core.ldif" - "${pkgs.openldap}/etc/schema/cosine.ldif" - "${pkgs.openldap}/etc/schema/inetorgperson.ldif" - "${pkgs.openldap}/etc/schema/nis.ldif" - ]; - }; + "cn=schema".includes = [ + "${pkgs.openldap}/etc/schema/core.ldif" + "${pkgs.openldap}/etc/schema/cosine.ldif" + "${pkgs.openldap}/etc/schema/inetorgperson.ldif" + "${pkgs.openldap}/etc/schema/nis.ldif" + ]; "olcDatabase={1}mdb" = { # This tests string, base64 and path values, as well as lists of string values attrs = { diff --git a/nixos/tests/sssd-ldap.nix b/nixos/tests/sssd-ldap.nix index 8cb398d0e17..4831eaa4ba2 100644 --- a/nixos/tests/sssd-ldap.nix +++ b/nixos/tests/sssd-ldap.nix @@ -17,10 +17,26 @@ machine = { pkgs, ... }: { services.openldap = { enable = true; - database = "mdb"; - rootdn = "cn=${ldapRootUser},${dbSuffix}"; - rootpw = ldapRootPassword; - suffix = dbSuffix; + settings = { + children = { + "cn=schema".includes = [ + "${pkgs.openldap}/etc/schema/core.ldif" + "${pkgs.openldap}/etc/schema/cosine.ldif" + "${pkgs.openldap}/etc/schema/inetorgperson.ldif" + "${pkgs.openldap}/etc/schema/nis.ldif" + ]; + "olcDatabase={1}mdb" = { + attrs = { + objectClass = [ "olcDatabaseConfig" "olcMdbConfig" ]; + olcDatabase = "{1}mdb"; + olcDbDirectory = "/var/db/openldap"; + olcSuffix = dbSuffix; + olcRootDN = "cn=${ldapRootUser},${dbSuffix}"; + olcRootPW = ldapRootPassword; + }; + }; + }; + }; declarativeContents = { ${dbSuffix} = '' dn: ${dbSuffix} |