summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-11-24 16:48:16 -0800
committerTim Prouty <tprouty@samba.org>2009-11-25 08:45:58 -0800
commitaf610a6f263994e7a0ded8acf0fa9237d5b7d366 (patch)
treee2697edbbeb8eb001b7b9d21c6bbc1519bae0944
parentb6f972222f271263f68cf5ead8bb0daca08158fa (diff)
downloadsamba-af610a6f263994e7a0ded8acf0fa9237d5b7d366.tar.gz
samba-af610a6f263994e7a0ded8acf0fa9237d5b7d366.tar.bz2
samba-af610a6f263994e7a0ded8acf0fa9237d5b7d366.zip
s3 setfileinfo: Open with FILE_WRITE_DATA when setting the file size
This matches what is outlined here: http://msdn.microsoft.com/en-us/library/ms804363.aspx This is also inline with how winXP/win7 handle this. See RAW-SFILEINFO-END-OF-FILE* in smbtorture4.
-rw-r--r--source3/smbd/trans2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 17ebd81313..2892e26c77 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5578,7 +5578,7 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
req, /* req */
0, /* root_dir_fid */
smb_fname_tmp, /* fname */
- FILE_WRITE_ATTRIBUTES, /* access_mask */
+ FILE_WRITE_DATA, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
FILE_SHARE_DELETE),
FILE_OPEN, /* create_disposition*/