On Mon, Feb 11, 2008 at 11:03:43PM +0100, Daniel Hahler wrote:
> Do you think the patch is correct otherwise? I'd like to include the fix
> for this in the next upload then, too.
Well, I recheck everything and it seems sux support never worked even
for trivial case. Maybe it worked for older version of sux.
Please find the patch I will commit.
I use 'sudo sh -c "$COMMAND"' so that e.g.
su-to-root -c 'ls $HOME'
work (since that works with su).
Cheers,
--
Bill. <[EMAIL PROTECTED]>
Imagine a large red swirl here.
Index: scripts/su-to-root
===================================================================
RCS file: /cvsroot/menu/menu/scripts/su-to-root,v
retrieving revision 1.10
diff -u -r1.10 su-to-root
--- scripts/su-to-root 19 Jan 2008 20:20:06 -0000 1.10
+++ scripts/su-to-root 29 Feb 2008 09:51:51 -0000
@@ -65,8 +65,8 @@
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin
SHELL=`eshell $PRIV`
case $SU_TO_ROOT_SU in
- sux) suname=sux; pwuser="$PRIV"; cmd='sux -p "$PRIV" "$COMMAND"';;
- sudo) suname=sudo;pwuser="$USER"; cmd='sudo -u "$PRIV" "$COMMAND"';;
+ sux) suname=sux; pwuser="$PRIV"; cmd='sux -p "$PRIV" -c "$COMMAND"';;
+ sudo) suname=sudo;pwuser="$USER"; cmd='sudo -u "$PRIV" sh -c
"$COMMAND"';;
*) suname=su; pwuser="$PRIV"; cmd='su -p "$PRIV" -c "$COMMAND"';;
esac
transl 'Using %s...\n' "$suname"