[PATCH 0/13] add SMB2 server-side copy support - V2
Jeremy Allison
jra at samba.org
Wed Nov 28 21:00:50 MST 2012
On Wed, Nov 28, 2012 at 10:42:16PM +0100, David Disseldorp wrote:
> Hi Jeremy,
>
> On Tue, 27 Nov 2012 14:04:49 -0800
> Jeremy Allison <jra at samba.org> wrote:
>
> > Sorry it's taken a while to get to this review. But there
> > are a couple of changes I'd still like to see (sorry).
>
> No problem, thanks a lot for the feedback.
>
> > In this patch:
> >
> > smb2_ioctl: add support for FSCTL_SRV_COPYCHUNK
> ...
> > We're actually doing a write operation (via the COPYCHUNK request).
> > However, there is no CHECK_WRITE(fsp) call on the destination
> > fsp. This function checks that the fsp is open for writing and
> > writing is allowed on this share - without it we could be writing
> > to a file opened without FILE_WRITE access.
> >
> > I think inside fsctl_srv_copychunk_send() you should have a check
> > similar to the one inside source3/smbd/smb2_write. Look for
> > the CHECK_WRITE macro inside that file for details.
>
> Good catch, looks like a CHECK_READ on the src_fsp is also needed.
Oh - good point, I forgot about that one too !
Thanks for following up.
Jeremy.
More information about the samba-technical
mailing list