aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2007-11-24 23:00:33 +0000
committerMicah Anderson <micah@riseup.net>2007-11-24 23:00:33 +0000
commita44229971b6ba800e444d8c11d18698e79682e17 (patch)
treecde5f318ca4b9407bbb7e140ec5ae9f327debc70 /handlers
parentc2f0b78ad6725fb1194ab1e58e4625c0c1989b57 (diff)
downloadbackupninja-a44229971b6ba800e444d8c11d18698e79682e17.tar.gz
backupninja-a44229971b6ba800e444d8c11d18698e79682e17.tar.bz2
fixed Trac#29 causing slapcat + gzip not to work
Diffstat (limited to 'handlers')
-rw-r--r--handlers/ldap.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/handlers/ldap.in b/handlers/ldap.in
index 5f9040a..4d9a335 100644
--- a/handlers/ldap.in
+++ b/handlers/ldap.in
@@ -55,7 +55,6 @@ if [ "$ldif" == "yes" ]; then
if [ "$method" == "slapcat" ]; then
execstr="$SLAPCAT -f $conf -b $dbsuffix"
- debug "$execstr"
else
if [ -n "$ldaphost" ]; then
execstr="$LDAPSEARCH -H $URLBASE://$ldaphost -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile"
@@ -81,10 +80,12 @@ if [ "$ldif" == "yes" ]; then
fi
if [ "$compress" == "yes" ]; then
- output=`$execstr | $GZIP > $dumpdir/$dbsuffix.ldif.gz`
+ execstr="$execstr | $GZIP > $dumpdir/$dbsuffix.ldif.gz"
else
- output=`$execstr > $dumpdir/$dbsuffix.ldif`
+ execstr="$execstr > $dumpdir/$dbsuffix.ldif"
fi
+ debug "$execstr"
+ output=`su root -c "$execstr" 2>&1`
code=$?
if [ "$code" == "0" ]; then
debug $output