aports/main/openldap/0009-Include-more-schemas-in-default-config.patch
Jakub Jirutka 76988828c1 main/openldap: fix invalid includes in slapd.conf
This bug has been introduced in 130d1ca2f5
by me. :(
2022-11-06 15:10:33 +01:00

44 lines
1.6 KiB
Diff

From: Jakub Jirutka <jakub@jirutka.cz>
Date: Sun, 6 Nov 2022 00:57:00 +0100
Subject: [PATCH] Include more schemas in default config
The default configuration of the openldap apk has only one schema
configured: core.ldif. This is very limiting and most admins will want
to add nis.ldif, inetorgperson.ldif, and the dependency cosine.ldif to
manage user accounts on a Linux-based system.
This is easily done with include: lines in slapd.ldif. The trick is,
you need to add these lines before you import slapd.ldif during initial
configuration. Otherwise, it's kind of painful to add after the fact.
Other distributions (Debian and derivatives) include these schema as
part of their OpenLDAP package, so it's not out of the ordinary.
See https://gitlab.alpinelinux.org/alpine/aports/-/issues/13867
diff --git a/servers/slapd/slapd.ldif b/servers/slapd/slapd.ldif
--- a/servers/slapd/slapd.ldif
+++ b/servers/slapd/slapd.ldif
@@ -39,6 +39,9 @@
cn: schema
include: file://%SYSCONFDIR%/schema/core.ldif
+include: file://%SYSCONFDIR%/schema/cosine.ldif
+include: file://%SYSCONFDIR%/schema/inetorgperson.ldif
+include: file://%SYSCONFDIR%/schema/nis.ldif
# Frontend settings
#
diff --git a/servers/slapd/slapd.conf b/servers/slapd/slapd.conf
--- a/servers/slapd/slapd.conf
+++ b/servers/slapd/slapd.conf
@@ -3,6 +3,9 @@
# This file should NOT be world readable.
#
include %SYSCONFDIR%/schema/core.schema
+include %SYSCONFDIR%/schema/cosine.schema
+include %SYSCONFDIR%/schema/inetorgperson.schema
+include %SYSCONFDIR%/schema/nis.schema
# Define global ACLs to disable default read access.