bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input


From: Stephane Chazelas
Subject: Re: [Pkg-shadow-devel] Bug#476519: shell-mode garbles input
Date: Fri, 2 May 2008 16:50:53 +0100
User-agent: Mutt/1.5.16 (2007-09-19)

On Fri, May 02, 2008 at 11:27:00PM +0800, address@hidden wrote:
> SC> Try
> SC> sudo env -i SHELLOPTS=xtrace su -p - nobody
> (I don't use sudo)
> uid=0(root) gid=0(root) groups=0(root)
> # env -i SHELLOPTS=xtrace su -p - nobody
> + PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
> + '[' /bin/sh ']'
> + PS1='address@hidden:\w\$ '
> + export PATH
> + umask 022
> address@hidden:/root$ kill -1 $$
> + kill -1 6215
> # env -i SHELLOPTS=xtrace su -p - nobody
> + PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
> + '[' /bin/sh ']'
> + PS1='address@hidden:\w\$ '
> + export PATH
> + umask 022
> address@hidden:/root$ logout
> #
> 
> Above on my first attempt the shell stayed alive, so I typed kill -1
> $$ (instead of exit, so it would be clear that I typed it, as that is
> something the "magic hand" never uses.) On the second and later
> attempts, some magic hand typed "logout" for me. The magic hand also
> sometimes types "exit"...
[...]

Does that happen straight away or after a delay?

The "logout" thing looks a bit like eof from the terminal.

It could be the "read" being interupted by a signal or something
like that.

strace would probably help then:

sudo env -i strace -vfo /tmp/strace.out /bin/su - nobody

And look at the last read(0 in /tmp/strace.out

It could be worth checking the ulimits as well.

-- 
St├ęphane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]