Package: backupninja
Severity: wishlist
Tags: patch

Hello,

As announced in [0], su behavior will change.
The attached patch quotes the command provided to su in handlers/pgsql.
(The fix in handlers/mysql is probably not needed, but should not harm.)
The patched version should be compatible with the old and future su.

You can find a login package in experimental if you want to test the
patch.

When the new login package will reach unstable, the severity of this bug
will be raised.

[0] http://lists.debian.org/debian-devel-announce/2006/03/msg00003.html

Kind Regards,
-- 
Nekral
diff -rauN ../orig/backupninja-0.9.3/handlers/mysql 
./backupninja-0.9.3/handlers/mysql
--- ../orig/backupninja-0.9.3/handlers/mysql    2006-03-25 18:31:49.000000000 
+0100
+++ ./backupninja-0.9.3/handlers/mysql  2006-03-25 18:39:29.000000000 +0100
@@ -230,7 +230,7 @@
     then
        if [ $usevserver = yes ]
        then
-           debug "echo show databases | $VSERVER $vsname exec su $user -c 
$MYSQL $defaultsfile | grep -v Database"
+           debug "echo 'show databases' | $VSERVER $vsname exec su $user -c 
\"$MYSQL $defaultsfile\" | grep -v Database"
            databases=`echo 'show databases' | $VSERVER $vsname exec su $user 
-c "$MYSQL $defaultsfile" | grep -v Database`
            if [ $? -ne 0 ]
            then
diff -rauN ../orig/backupninja-0.9.3/handlers/pgsql 
./backupninja-0.9.3/handlers/pgsql
--- ../orig/backupninja-0.9.3/handlers/pgsql    2006-03-25 18:31:49.000000000 
+0100
+++ ./backupninja-0.9.3/handlers/pgsql  2006-03-25 18:41:45.000000000 +0100
@@ -94,9 +94,9 @@
     for db in $databases; do
        if [ $usevserver = yes ]
            then
-           execstr="$VSERVER $vsname exec su - postgres -c $PGSQLDUMP $db > 
$backupdir/${db}.sql"
+           execstr="$VSERVER $vsname exec su - postgres -c \"$PGSQLDUMP $db\" 
> $backupdir/${db}.sql"
        else
-           execstr="su - postgres -c $PGSQLDUMP $db > $backupdir/${db}.sql"
+           execstr="su - postgres -c \"$PGSQLDUMP $db\" > $backupdir/${db}.sql"
        fi
        debug "$execstr"
        if [ ! $test ]; then

Reply via email to