Grumble. By not passing an FSP into READDIR etc we make it harder for OEMs to avoid modifying Samba

Jeremy Allison jra at samba.org
Mon Oct 7 11:49:31 MDT 2013


On Mon, Oct 07, 2013 at 10:41:51AM -0700, Richard Sharpe wrote:
> Hi folks,
> 
> We want to play games in READDIR that would have been enabled at
> OPENDIR/FDOPENDIR time by noticing certain things and adding an FSP
> Extension that allowed us to easily detect that we are in the
> situation we are interested in and can then play the games we want to
> play.
> 
> Unfortunately, there is no FSP passed into READDIR ... sigh. Not even in Master.

There is a way to get there from here :-). It's ugly, but doable.

vfs_readdir() takes an SMB_STRUCT_DIR *, which should have been returned
from vfs_fdopendir(). vfs_fdopendir *does* take a fsp, and so you can
add an associative cache inside opendir that links fsp's to SMB_STRUCT_DIR *
pointers. The inside vfs_readdir() do the fsp lookup.

Of course I'm happy to review any changes to the VFS for 4.2.x (going
into master now !).

Jeremy.


More information about the samba-technical mailing list