From: Tim Prouty Date: Wed, 25 Nov 2009 00:48:16 +0000 (-0800) Subject: s3 setfileinfo: Open with FILE_WRITE_DATA when setting the file size X-Git-Tag: samba-4.0.0alpha9~182 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af610a6f263994e7a0ded8acf0fa9237d5b7d366;p=thirdparty%2Fsamba.git 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. --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 17ebd81313c..2892e26c772 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*/