Package: menu
Version: 2.1.41
Severity: normal
Tags: patch
The treatment of "-c" by su-to-root is different between the root and
the non-root cases, which makes it fail when run as root if the command
includes control-flow operators or things like that.
As an example, system-config-lvm fails when run as root because
su-to-root -X -c "/sbin/modprobe dm_mod &&
/usr/share/system-config-lvm/system-config-lvm.py"
ends up running "/sbin/modprobe" with 3 arguments, the second one being "&&".
The simple patch below seems to fix the problem.
Stefan
--- /usr/sbin/su-to-root.orig 2009-04-02 11:42:28.000000000 -0400
+++ /usr/sbin/su-to-root 2009-04-02 11:41:12.000000000 -0400
@@ -54,7 +54,7 @@
euid=$(id -u)
privid=$(id -u $PRIV)
if test "$euid" = "$privid"; then
- $COMMAND
+ eval "$COMMAND"
else
case $NEEDS in
text)
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages menu depends on:
ii libc6 2.9-4 GNU C Library: Shared libraries
ii libgcc1 1:4.3.3-3 GCC support library
ii libstdc++6 4.3.3-3 The GNU Standard C++ Library v3
menu recommends no packages.
Versions of packages menu suggests:
ii gksu 2.0.2-1 graphical frontend to su
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]