Commas in DFS pathname

Jeremy Allison jra at samba.org
Thu Oct 3 16:11:12 MDT 2013


On Thu, Oct 03, 2013 at 02:14:49PM -0700, Richard Sharpe wrote:
> On Thu, Oct 3, 2013 at 1:59 PM, Hafeez Bana <hafeez.bana at gmail.com> 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 http://www.samba.org/samba/docs/using_samba/ch08.html
> >
> > 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)) {
>                 count++;
>         }
> 
> It should probably be looking for ",msdfs:' or something similar.

Yes, looking for ,msdfs: would certainly fix most of the
issues !


More information about the samba-technical mailing list