treat OVERWRITE as open4_create unchecked4
This commit is contained in:
parent
fae194a5b6
commit
dd611ff0cd
1 changed files with 4 additions and 2 deletions
|
|
@ -310,7 +310,8 @@ static BOOLEAN open_for_attributes(uint32_t type, ULONG access_mask,
|
||||||
disposition == FILE_CREATE ||
|
disposition == FILE_CREATE ||
|
||||||
disposition == FILE_OVERWRITE_IF ||
|
disposition == FILE_OVERWRITE_IF ||
|
||||||
disposition == FILE_SUPERSEDE ||
|
disposition == FILE_SUPERSEDE ||
|
||||||
disposition == FILE_OPEN_IF)
|
disposition == FILE_OPEN_IF ||
|
||||||
|
disposition == FILE_OVERWRITE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else {
|
else {
|
||||||
dprintf(1, "Open call that wants to manage attributes\n");
|
dprintf(1, "Open call that wants to manage attributes\n");
|
||||||
|
|
@ -384,7 +385,8 @@ static void map_access_2_allowdeny(ULONG access_mask, ULONG access_mode,
|
||||||
* and share deny 0 (ie deny_both).
|
* and share deny 0 (ie deny_both).
|
||||||
*/
|
*/
|
||||||
if ((disposition == FILE_CREATE || disposition == FILE_OPEN_IF ||
|
if ((disposition == FILE_CREATE || disposition == FILE_OPEN_IF ||
|
||||||
disposition == FILE_OVERWRITE_IF || disposition == FILE_SUPERSEDE) &&
|
disposition == FILE_OVERWRITE_IF || disposition == FILE_SUPERSEDE ||
|
||||||
|
disposition == FILE_OVERWRITE) &&
|
||||||
!(access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA |
|
!(access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA |
|
||||||
FILE_WRITE_ATTRIBUTES | FILE_READ_DATA | FILE_EXECUTE)))
|
FILE_WRITE_ATTRIBUTES | FILE_READ_DATA | FILE_EXECUTE)))
|
||||||
*allow = OPEN4_SHARE_ACCESS_READ | OPEN4_SHARE_ACCESS_WANT_NO_DELEG;
|
*allow = OPEN4_SHARE_ACCESS_READ | OPEN4_SHARE_ACCESS_WANT_NO_DELEG;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue