On Sun, Apr 06, 2014 at 04:21:10PM +0200, Ivan Pozderović wrote:
> Package: menu
> Version: 2.1.46
> Severity: normal
> 
> Hello,
> 
> it seems su-to-root wrapper script doesn't handle well calls which use 
> multiple commands.

Hello Ivan,
the issue is not so much the su-to-root script but rather the underlying su 
engines
which may have different calling convention.

I cannot help but think that using multiple commands in a single su-to-root
invocation is pushing the design too far.

> Scenario where I've discovered this:
> After installing system-config-lvm package (1.1.16-1), the utility doesn't 
> run under a non-root user (using standard GNOME 3.4). It tries to run the 
> following command:
> su-to-root -X -c "invoke-rc.d lvm2 start ; 
> /usr/share/system-config-lvm/system-config-lvm.py";
> 
> It seems that without invoking a shell to handle the two commands only the 
> first will be run under root privilages.
> 
> Here's a fix using printf that seems to correct the problem (only for gksu, 
> which is used in wheezy):
> @@ -105,3 +105,3 @@
>      case $SU_TO_ROOT_X in
> -      gksu) gksu -u "$PRIV" "$COMMAND";;
> +      gksu) gksu -u "$PRIV" "sh -c $(printf %q "$COMMAND")";;
>        gksudo) gksudo -u "$PRIV" "$COMMAND";;
> 
> p.s. if this is more of a gksu issue, please forward where necessary

Well, it would be useful to compare the behavior of all the su- variants.

Thanks for using Debian menu!
-- 
Bill. <ballo...@debian.org>

Imagine a large red swirl here. 


-- 
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