[PATCHES BUG 13446] smbd: Cache dfree information based on query path

Jeremy Allison jra at samba.org
Mon May 21 23:25:40 UTC 2018


On Mon, May 21, 2018 at 04:20:49PM -0700, Christof Schmitt wrote:
> On Mon, May 21, 2018 at 12:46:33PM -0700, Jeremy Allison wrote:
> > On Fri, May 18, 2018 at 08:54:26PM -0700, Christof Schmitt via samba-technical wrote:
> > > Forgot to include one patch to flush the cache on service reload. See
> > > the last patch in this series.
> > 
> > Couple of comments. The key for the cache is incorrect, you're
> > only using fname->base_name - this can easily be duplicated across
> > different shares (for example, multiple shares all with a "TEMP"
> > sub directory).
> > 
> > The cache key needs to be the absolute pathname, not the share
> > relative one.
> 
> Right, i missed that. I will update this to get_full_smb_filename.

Nope, that call doesn't do what you think it does :-).

It only appends a stream name if present, not the full pathname.
You need to talloc_asprintf containing the vfs_GetWd() return.

> > Secondly, removing:
> > 
> > -       struct dfree_cached_info *dfree_info;
> > 
> > from the typedef struct connection_struct { is an ABI
> > change for the VFS. Many VFS modules indirect into
> > connection_struct *conn which will break if introduced
> > as a back-pot for a patch.
> > 
> > So this change is OK for master (but you need a comment in
> > source3/include/vfs.h to say you're changing the VFS interface
> > ABI number, or at least logging the fact you're changing it
> > as the number is already incremented for 4.9.0), but
> > this part of the patch can't be back-ported for any
> > released version.
> 
> Ok. It still makes sense to remove the unused part for master. Maybe i
> will just remove the BUG line from the description, and add a comment
> that this should not get backported.

In which case it doesn't really need a bug number and
you can just close the bug :-).

Cheers,

	Jeremy.



More information about the samba-technical mailing list