Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!nucsrl!naim From: naim@eecs.nwu.edu (Naim Abdullah) Newsgroups: comp.unix.wizards Subject: Re: Kernel Hacks & Weird Filenames Message-ID: <8120012@eecs.nwu.edu> Date: 2 May 88 00:12:32 GMT References: <13041@brl-adm.ARPA> Organization: Northwestern U, Evanston IL, USA Lines: 62 As the person who started this unprintable filenames discussion by asking why BSD disallows certain file names, let me say what my *fundamental* objection to this business of "protecting" the user is. I think the most wonderful thing about UNIX is it's generality and elegance. Sadly, people who don't appreciate that, add gratuitous options to cat(1) and ls(1), and now (horrors!) make proposals that unprintable filenames be disallowed. To understand the UNIX philosophy, we must go back to the original source. The following is from the paper, "UNIX Implementation" by Ken Thompson: >The kernel is the only UNIX code that cannot be substituted >by a user to his own liking. For this reason, the kernel >should make as few real decisions as possible. This does not ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Important point! >mean to allow the user a million options to do the same thing. >Rather, it means to allow only one way to do one thing, but have >that way be the least-common divisor of all the options that >might have been provided. > >What is or is not implemented in the kernel represents both >a great responsibility and a great power. It is a soap-box >platform on "the way things should be done." Even so, if >"the way" is too radical, no one will follow it. Every >important decision was weighed carefully. Throughout, simplicity >has been substitued for efficiency. Complex algorithms are used >only if their complexity can be localized. > I think the proposal that unprintable filenames be disallowed by the kernel follows from a VMS/IBM mentality. Sorry to be so harsh, but it totally goes against the whole spirit of UNIX. If you want to protect naive users from unprintable filenames, then by all means write a special shell or relink your utilities with a special version of the C library, but don't put that decision in the kernel. The kernel should allow very general things. It is all the crap above it, that should "protect" the user. This is because, you and I differ whether this "protection" is needed or not. You can have all the "protection" you want, but don't force it on me! This is why I am disappointed that 4.3BSD disallows filenames with the high bit set. I am glad that SunOS 4.0 lifts this restriction. Guy mentioned that the reason for this is to support other languages. I think the reason should have been simply because of generality/elegance or because it is The Right Thing. Does anybody know whether V9 or 4.3-tahoe allow arbitrary bytes in filename (excepting ofcourse, '\0' and '/') ? Naim Abdullah Dept. of EECS, Northwestern University Internet: naim@eecs.nwu.edu Uucp: {ihnp4, chinet, gargoyle}!nucsrl!naim