Package: molly-guard
Version: 0.4.5-1
Severity: important
Tags: patch

molly-guard  will  not  work  when  using  the  optional `warning message' for
shutdown(8) that contains ``special'' charakters like ticks:

# shutdown -h +20 "we'll pull the power cord soon"
eval: 1: Syntax error: Unterminated quoted string
# 

A patch to make this work could look like [1]. We replace any `"' in the input
by `\"', after working around the broken `echo'. Each $arg can then safely get
enclosed by `""' and put into $CMDARGS.


Cheers,

        Julius



-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages molly-guard depends on:
ii  procps  1:3.3.3-2

molly-guard recommends no packages.

molly-guard suggests no packages.

-- no debconf information


[1] patch

$ diff -U3 /{tmp/molly-guard_0.4.4-2_all/,}usr/share/molly-guard/shutdown
--- /tmp/molly-guard_0.4.4-2_all/usr/share/molly-guard/shutdown 2008-07-01 
16:09:47.000000000 +0200
+++ /usr/share/molly-guard/shutdown     2013-02-03 23:31:57.000000000 +0100
@@ -71,7 +71,7 @@
     --) END_OF_ARGS=1;;
     *) 
       if [ $END_OF_ARGS -eq 0 ]; then
-        CMDARGS="${CMDARGS:+$CMDARGS }$arg"
+        CMDARGS="${CMDARGS:+$CMDARGS }\"$(echo "X$arg" | sed -e 's/^X//' -e 
's/"/\\"/g')\""
       else
         SCRIPTARGS="${SCRIPTARGS:+$SCRIPTARGS }--arg $arg"
       fi
$ 


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to