[Pkg-openldap-devel] [openldap] 03/03: if /var/lib/ldap is a symlink, follow it (#742862)
Ryan Tandy
rtandy-guest at moszumanska.debian.org
Tue Apr 8 17:16:21 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 e3db9735d3252c364c02c7072a9d0b6fbe0869af
Author: Ryan Tandy <ryan at nardis.ca>
Date: Mon Apr 7 20:03:28 2014 -0700
if /var/lib/ldap is a symlink, follow it (#742862)
---
debian/changelog | 2 ++
debian/slapd.scripts-common | 12 ++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4301dcd..b8896d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ openldap (2.4.39-2) UNRELEASED; urgency=low
- Anchor grep patterns to avoid matching commented lines in ldif files
under cn=config. (Closes: #723957)
- 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)
-- Ryan Tandy <ryan at nardis.ca> Mon, 07 Apr 2014 19:36:18 -0700
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index 5f32f85..c8d7c32 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -94,8 +94,8 @@ create_ldap_directories() { # {{{
update_permissions() { # {{{
dir="$1"
if [ -d "$dir" ]; then
- [ -z "$SLAPD_USER" ] || chown -R "$SLAPD_USER" "$dir"
- [ -z "$SLAPD_GROUP" ] || chgrp -R "$SLAPD_GROUP" "$dir"
+ [ -z "$SLAPD_USER" ] || chown -R -H "$SLAPD_USER" "$dir"
+ [ -z "$SLAPD_GROUP" ] || chgrp -R -H "$SLAPD_GROUP" "$dir"
fi
}
# }}}
@@ -240,9 +240,9 @@ EOF
if [ -n "$SLAPD_USER" ] || [ -n "$SLAPD_GROUP" ]; then
echo -n " - chowning database directory ($SLAPD_USER:$SLAPD_GROUP)... "
[ -z "$SLAPD_USER" ] || \
- chown -R "$SLAPD_USER" "$dbdir"
+ chown -R -H "$SLAPD_USER" "$dbdir"
[ -z "$SLAPD_GROUP" ] || \
- chgrp -R "$SLAPD_GROUP" "$dbdir"
+ chgrp -R -H "$SLAPD_GROUP" "$dbdir"
echo "done";
fi
done
@@ -385,7 +385,7 @@ move_old_database_away() { # {{{
backupdir=`compute_backup_path "$databasedir" "$suffix"`
echo -n " - directory $suffix... " >&2
mkdir -p "$backupdir"
- find "$databasedir" -mindepth 1 -maxdepth 1 \
+ find -H "$databasedir" -mindepth 1 -maxdepth 1 \
-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 "$1" -mindepth 1 -maxdepth 1 \! -name DB_CONFIG 2>/dev/null`
+ output=`find -H "$1" -mindepth 1 -maxdepth 1 \! -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