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

Jeremy Allison jra at samba.org
Fri Mar 9 20:54:27 GMT 2007

On Fri, Mar 09, 2007 at 03:45:42PM -0500, Wagner, Chris (GE Infra, Non-GE, US) wrote:
> I think this needs some clarification.  I'm not a samba/cifs developer but I would be in the "implementor" category.  Can u give some examples of the backslash occuring in an ambiguous place?  I'm assuming ur talking about the situation where some obnoxious user puts a backslash in a file name or directory name. Like /home/userluser/eLItE\haXor/ which creates a parsing ambiguity.  A windows user would access that as \\server\share\userluser\eLItE\haXor\ which would be a problem. U wrote two backslashes in the text but put one in the example path.  Did u mean to escape the backslash for the benefit of ur/our email client?  If ur talking about when to interpret a backslash as a path seperator or as a literal then I think escaping the backslash with a second backslash would be the way to go. So my example would be required to be \\server\share\userluser\eLItE\\haXor\ or //server/share/userluser/eLItE\\haXor/.  Am I reading ur question right and does my example make sense?

"/home/userluser/eLItE\haXor/" in smbd would be mangled for
a Windows user into an 8.3 name, due to the invalid '\\'

The problem for me is in POSIX pathname processing
(when both server and client support the UNIX extensions).

Currently the client would send a pathname of :

"/home/userluser/eLItE\haXor/" and the smbd server
would interpret it as :


which is incorrect. Now that's easy to fix, but
the problem is when the client is in unix extensions
posix pathname mode and accesses a DFS share which
needs to reply with a redirect of :



More information about the cifs-protocol mailing list