bug in send_file_readbraw?
jra at samba.org
Wed May 9 00:50:12 GMT 2007
On Wed, May 09, 2007 at 10:44:33AM +1000, Alison Winters wrote:
> I've been poking around in reply.c the past few days working on some
> profiling improvements, and i noticed something that appears to be a bug
> in the send_file_readbraw function. I could be wrong in identifying
> this as a bug because i don't know what Windows does in this case, but
> it seems a bit bizarre to me that if the sendfile() call succeeds, we
> then continue to call read_file() and write_data() immediately
> afterwards. It looks to me like we'll be sending duplicate data in this
> case. Patch against SAMBA_3_0 is attached, though this is evident in
> 3.0.24 and presumably other versions too.
> Index: source/smbd/reply.c
> --- source/smbd/reply.c (revision 22764)
> +++ source/smbd/reply.c (working copy)
> @@ -2237,7 +2237,7 @@
> fsp->fsp_name, strerror(errno) ));
> exit_server_cleanly("send_file_readbraw sendfile failed");
> + return;
Perfectly correct thanks. I'll fix for 3.0.25 and beyond.
More information about the samba-technical