[linux-cifs-client] Re: POSIX pathnames and the '\' character

Steve French smfltc at us.ibm.com
Sat Mar 10 01:01:33 GMT 2007


Steve French wrote:
>> Second would be to infer the path seperator from the first char after 
>> the share name
> I think that this is what everyone could agree on ...
>
> A DFS path with mixed slash usage ie which began with a forward slash 
> (after \server\share) is detectable and unlikely to be generated by 
> legacy clients or servers.
>
> I do not believe that any current client could request a DFS referral 
> using the path of form
>     \server\share/directory/subdirectory
> I also do not believe that any server exists which could construct DFS 
> referral responses with a path of the form
>     \server\share/directory/subdirectory
>
> If a DFS client supported posix paths, such a DFS client could easily 
> recognize the need to convert \ to / in pathnames by noting the first 
> char after the share name in the DFS referral response which was sent 
> by a server on a share which claimed to be POSIX.
>
> Based on the lack of bugs reported to Samba server in the non-DFS case 
> (the Linux cifs client could send such paths, but the Samba server has 
> never supported '\' in a path component although it does support : and 
> * and ? for posix clients) - in practice such paths seem to be very rare.
>
>
I made a typo in the previous post:

I do not believe that any current client could request a DFS referral 
using (mixed slash usage) the path of form
    \server\share/directory\subdirectory

I also do not believe that any server exists which could construct DFS 
referral responses (mixed slash usage) with a path of the form
    \server\share/directory\subdirectory

Such a form would be fairly easy to recognize as being a POSIX path with 
no subdirectory but rather a directory name with a backslash character 
in the middle.  Unfortunately allowing this is quite a bit of work on 
the server, among other reasons because the DFS junctions on the server 
are usually just opaque symlink data which are easy for the admin to 
misconfigure (on most platforms the Samba server can't  be sure if mixed 
slashes are just a simple user error which the server can fix on the fly)



More information about the linux-cifs-client mailing list