From af610a6f263994e7a0ded8acf0fa9237d5b7d366 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Tue, 24 Nov 2009 16:48:16 -0800 Subject: [PATCH] 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. --- source3/smbd/trans2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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*/ -- 2.11.4.GIT