deny setattr for size if not opened for write

proposes an alternate solution for attempts to set file size without an open sta
teid.  instead of acquiring one by sending OPEN, fail the request with ACCESS_DE
NIED

according the MS File System Algorithms documentation for setting FileAllocation
Information and FileEndOfFileInformation [http://msdn.microsoft.com/en-us/librar
y/ff469355%28v=PROT.10%29.aspx]:
"If Open.GrantedAccess does not contain FILE_WRITE_DATA, the operation MUST be f
ailed with STATUS_ACCESS_DENIED"

-removes open_owner_id, access_mask, access_mode from setattr upcall arguments
-moves map_access_2_allowdeny() back to open.c as a static function, since handl
e_setattr() was its only other call site
This commit is contained in:
Olga Kornievskaia 2011-06-27 12:01:24 -04:00 committed by unknown
parent 9f2587c3b3
commit 2db91a3001
6 changed files with 53 additions and 104 deletions

View file

@ -96,9 +96,6 @@ typedef struct __setattr_upcall_args {
unsigned char *buf;
uint32_t buf_len;
int set_class;
ULONG open_owner_id;
ULONG access_mask;
ULONG access_mode;
} setattr_upcall_args;
typedef struct __setexattr_upcall_args {