Source-Changes archive

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

Re: CVS commit: src/usr.bin/su



> Log Message:
> Only unset ENV if -f was used, AS THE CHANGE WAS DOCUMENTED.
> I'm not convinced this is a good idea at all,
> but at least this fixed my usage.

I tend to agree, 'su -f user' (like 'su user') carries all of your
environment over into the new user - this is a bad idea.

What you should do is 'su -l user' (or 'su - user' if you don't mind
a non-getopts command line:-)) which always kills all of the original
environ.

(I'm surprised GAW allows anyone to do 'su user', it must be a major
security problem...)

To my mind there is far too much csh specific crap in su anyway.
(and -f is documented as for csh only)

Maybe 'su' would benefit from a 'su -d user' which is the same as
'su -l user' except that the cd to the home directory is skipped.

        David

-- 
David Laight: david%l8s.co.uk@localhost



Home | Main Index | Thread Index | Old Index