Interesting bug in csh

Peter Johnson ~ pete at escher.intel.com
Sat Mar 11 05:33:20 AEST 1989


I have recently come across a peculiar bug in csh and was wondering
if it posed any security problems.

If you try to use a : modifier on a environment variable, strange
things happen.  For example:

% echo $SHELL:t
/bin/csh:t
% echo ${SHELL:t}
Variable syntax.
% ls
/bin/cshls: Command not found

This bug appears in Ultrix 2.2, 3.0, SunOS 4.0, BSD 4.3, AIX, AUX.
The only system that I have used where it does not appear is UTS.
Of course UTS chokes on it as well, but in a different way.

-Pete Johnson
Peter Johnson

pete at smdvx1.intel.COM
{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!pete



More information about the Comp.unix.wizards mailing list