Debian Codegraph @

debian/patches/wrong-database-location

raw
1 Move the default slapd database location to /var/lib/ldap instead of
2 /var/openldap-data.
3
4 Debian-specific.
5
6 Index: openldap/doc/man/man5/slapd.conf.5
7 ===================================================================
8 --- openldap.orig/doc/man/man5/slapd.conf.5 2022-05-20 17:36:10.817244990 -0400
9 +++ openldap/doc/man/man5/slapd.conf.5 2022-05-20 17:36:10.813244986 -0400
10 @@ -2122,7 +2122,7 @@
11 # The database directory MUST exist prior to
12 # running slapd AND should only be accessible
13 # by the slapd/tools. Mode 0700 recommended.
14 -directory LOCALSTATEDIR/openldap\-data
15 +directory LOCALSTATEDIR/lib/ldap
16 # Indices to maintain
17 index objectClass eq
18 index cn,sn,mail pres,eq,approx,sub
19 Index: openldap/include/ldap_defaults.h
20 ===================================================================
21 --- openldap.orig/include/ldap_defaults.h 2022-05-20 17:36:10.817244990 -0400
22 +++ openldap/include/ldap_defaults.h 2022-05-20 17:36:10.813244986 -0400
23 @@ -54,7 +54,7 @@
24 #define SLAPD_DEFAULT_CONFIGDIR LDAP_SYSCONFDIR LDAP_DIRSEP "slapd.d"
25 #endif
26 #ifndef SLAPD_DEFAULT_DB_DIR
27 -#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "openldap-data"
28 +#define SLAPD_DEFAULT_DB_DIR LDAP_RUNDIR LDAP_DIRSEP "lib" LDAP_DIRSEP "ldap"
29 #endif
30 #define SLAPD_DEFAULT_DB_MODE 0600
31 /* default max deref depth for aliases */
32 Index: openldap/servers/slapd/Makefile.in
33 ===================================================================
34 --- openldap.orig/servers/slapd/Makefile.in 2022-05-20 17:36:10.817244990 -0400
35 +++ openldap/servers/slapd/Makefile.in 2022-05-20 17:36:10.813244986 -0400
36 @@ -452,9 +452,9 @@
37
38 install-db-config: FORCE
39 @-$(MKDIR) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir)
40 - @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/openldap-data
41 + @-$(INSTALL) -m 700 -d $(DESTDIR)$(localstatedir)/lib/ldap
42 $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
43 - $(DESTDIR)$(localstatedir)/openldap-data/DB_CONFIG.example
44 + $(DESTDIR)$(localstatedir)/lib/ldap/DB_CONFIG.example
45 $(INSTALL) $(INSTALLFLAGS) -m 600 $(srcdir)/DB_CONFIG \
46 $(DESTDIR)$(sysconfdir)/DB_CONFIG.example
47
48 Index: openldap/doc/man/man5/slapd-config.5
49 ===================================================================
50 --- openldap.orig/doc/man/man5/slapd-config.5 2022-05-20 17:36:10.817244990 -0400
51 +++ openldap/doc/man/man5/slapd-config.5 2022-05-20 17:36:10.813244986 -0400
52 @@ -2233,7 +2233,7 @@
53 # The database directory MUST exist prior to
54 # running slapd AND should only be accessible
55 # by the slapd/tools. Mode 0700 recommended.
56 -olcDbDirectory: LOCALSTATEDIR/openldap\-data
57 +olcDbDirectory: LOCALSTATEDIR/lib/ldap
58 # Indices to maintain
59 olcDbIndex: objectClass eq
60 olcDbIndex: cn,sn,mail pres,eq,approx,sub
61 Index: openldap/doc/man/man5/slapd-mdb.5
62 ===================================================================
63 --- openldap.orig/doc/man/man5/slapd-mdb.5 2022-05-20 17:36:10.817244990 -0400
64 +++ openldap/doc/man/man5/slapd-mdb.5 2022-05-20 17:36:10.813244986 -0400
65 @@ -63,7 +63,7 @@
66 associated indexes live.
67 A separate directory must be specified for each database.
68 The default is
69 -.BR LOCALSTATEDIR/openldap\-data .
70 +.BR LOCALSTATEDIR/lib/ldap .
71 .TP
72 \fBenvflags \fR{\fBnosync\fR,\fBnometasync\fR,\fBwritemap\fR,\fBmapasync\fR,\fBnordahead\fR}
73 Specify flags for finer-grained control of the LMDB library's operation.