Yes, Virginia, you *can* have filenames containing '/'

Jeff Stearns jeff at tc.fluke.com
Wed Nov 23 09:58:10 AEST 1988


Most of us think of '/' as a separator in Unix pathnames, but it ain't
always so.  I just created several files with '/' in the filenames
themselves.

It's remarkably easy to do - just cook up an NFS packet with the
appropriate bits in it.  NFS servers don't care; they're not responsible
for parsing pathnames, so they don't know about separators.  They deal
only in individual filenames.  If an NFS client wants to name a file
"//./..///", that's fine with the server.  Into the directory it goes.

Makes for some fun later when UNIX tries to do anything with the file.  As
you can imagine, most system calls will fail.

This isn't really a bug so much as a consequence of the fact that the NFS
spec isn't specific to UNIX semantics.  From the NFS point of view, such
files should be allowed.

It does raise some interesting questions about the limitations of
heterogeneous systems.  And it's one of the few times when UNIX chokes on
a filename which is legal on other operating systems (my example actually
comes from a Macintosh speaking to the NFS via a Cayman GatorBox).

    Jeff Stearns        John Fluke Mfg. Co, Inc.               (206) 356-5064
    jeff at tc.fluke.COM   {uw-beaver,microsoft,sun}!fluke!jeff

PS - Calling all users of the Vitalink TransLAN IV Ethernet bridge! Please
     drop me a line.



More information about the Comp.sys.sun mailing list