Why ":" is not allowed in file names?

Richard Sharpe rsharpe at richardsharpe.com
Wed Apr 30 23:38:28 GMT 2003


On Wed, 30 Apr 2003, Christopher R. Hertel wrote:

> Richard Sharpe wrote:
> > 
> > On Wed, 30 Apr 2003, Chere Zhou wrote:
> > 
> > > in reply_ntcreate_and_X at nttrans.c:
> > >
> > >                         /*
> > >                          * Check to see if this is a mac fork of some kind.
> > >                          */
> > >
> > >                         if( strchr_m(fname, ':')) {
> > >                                 END_PROFILE(SMBntcreateX);
> > >                                 return
> > > ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
> > >                         }
> > >
> > > I would like to know why we do not allow ":" in file names?
> > 
> > Well, and interesting question for you is why do you want to allow colons
> > in file names?
> 
> No, I don't think so.  Colons, dashes, and other punctuation are common.  I
> can find all sorts of files on my Linux box with colons in the name.  I
> think that the original question is the correct one.
> 
> The answer is that colons are reserved by IBM/Microsoft OSes.  See page 24
> of the SNIA CIFS Technical Reference.
> 
> The colon is used to delimit device names (eg. "C:", "LPT1:") and also (I
> believe) to delimit NTFS stream names.

Yes, I knew that. It suggests that Chere wants to implement Alternate 
Data Streams ... :-)

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com



More information about the samba-technical mailing list