Package: slapd
Version: patch for db4.2-util to run as appropriate user
Followup-For: Bug #340266

Hi,

Attached is the patch to run this stuff as the correct user.

Anand

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
--- orig.slapd  2006-01-16 05:45:19.000000000 +1100
+++ orgo.slapd  2006-01-16 05:45:03.000000000 +1100
@@ -140,6 +140,15 @@
                        db_recover_failed $dbdir
        done
        echo -n ","
+
+       # if a user is specified, re-chown everything back to them
+       if [  "$SLAPD_USER" ]; then
+               if [ "$SLAPD_GROUP" ]; then
+                       chown -R $SLAPD_USER:$SLAPD_GROUP /var/lib/ldap
+               else
+                       chown -R $SLAPD_USER: /var/lib/ldap
+               fi
+       fi
 }
 
 # Find bdb environment dirs

Reply via email to