[PATCH] HEAD -- wrong behaviour with truncate and 1019 control
Jeremy Allison
jra at samba.org
Wed Mar 20 11:21:03 GMT 2002
On Wed, Mar 20, 2002 at 12:08:11PM +0200, Alexander Bokovoy wrote:
> Greetings!
>
> Following patch fixes nasty bug when SMB client sents SET_FILE_INFORMATION
> operation with info level 1019 to truncate file.
>
> Index: trans2.c
> ===================================================================
> RCS file: /cvsroot/samba/source/smbd/trans2.c,v
> retrieving revision 1.210
> diff -u -r1.210 trans2.c
> --- trans2.c 5 Mar 2002 01:43:50 -0000 1.210
> +++ trans2.c 20 Mar 2002 10:02:39 -0000
> @@ -2159,7 +2159,7 @@
> }
> close_file(new_fsp,True);
> } else {
> - ret = vfs_allocate_file_space(fsp, size);
> + ret = vfs_allocate_file_space(fsp, allocation_size);
> if (vfs_fstat(fsp,fd,&new_sbuf) != 0) {
> DEBUG(3,("fstat of fnum %d failed (%s)\n",fsp->fnum, strerror(errno)));
> ret = -1;
Thanks - that explains why I wasn't seeing the problem
that Andrew was complaining about - this is already fixed
in the 2.2.x trans2.c code.
Andrew - that merge *really* needs to get done.... :-).
I'll try and work on it later this week.
Jeremy.
More information about the samba-technical
mailing list