News for hackers. Stuff that matters.
Re:Why "ls *.c" is at least dumb, and possibly dangerous by duskwuff on Thursday October 08, 2009 @11:00PM (#870509)
I've seen some concepts thrown around about a (Linux) kernel patch to disallow filenames which contain unprintable characters. I approve of them.

With regard to why this matters, it's not uncommon for badly written scripts to interpolate filenames directly into commands. Consider this Perl fragment:

  $sessionFiles = `ls /tmp/session_*`;
  system("rm -f $sessionFiles");
and what it would do with a file called:

  "/tmp/session_blah; chmod +s"

There are no comments on this comment yet.