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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/