Bug#347935: [Pkg-shadow-devel] Bug#347935: ccache support in pbuilder is broken with 'su -p' not preserving PATH

Alexander Gattin xrgtn at yandex.ru
Sat Jan 14 19:32:37 UTC 2006


Hi!

On Sat, Jan 14, 2006 at 10:22:58PM +0900, Junichi Uekawa wrote:

> Methinks we will need to evaluate what needs to be fixed, and how
> difficult the fix is, and then proceed further.

Maybe, there is smth. wrong with .*rc of target user's shell?
For example, I see that environment is preserved by `su -p`:

> cherokee:~# echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
> cherokee:~# export PATH=$PATH:/usr/games
> cherokee:~# echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
> cherokee:~# su -p root /usr/bin/env | grep PATH
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games

and not preserved without -p, as intended:

> cherokee:~# su root /usr/bin/env | grep PATH
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11

P.S. you should do strace (-f) on your system to see what
shell is being run and what rc file does it source...

Maybe there's also smth. else, I'm not sure.
-- 
WBR,
xrgtn




More information about the Pkg-shadow-devel mailing list