Commit e0b43754 authored by intrigeri's avatar intrigeri
Browse files

Quote command output strings passed to logging functions.

Thanks to @Gackiewicz for the report!

Closes #11278
parent 62218c4c
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -314,10 +314,10 @@ if [ ! $test ]; then
             "$execstr_precmd duplicity cleanup --force $execstr_options $execstr_serverpart 2>&1"`
   exit_code=$?
   if [ $exit_code -eq 0 ]; then
      debug $output
      debug "$output"
      info "Duplicity cleanup finished successfully."
   else
      debug $output
      debug "$output"
      warning "Duplicity cleanup failed."
   fi
fi
@@ -334,10 +334,10 @@ if [ "$keep" != "yes" ]; then
                "$execstr_precmd duplicity remove-older-than $keep --force $execstr_options $execstr_serverpart 2>&1"`
      exit_code=$?
      if [ $exit_code -eq 0 ]; then
         debug $output
         debug "$output"
         info "Duplicity remove-older-than finished successfully."
      else
         debug $output
         debug "$output"
         warning "Duplicity remove-older-than failed."
      fi
   fi
@@ -357,10 +357,10 @@ if [ "$keep" != "yes" ]; then
               "$execstr_precmd duplicity remove-all-inc-of-but-n-full $keepincroffulls --force $execstr_options $execstr_serverpart 2>&1"`
            exit_code=$?
            if [ $exit_code -eq 0 ]; then
               debug $output
               debug "$output"
               info "Duplicity remove-all-inc-of-but-n-full finished successfully."
            else
               debug $output
               debug "$output"
               warning "Duplicity remove-all-inc-of-but-n-full failed."
            fi
         fi
@@ -379,12 +379,12 @@ if [ ! $test ]; then
             su -c \
                "$execstr_precmd duplicity $execstr_command $execstr_options $execstr_source --exclude '**' / $execstr_serverpart >$outputfile 2>&1"`
   exit_code=$?
   debug $output
   debug "$output"
   cat $outputfile | (while read output ; do
                         if [ $exit_code -eq 0 ]; then
                            info $output
                            info "$output"
                         else
                            error $output
                            error "$output"
                         fi
                      done
   )
+2 −2
Original line number Diff line number Diff line
@@ -94,10 +94,10 @@ if [ "$ldif" == "yes" ]; then
         output=`su root -s /bin/bash -c "set -o pipefail ; $execstr" 2>&1`
         code=$?
         if [ "$code" == "0" ]; then
            debug $output
            debug "$output"
            info "Successfully finished ldif export of $dbsuffix"
         else
            warning $output
            warning "$output"
            warning "Failed ldif export of $dbsuffix"
         fi

+6 −6
Original line number Diff line number Diff line
@@ -51,10 +51,10 @@ debug 0 "echo $execstr "
output=` $execstr 2>&1 `
code=$?
if [ "$code" == "0" ]; then
   debug $output
   debug "$output"
   info "Successfully finished creation of iso"
else
   warning $output
   warning "$output"
   warning "Failed to create iso"
fi

@@ -65,10 +65,10 @@ if [ "$isoonly" == "no" ]; then
      $CDRECORD -v gracetime=2 dev=$device speed=8 -dao -data $outputfile
      code=$?
      if [ "$code" == "0" ]; then
         debug $output
         debug "$output"
         info "Successfully burned CD"
      else
         warning $output
         warning "$output"
         warning "Failed to create CD"
      fi
   fi
@@ -77,10 +77,10 @@ if [ "$isoonly" == "no" ]; then
      $GROWISOFS -speed=2 -Z $device=$outputfile -use-the-force-luke=notray -use-the-force-luke=tty
      code=$?
      if [ "$code" == "0" ]; then
         debug $output
         debug "$output"
         info "Successfully burned DVD"
      else
         warning $output
         warning "$output"
         warning "Failed to create DVD"
      fi
   fi
+6 −6
Original line number Diff line number Diff line
@@ -194,10 +194,10 @@ then
         code=$?
         if [ "$code" == "0" ]
         then
            debug $output
            debug "$output"
            info "Successfully finished hotcopy of all mysql databases"
         else
            warning $output
            warning "$output"
            warning "Failed to hotcopy all mysql databases"
         fi
      fi
@@ -217,10 +217,10 @@ then
            code=$?
            if [ "$code" == "0" ]
            then
               debug $output
               debug "$output"
               info "Successfully finished hotcopy of mysql database $db"
            else
               warning $output
               warning "$output"
               warning "Failed to hotcopy mysql database $db"
            fi
         fi
@@ -303,10 +303,10 @@ then
         code=$?
         if [ "$code" == "0" ]
         then
            debug $output
            debug "$output"
            info "Successfully finished dump of mysql database $db"
         else
            warning $output
            warning "$output"
            warning "Failed to dump mysql databases $db"
         fi
      fi
+6 −6
Original line number Diff line number Diff line
@@ -131,10 +131,10 @@ if [ "$databases" == "all" ]; then
      output=`eval $execstr 2>&1`
      code=$?
      if [ "$code" == "0" ]; then
         debug $output
         debug "$output"
         info "Successfully finished dump of pgsql cluster"
      else
         warning $output
         warning "$output"
         warning "Failed to dump pgsql cluster"
      fi
   fi
@@ -161,10 +161,10 @@ else
         output=`eval $execstr 2>&1`
         code=$?
         if [ "$code" == "0" ]; then
            debug $output
            debug "$output"
            info "Successfully finished pgsql globals (roles and tablespaces) dump"
         else
            warning $output
            warning "$output"
            warning "Failed to dump pgsql globals (roles and tablespaces)"
         fi
      fi
@@ -198,10 +198,10 @@ else
         output=`eval $execstr 2>&1`
         code=$?
         if [ "$code" == "0" ]; then
            debug $output
            debug "$output"
            info "Successfully finished dump of pgsql database ${db}"
         else
            warning $output
            warning "$output"
            warning "Failed to dump pgsql database ${db}"
         fi
      fi
Loading