Package: sux
Version: 1.0.1-3.2
Severity: normal

Hi,

when called as `sux - <random user>', sux runs the target user's
~/.bash_profile script twice :

[EMAIL PROTECTED]|pts/5:~# adduser --disabled-password --gecos '' foobar > 
/dev/null
[EMAIL PROTECTED]|pts/5:~# echo "echo \"This is foobar's ~/.bash_profile\"" >> 
~foobar/.bash_profile
[EMAIL PROTECTED]|pts/5:~# sux - foobar
This is foobar's ~/.bash_profile
xauth:  creating new authority file /home/foobar/.Xauthority
This is foobar's ~/.bash_profile

This is apparently due to sux not dropping the minus in the su(1)
invocation, and running the command `$SHELL -l' (``login''). The exact
command line sux generates appears to be this one:

exec su  - foobar -c "eval $TERM;      exec env  TERM='xterm' DISPLAY=':0' sh 
-c \"exec $SHELL -l\""
       ^^^                                                                      
              ^^^
       Minus invocation                                                         
              Login shell

The man page for sux reads in part:

        ’sux user’ and ’sux - user’ behave just like su but transfer $DISPLAY
        and the X cookies.

Since su(1) doesn't do that, this behaviour is unexpected, and can lead
to annoying and unwanted side-effects. Could you please fix this ?


Cheers,
        -- W.

-- System Information:
Debian Release: testing/unstable
  APT prefers experimental
  APT policy: (600, 'experimental'), (550, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-rc3-k7
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to fr_FR.UTF-8)

sux depends on no packages.

Versions of packages sux recommends:
ii  xbase-clients                 1:7.1.ds-2 miscellaneous X clients

-- no debconf information

Reply via email to