[PATCH 00/17] add SMB2 server-side copy support - V3
David Disseldorp
ddiss at samba.org
Tue Jan 15 09:22:55 MST 2013
This change-set adds support for the FSCTL_SRV_COPYCHUNK and
FSCTL_SRV_REQUEST_RESUME_KEY server-side copy SMB2 ioctls, allowing
for network round-trip avoidance during a file copy, i.e.:
http://www.samba.org/~ddiss/slides/snappery_samba/img17.html
Thanks to the MS protocol documentation team for shedding light on a
number of areas I found unclear in the existing docs.
Changes since V2:
- Add CHECK_READ and CHECK_WRITE permissions checks
- Change vfs_default copychunk handler to support src=dest requests
- Improve copychunk request validation
- Process/report copychunk response data independent of status
- Add extra tests: overlapping IO, sparse regions, marshalling, etc.
Feedback appreciated.
Cheers, David
--
The following changes since commit 065c0ec16259f8d57baec5dfe4e6eb9bdea0002a:
dsdb: Add test for modification of two attributes, one permitted, one denied (bug #9554 - CVE-2013-0172) (2013-01-15 14:03:47 +0100)
are available in the git repository at:
git://git.samba.org/ddiss/samba.git copy_chunk_no_btrfs_v3
for you to fetch changes up to fa7d7e5ac17c3e23fe732d39b1b5e43fade1662e:
smb2_ioctl: copychunk request max output validation (2013-01-15 17:20:07 +0100)
----------------------------------------------------------------
David Disseldorp (17):
smb2_ioctl: split ioctl handlers into separate funtions
smb2_ioctl: split ioctl handler code on device type
smb2_ioctl: add FSCTL_SRV_REQUEST_RESUME_KEY support
s3-vfs: add copy_chunk vfs hooks
smb2_ioctl: add support for FSCTL_SRV_COPYCHUNK
smb2_ioctl: remove ioctl error response assumptions
selftest: enable samba3.smb2.ioctl tests against s3fs
torture: skip FSCTL_SRV_ENUM_SNAPS test when not supported
smbd: split out file_fsp_get from file_fsp_smb2
smb2_ioctl: perform locking around copychunk requests
torture: add locking tests for copychunk
torture: replace ioctl failure returns with helper calls
smb2_ioctl: only pass through to VFS on a valid fsp
torture: copychunk test suite improvements
smb2_ioctl: copychunk CHECK_READ and CHECK_WRITE
smb2_ioctl: track copychunk response output state
smb2_ioctl: copychunk request max output validation
docs-xml/manpages/vfs_full_audit.8.xml | 2 +
examples/VFS/skel_opaque.c | 42 ++++++
examples/VFS/skel_transparent.c | 75 ++++++++++
libcli/smb/smb_constants.h | 2 +
selftest/knownfail | 9 +-
selftest/skip | 1 -
source3/Makefile.in | 5 +
source3/include/vfs.h | 25 +++-
source3/include/vfs_macros.h | 10 ++
source3/modules/vfs_default.c | 111 ++++++++++++++
source3/modules/vfs_full_audit.c | 38 +++++
source3/modules/vfs_time_audit.c | 85 +++++++++++
source3/smbd/files.c | 34 +++--
source3/smbd/proto.h | 3 +
source3/smbd/smb2_ioctl.c | 426 ++++++++++-------------------------------------------
source3/smbd/smb2_ioctl_dfs.c | 158 ++++++++++++++++++++
source3/smbd/smb2_ioctl_filesys.c | 77 ++++++++++
source3/smbd/smb2_ioctl_named_pipe.c | 194 ++++++++++++++++++++++++
source3/smbd/smb2_ioctl_network_fs.c | 628 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
source3/smbd/smb2_ioctl_private.h | 54 +++++++
source3/smbd/vfs.c | 26 +++-
source3/wscript_build | 5 +
source4/libcli/smb2/ioctl.c | 37 ++++-
source4/torture/smb2/ioctl.c | 1057 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
24 files changed, 2698 insertions(+), 406 deletions(-)
create mode 100644 source3/smbd/smb2_ioctl_dfs.c
create mode 100644 source3/smbd/smb2_ioctl_filesys.c
create mode 100644 source3/smbd/smb2_ioctl_named_pipe.c
create mode 100644 source3/smbd/smb2_ioctl_network_fs.c
create mode 100644 source3/smbd/smb2_ioctl_private.h
More information about the samba-technical
mailing list