[Pkg-openldap-devel] [openldap] 01/01: fix dumping/reloading non-unique suffix (#759596, LP: #1362481)

Ryan Tandy rtandy-guest at moszumanska.debian.org
Tue Sep 2 20:00:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

rtandy-guest pushed a commit to branch master
in repository openldap.

commit 28bc047dd60b81b5f6ec3ca8eb95af73c89b3e0c
Author: Ryan Tandy <ryan at nardis.ca>
Date:   Tue Sep 2 18:52:00 2014 +0000

    fix dumping/reloading non-unique suffix (#759596, LP: #1362481)
---
 debian/changelog            | 2 ++
 debian/slapd.scripts-common | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b7296fc..e9581a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ openldap (2.4.39-2) UNRELEASED; urgency=low
       symlink. (Closes: #742862)
     - When upgrading a database, ignore extra nested directories as they might 
       contain other databases. Patch from Kenny Millington. (LP: #1003854)
+    - Fix dumping and reloading when multiple databases hold the same suffix,
+      thanks Peder Stray. (Closes: #759596, LP: #1362481)
   * debian/rules:
     - Enable parallel building.
     - Copy libldap-2.4-2.shlibs into place manually, as a workaround for
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index 5d671b5..a90d238 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -276,13 +276,13 @@ get_suffix() {
 		done
 	else
 		grep -h ^olcSuffix ${SLAPD_CONF}/cn\=config/olcDatabase*.ldif | cut -d: -f 2
-	fi
+	fi | sort -u
 }
 # }}}
 get_directory() {							# {{{
 # Returns the db directory for a given suffix
 	if [ -d "${SLAPD_CONF}" ] && get_suffix | grep -q "$1" ; then
-		grep "^olcDbDirectory:" `grep -l "^olcSuffix: $1" ${SLAPD_CONF}/cn\=config/olcDatabase*.ldif` | cut -d: -f 2 | sed 's/^  *//g'
+		sed -n 's/^olcDbDirectory: *//p' `grep -l "^olcSuffix: $1" ${SLAPD_CONF}/cn\=config/olcDatabase*.ldif`
 	elif [ -f "${SLAPD_CONF}" ]; then
 		# Extract the directory for the given suffix ($1)
 		for f in `get_all_slapd_conf_files`; do

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git



More information about the Pkg-openldap-devel mailing list