filename separators and option indicators

Chris Calabrese[mav] cjc at ulysses.att.com
Sat Jun 2 01:45:11 AEST 1990


In article <6807 at eos.UUCP>, jbm at eos.UUCP (Jeffrey Mulligan) writes:
> cjc at ulysses.att.com (Chris Calabrese[mav]) writes:
> 
> >In article <1990May31.065335.10406 at agate.berkeley.edu>, dankg at lightning.Berkeley.EDU (Dan KoGai) writes:
> 
> >> 	Gee, I knew that:  You can quote file name in shell and just do
> >> fopen("~!@#$%^&*()-_=+[{]}\\|\'\";:?.>,<", "w") in c source or anything but
> >> in reality those drive your shell nuts.
> 
> >Not only does the shell not have problems with punctuation marks, but
> >it even handles non-printable characters without complaining.
> 
> I think he should have said "in reality those will drive many users nuts."
> Of course wizards aren't fazed, since they already are nuts :-)

Yes, well, umm...
Actually, there is one interesting thing about files containing funny
characters - xargs barfs on them:

Script started on Fri Jun  1 11:42:15 1990
908 telemachos_/watsop/htor/test) > 'this is a test'
909 telemachos_/watsop/htor/test) echo this* | xargs ls
this not found
is not found
a not found
test not found
910 telemachos_/watsop/htor/test) exit
script done on Fri Jun  1 11:42:26 1990

If you have some admin scripts which use xargs (often backup scripts,
user deleting scripts, etc), you can wreak havoc on your system like
this.  Depending on the exact situation you may be able to use this to:
1) make files that crash the backup scripts
2) make files that can-not be deleted
3) make files that crash user-deletion scripts
4) make files that aren't deleted when they're supposed to be by scripts
etc.
Name:			Christopher J. Calabrese
Brain loaned to:	AT&T Bell Laboratories, Murray Hill, NJ
att!ulysses!cjc		cjc at ulysses.att.com
Obligatory Quote:	``Anyone who would tell you that would also try and sell you the Brooklyn Bridge.''



More information about the Comp.unix.wizards mailing list