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

Bug#202081: tetex-extra: Regeneraters user's ls-R file as owned by root



On Tue, Aug 05, 2003 at 09:16:42PM +0200, Hilmar Preusse wrote:
> No, su will leave your environment variables as long as you don't
> call "su -". "su - " will treat your shell as login shell and call
> all your profiles. What I don't understand:
> 
> drachi:[hille] >su -c /usr/bin/mktexlsr
> Password:
> mktexlsr: Updating /var/lib/texmf/ls-R.opt...
> mktexlsr: Updating /var/lib/texmf/ls-R.local...
> mktexlsr: Updating /var/lib/texmf/ls-R...
> mktexlsr: Updating /var/spool/texmf/ls-R...
> mktexlsr: Done.

So, su did set $HOME to /root. This is not expected from the man page.

> drachi:[hille] >su - -c /usr/bin/mktexlsr
> Password:
> mktexlsr: Updating /var/lib/texmf/ls-R.opt...
> mktexlsr: Updating /var/lib/texmf/ls-R.local...
> mktexlsr: Updating /var/lib/texmf/ls-R...
> mktexlsr: Updating /var/spool/texmf/ls-R...
> mktexlsr: Done.

It did the same here.

> drachi:[hille] >su -c "echo $HOME"
> Password:
> /home/hille

Now it seems it didn't.

> drachi:[hille] >su - -c "echo $HOME"
> Password:
> /home/hille

Now it seems it didn't either, even though you put - there.

> drachi:[hille] >su
> Password:
> drachi:[hille] >exit

Yes, it doesn't cd, but $HOME="/root", which is not documented
(although, looking at your examples now, there's even more weirdness
going on).

> drachi:[hille] >su -
> Password:
> drachi:[~] #
> ^^^^^^^^^^^^ different prompt -> PS1 was changed.

Now it's as if you logged in as root.

> drachi:[hille] >su -p -c /usr/bin/mktexlsr
> Password:
> mktexlsr: Updating /home/hille/.texmf/ls-R...
> mktexlsr: Updating /var/lib/texmf/ls-R.opt...
> mktexlsr: Updating /var/lib/texmf/ls-R.local...
> mktexlsr: Updating /var/lib/texmf/ls-R...
> mktexlsr: Updating /var/spool/texmf/ls-R...
> mktexlsr: Done.
> 
> with -c su seems to behave a little bit different anyway.
> 
> > I'm thinking of filing bugs for those packages.
> > 
> I wouldn't call it a bug.

Yes, it's probably a feature. The bug is that the feature is
undocumented ;). I will try pestering the maintainer for more docs.

-- 
Matijs van Zuijlen

Attachment: signature.asc
Description: Digital signature


Reply to: