Commas in DFS pathname

Richard Sharpe realrichardsharpe at
Thu Oct 3 15:14:49 MDT 2013

On Thu, Oct 3, 2013 at 1:59 PM, Hafeez Bana <hafeez.bana at> wrote:
> Hi Guys,
> We're noticing that an msdfs link containing a comma doesn't work e.g.
> "msdfs:servername\some dir with - funny,little, chars"
> I know the comma is used to seperate two msdfs links for load balancing as
> per
> Does anyone know of a workaround given commas are a valid character in CIF
> directory names?

I think the code will have to be fixed.

That is, in source3/smbd/msdfs.c:parse_msdfs_symlink:parse_msdfs_symlink:

Fix this code:

        /* parse out the alternate paths */
        while((count<MAX_REFERRAL_COUNT) &&
              ((alt_path[count] = strtok_r(NULL, ",", &saveptr)) != NULL)) {

It should probably be looking for ",msdfs:' or something similar.

Richard Sharpe

More information about the samba-technical mailing list