Issue during SMBreadX

Jeremy Allison jra at
Thu Nov 29 11:56:28 MST 2012

On Thu, Nov 29, 2012 at 10:45:56AM -0800, sandeep nag wrote:
> I have added an extension structure to samba fsp(files_struct) in open()
> call of
> our samba plugin using VFS_ADD_FSP_EXTENSION. I access the extension
> structure
> in read(), write(), etc calls of the plugin by fetching the added extension
> structure using
>  FETCH_AND_CHECK_FSP_EXTENSION. This worked well in most of the cases. But
> I am seeing a failure when "SMBreadX" call came in. When this call comes
> in, it is trying to fetch the extension and see that that extension
> structure not available, i.e the open() function is not executed for that
> file before calling SMBreadX.

The only way you could have a valid fsp for a file,
where the VFS open() function was not called, is for
a file that was opened for READ_ATTRIBUTES only. In
that case the check is READ_DATA is allowed should
have happened (and failed) before your VFS read
is called. What function are you hooking here ?


More information about the samba-technical mailing list