[Pkg-openldap-devel] [openldap] 01/01: ignore subdirs when scanning /var/lib/ldap (LP: #1003854)
Ryan Tandy
rtandy-guest at moszumanska.debian.org
Mon May 5 05:00:03 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 3e970b4f263e4f9306dde4a2ae2bcfb82459ddd1
Author: Ryan Tandy <ryan at nardis.ca>
Date: Sun May 4 21:56:25 2014 -0700
ignore subdirs when scanning /var/lib/ldap (LP: #1003854)
---
debian/changelog | 2 ++
debian/slapd.scripts-common | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9ea1589..8efbe75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ openldap (2.4.39-2) UNRELEASED; urgency=low
- Don't silently ignore nonexistent directories that should be dumped.
- Invoke find, chmod, and chown with -H in case /var/lib/ldap is a
symlink. (Closes: #742862)
+ - When upgrading a database, ignore extra nested directories as they might
+ contain other databases. Patch from Kenny Millington. (LP: #1003854)
* debian/rules, debian/patches/pw-sha2-makefile: Build and install the sha2
password module. (Closes: #746727)
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index c8d7c32..5427204 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -385,7 +385,7 @@ move_old_database_away() { # {{{
backupdir=`compute_backup_path "$databasedir" "$suffix"`
echo -n " - directory $suffix... " >&2
mkdir -p "$backupdir"
- find -H "$databasedir" -mindepth 1 -maxdepth 1 \
+ find -H "$databasedir" -mindepth 1 -maxdepth 1 -type f \
-exec mv {} "$backupdir" \;
echo done. >&2
else
@@ -725,7 +725,7 @@ is_empty_dir() { # {{{
# (i.e., contains no files except for an optional DB_CONFIG).
# Usage: if is_empty_dir "$dir"; then ... fi
- output=`find -H "$1" -mindepth 1 -maxdepth 1 \! -name DB_CONFIG 2>/dev/null`
+ output=`find -H "$1" -mindepth 1 -maxdepth 1 -type f \! -name DB_CONFIG 2>/dev/null`
if [ -n "$output" ]; then
return 1
else
--
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