[Pkg-openldap-devel] [openldap] 22/29: r1578 at pulsar: torsten | 2005-04-01 12:06:56 +0200 * debian/slapd.scripts-common: change privileges of upgraded databases as indicated by SLAPD_USER and SLAPD_GROUP variables.

Timo Aaltonen tjaalton-guest at alioth.debian.org
Thu Oct 10 05:34:52 UTC 2013


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

tjaalton-guest pushed a commit to annotated tag 2.2.23-0.pre6
in repository openldap.

commit e0731db30138a768e771a3e02ab33ffa8c0abf3e
Author: Torsten Landschoff <torsten at debian.org>
Date:   Fri Apr 1 10:10:15 2005 +0000

     r1578 at pulsar:  torsten | 2005-04-01 12:06:56 +0200
      * debian/slapd.scripts-common: change privileges of upgraded databases
        as indicated by SLAPD_USER and SLAPD_GROUP variables.
---
 debian/changelog            |    2 ++
 debian/slapd.scripts-common |    9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 1fb2aac..f6516e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,8 @@ openldap2.2 (2.2.23-0.pre6) experimental; urgency=low
     + debian/slapd.examples: Mark DB_CONFIG as an example.
   * servers/slapd/daemon.c: Actually change the permissions of the 
     unix socket if requested using an ldapi url with x-mod.
+  * debian/slapd.scripts-common: change privileges of upgraded databases
+    as indicated by SLAPD_USER and SLAPD_GROUP variables.
 
  -- 
 
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index b627be3..5694abe 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -151,6 +151,15 @@ load_databases() {							# {{{
 			exit 1
 		fi
 		echo "done." >&2
+
+		if [ -n "$SLAPD_USER" -o -n "$SLAPD_GROUP" ]; then
+			echo -n "  - chowning database directory ($SLAPD_USER:$SLAPD_GROUP)... "
+			[ -z "$SLAPD_USER" ] || \
+				chown -R "$SLAPD_USER" "$dbdir"
+			[ -z "$SLAPD_GROUP" ] || \
+				chgrp -R "$SLAPD_GROUP" "$dbdir"
+			echo "done";
+		fi
 	done
 }
 

-- 
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