Package: login Version: 4.0.14-1 Severity: normal Dear maintainers,
from bash's source, shell.c: ] /* A non-interactive shell not named `sh' and not in posix mode reads and ] executes commands from $BASH_ENV. If `su' starts a shell with `-c cmd' ] and `-su' as the name of the shell, we want to read the startup files. ] No other non-interactive shells read any startup files. */ This was the case prior to 4.0.14: (tested on 4.0.13-7) ] s10:~# strace -eexecve,setuid32 -f su - backup echo \$SHELL ] execve("/bin/su", ["su", "-", "backup", "echo", "$SHELL"], [/* 18 vars */]) = 0 ] setuid32(34) = 0 ] execve("/bin/sh", ["-su", "-c", "echo $SHELL"], [/* 8 vars */]) = 0 ] ^^^^^ ] ... Present behaviour: ] [EMAIL PROTECTED]:/home/jcn# strace -f -eexecve,setuid32 su - jcn echo \$SHELL ] execve("/bin/su", ["su", "-", "jcn", "echo", "$SHELL"], [/* 25 vars */]) = 0 ] setuid32(1000) = 0 ] Process 23014 attached (waiting for parent) ] Process 23014 resumed (parent 23013 ready) ] Process 23013 suspended ] [pid 23014] execve("/bin/bash", ["/bin/bash", "-c", "echo $SHELL"], [/* 8 vars */]) = 0 ] ^^^^^^^^^^^ ] ... This results in, among other things, $PATH being set to the wrong directory list. Regards, Jan -- Jan C. Nordholz <jckn At gmx net>
signature.asc
Description: Digital signature