recvfile and streams_xattr (and possibly streams_tdb) do not play well together

Richard Sharpe realrichardsharpe at gmail.com
Thu Aug 2 15:09:19 MDT 2012


On Thu, Aug 2, 2012 at 1:17 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> Recvfile is wonderful, except when you are trying to use the
> streams_xattr module.
>
> In that case, vfs_write_data calls SMB_VFS_RECVFILE rather that SMB_VFS_PWRITE.
>
> To fix this problem, our implementation of recvfile would have to
> distinguish between streams and non streams, read the data off of the
> socket into a buffer, then call SMB_VFS_PWRITE, which is a pain.
>
> A better approach might be to:
>
> 1. Be able to mark FSPs with do_not_use_recvfile, and then
> 2. In source3/smbd/process.c:receive_smb_raw_talloc, where we check
> for !smb_signing etc, also check for !do_not_use_recvfile) and skip
> the recvfile path in that case.
>
> That way we can simplify life in VFSs and stop interactions between them.

Forget that idea. At the point that we are reading from the socket we
do not know which FSP the request is for, and it will add too much
code to deal with that.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list