[linux-cifs-client] Re: remapping illegal file characters
Steve French
smfrench at austin.rr.com
Sun Apr 3 05:02:31 GMT 2005
Andrew Bartlett wrote:
>The only bit that bothers me about this is that we must then escape any
>'legitimate' use of the escape sequence - is this easy to do, given the
>way this is just pushed into the private unicode area?
>
>Andrew Bartlett
>
>
The * and ? are the only tough examples that I see that could get
confusing if we are not careful - but the Linux (and Unix) kernel API
does not pass * and ? with the intent that they represent wildcards.
In addition : represents a separator for the beginning of a stream name
in most cases in Windows - but I doubt that with SFU you can create
streams in a way that would semantically collide.
Part of the reason I posted this is to think through this carefully -
whether it was needed to be optional and where it would be specified,
and which names it would apply to - In the cifs vfs alone there are more
than 60 places where it invokes the API for conversion of a string to
Unicode and 19 conversions from Unicode - and not all are for filenames
(although most are).
I don't think it is reasonable to do this mapping on the wire if Unicode
is not negotiated though, although perhaps it could be done with UTF-8
on the wire.
I would prefer that we never map the illegal chars in filenames in the
case in which the POSIX extensions (CIFS Unix extensions version 2) were
negotiated/recognized, but we obviously have to map them in the Windows
case (and not just to recognize SFU files).
More information about the linux-cifs-client
mailing list