[PATCH] Fix failure to update dirpath

Jeremy Allison jra at samba.org
Tue Aug 21 01:02:31 UTC 2018


On Tue, Aug 21, 2018 at 06:00:25AM +0530, Anoop C S wrote:
> On Mon, 2018-08-20 at 17:21 -0700, Jeremy Allison wrote:
> > On Tue, Aug 21, 2018 at 05:47:17AM +0530, Anoop C S wrote:
> > > On Mon, 2018-08-20 at 17:12 -0700, Jeremy Allison via samba-technical wrote:
> > > > On Tue, Aug 21, 2018 at 05:34:17AM +0530, Anoop C S via samba-technical wrote:
> > > > > On Mon, 2018-08-20 at 16:37 -0700, Jeremy Allison wrote:
> > > > > > On Tue, Aug 21, 2018 at 04:51:38AM +0530, Anoop C S wrote:
> > > > > > > 
> > > > > > > To be more precise, parent_dirname() inside check_parent_exists() correctly puts "."
> > > > > > > into
> > > > > > > *parent
> > > > > > > (which is nothing but parent_fname.base_name). It is just that we did not copy that over
> > > > > > > to
> > > > > > > *pp_dirpath before returning from check_parent_exists(). 
> > > > > > 
> > > > > > OK, I think this is the correct fix. Can you confirm it works
> > > > > > with your setup and I'll submit for review ?
> > > > > 
> > > > > Sorry.. apart validating `smbclient` I was making sure that "The file '<%1 NULL:NameDest>'
> > > > > is
> > > > > too
> > > > > large for the destination file system" error is no longer seen from Windows client.
> > > > 
> > > > No problem.
> > > > 
> > > > > and it works. But with this diff check_parent_exists() might need an overall clean-up to
> > > > > look
> > > > > more
> > > > > readable. Just my thought.
> > > > 
> > > > Hmmm. I dunno, IMHO that *was* the clean-up to make
> > > > it more readable :-).
> > > 
> > > Ok.
> > > 
> > > > I'll submit for review :-).
> > > 
> > > Was that intentional to have two whitespaces before no_optimization_out goto label?
> > 
> > Yes, that's always been my convention for goto: labels.
> 
> Fine by me :-)
> 
> and thanks.

Hang on a minute. I've been looking really closely
now at the *callers* of check_parent_exists() and
many of them depend on *dirpath == '\0' in the
case where smb_fname->base_name doesn't contain
a component containing '/' characters.

I think my fix, although it might work, will affect
other paths. Let me look at this more closely
tomorrow. I'm withdrawing this for now.

Jeremy.



More information about the samba-technical mailing list