s3/smbd: fix FSCTL_SET_SPARSE permission checks
authorDavid Disseldorp <ddiss@samba.org>
Mon, 23 Feb 2015 19:27:37 +0000 (20:27 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 9 Mar 2015 20:27:08 +0000 (21:27 +0100)
commitb0e5a4ebde8af4dad9fda0f73df23d55ee6d858a
tree542114554a876bec69ff24b63f17648d3327e57c
parent55d8ac528097013ee3c072406952e0394ce6ff34
s3/smbd: fix FSCTL_SET_SPARSE permission checks

On Windows servers (tested against Windows Server 2008 & 2012) the
FSCTL_SET_SPARSE ioctl is processed if FILE_WRITE_DATA,
FILE_WRITE_ATTRIBUTES _or_ SEC_FILE_APPEND_DATA permissions are granted
on the open file-handle.
Fix Samba such that it matches this behaviour, rather than only checking
for FILE_WRITE_DATA or FILE_WRITE_ATTRIBUTES.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dosmode.c