Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
On 10/1/17 7:30 PM, L A Walsh wrote:
> Only in the case of login -- they user CAN'T set it before they login, but
> someone **could** have changed the system /etc/profile script to set OLDPWD
> to /hang (i.e. someone is behaving "maliciously").
Login shells rarely get OLDPWD from the environment. How about checking
OLDPWD only if it appears in the environment, which would avoid the
set-maliciously-in-etc-profile problem?
That is consistent with the current behavior for importing PWD.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/