[comp.sys.sun] Yes, Virginia, you *can* have filenames containing '/'

jeff@tc.fluke.com (Jeff Stearns) (11/23/88)

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@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.

joe@uunet.uu.net (Joe Michel-Angelo) (12/09/88)

jeff@tc.fluke.com (Jeff Stearns):
> 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.

We noticed the same problem here with our mac network!

Drove my find/cpio incremental backup scripts nutso! Time to "adb ." was
the only thing on my mind... 

I finally resorted to breaking the </> key on all the macs...

         Joe Angelo -- Senior Systems Engineer/Systems Manager
	Teknekron Software Systems, Palo Alto 415-325-1025
	joe@tss.com - uunet!tekbspa!joe - tekbspa!joe@uunet.uu.net