From b385038f4213a4f78954b4e058031bbcef993cdd Mon Sep 17 00:00:00 2001 From: Debian OpenLDAP Maintainers Date: Fri, 22 Jan 2021 03:54:40 +0000 Subject: [PATCH] wrong-database-location Move the default slapd database location to /var/lib/ldap instead of /var/openldap-data. Debian-specific. Gbp-Pq: Name wrong-database-location --- doc/man/man5/slapd-bdb.5 | 2 +- doc/man/man5/slapd-config.5 | 2 +- doc/man/man5/slapd-mdb.5 | 2 +- doc/man/man5/slapd.conf.5 | 2 +- include/ldap_defaults.h | 2 +- servers/slapd/Makefile.in | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/man/man5/slapd-bdb.5 b/doc/man/man5/slapd-bdb.5 index ea83c8f7..02ea9b19 100644 --- a/doc/man/man5/slapd-bdb.5 +++ b/doc/man/man5/slapd-bdb.5 @@ -135,7 +135,7 @@ Specify the directory where the BDB files containing this database and associated indexes live. A separate directory must be specified for each database. The default is -.BR LOCALSTATEDIR/openldap\-data . +.BR LOCALSTATEDIR/lib/ldap . .TP .B dirtyread Allow reads of modified but not yet committed data. diff --git a/doc/man/man5/slapd-config.5 b/doc/man/man5/slapd-config.5 index 9c72e829..9e013fff 100644 --- a/doc/man/man5/slapd-config.5 +++ b/doc/man/man5/slapd-config.5 @@ -2059,7 +2059,7 @@ olcSuffix: "dc=our\-domain,dc=com" # The database directory MUST exist prior to # running slapd AND should only be accessible # by the slapd/tools. Mode 0700 recommended. -olcDbDirectory: LOCALSTATEDIR/openldap\-data +olcDbDirectory: LOCALSTATEDIR/lib/ldap # Indices to maintain olcDbIndex: objectClass eq olcDbIndex: cn,sn,mail pres,eq,approx,sub diff --git a/doc/man/man5/slapd-mdb.5 b/doc/man/man5/slapd-mdb.5 index 002ecf92..960cc5cf 100644 --- a/doc/man/man5/slapd-mdb.5 +++ b/doc/man/man5/slapd-mdb.5 @@ -53,7 +53,7 @@ Specify the directory where the LMDB files containing this database and associated indexes live. A separate directory must be specified for each database. The default is -.BR LOCALSTATEDIR/openldap\-data . +.BR LOCALSTATEDIR/lib/ldap . .TP \fBenvflags \fR{\fBnosync\fR,\fBnometasync\fR,\fBwritemap\fR,\fBmapasync\fR,\fBnordahead\fR} Specify flags for finer-grained control of the LMDB library's operation. diff --git a/doc/man/man5/slapd.conf.5 b/doc/man/man5/slapd.conf.5 index f504adcf..9519b480 100644 --- a/doc/man/man5/slapd.conf.5 +++ b/doc/man/man5/slapd.conf.5 @@ -2029,7 +2029,7 @@ suffix "dc=our\-domain,dc=com" # The database directory MUST exist prior to # running slapd AND should only be accessible # by the slapd/tools. Mode 0700 recommended. -directory LOCALSTATEDIR/openldap\-data +directory LOCALSTATEDIR/lib/ldap # Indices to maintain index objectClass eq index cn,sn,mail pres,eq,approx,sub diff --git a/include/ldap_defaults.h b/include/ldap_defaults.h index f62d4db2..9efa733b 100644 --- a/include/ldap_defaults.h +++ b/include/ldap_defaults.h @@ -47,7 +47,7 @@ /* location of the default slapd config file */ #define SLAPD_DEFAULT_CONFIGFILE LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.conf" #define SLAPD_DEFAULT_CONFIGDIR LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.d" -#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "openldap-data" +#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "lib" LDAP_DIRSEP "ldap" #define SLAPD_DEFAULT_DB_MODE 0600 #define SLAPD_DEFAULT_UCDATA LDAP_DATADIR LDAP_DIRSEP "ucdata" /* default max deref depth for aliases */ diff --git a/servers/slapd/Makefile.in b/servers/slapd/Makefile.in index 36d51e24..5ba03112 100644 --- a/servers/slapd/Makefile.in +++ b/servers/slapd/Makefile.in @@ -445,9 +445,9 @@ install-conf: FORCE install-db-config: FORCE @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) - @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data + @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/lib/ldap $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \ - $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example + $(DESTDIR)$(localstatedir)/lib/ldap/DB_CONFIG.example $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \ $(DESTDIR)$(sysconfdir)/DB_CONFIG.example -- 2.30.2