Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
71581f71
Commit
71581f71
authored
Nov 11, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: DeleteFile should open the file without read/write permissions.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4857f958
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
4 deletions
+1
-4
file.c
dlls/kernel32/file.c
+1
-2
file.c
dlls/kernel32/tests/file.c
+0
-2
No files found.
dlls/kernel32/file.c
View file @
71581f71
...
@@ -1683,8 +1683,7 @@ BOOL WINAPI DeleteFileW( LPCWSTR path )
...
@@ -1683,8 +1683,7 @@ BOOL WINAPI DeleteFileW( LPCWSTR path )
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
status
=
NtCreateFile
(
&
hFile
,
GENERIC_READ
|
GENERIC_WRITE
|
SYNCHRONIZE
|
DELETE
,
status
=
NtCreateFile
(
&
hFile
,
SYNCHRONIZE
|
DELETE
,
&
attr
,
&
io
,
NULL
,
0
,
&
attr
,
&
io
,
NULL
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
|
FILE_SHARE_DELETE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
|
FILE_SHARE_DELETE
,
FILE_OPEN
,
FILE_DELETE_ON_CLOSE
|
FILE_NON_DIRECTORY_FILE
,
NULL
,
0
);
FILE_OPEN
,
FILE_DELETE_ON_CLOSE
|
FILE_NON_DIRECTORY_FILE
,
NULL
,
0
);
if
(
status
==
STATUS_SUCCESS
)
status
=
NtClose
(
hFile
);
if
(
status
==
STATUS_SUCCESS
)
status
=
NtClose
(
hFile
);
...
...
dlls/kernel32/tests/file.c
View file @
71581f71
...
@@ -1794,14 +1794,12 @@ static void test_DeleteFileA( void )
...
@@ -1794,14 +1794,12 @@ static void test_DeleteFileA( void )
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
DeleteFileA
(
temp_file
);
ret
=
DeleteFileA
(
temp_file
);
todo_wine
ok
(
ret
,
"DeleteFile error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"DeleteFile error %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
CloseHandle
(
hfile
);
ret
=
CloseHandle
(
hfile
);
ok
(
ret
,
"CloseHandle error %d
\n
"
,
GetLastError
());
ok
(
ret
,
"CloseHandle error %d
\n
"
,
GetLastError
());
ret
=
DeleteFileA
(
temp_file
);
ret
=
DeleteFileA
(
temp_file
);
todo_wine
ok
(
!
ret
,
"DeleteFile should fail
\n
"
);
ok
(
!
ret
,
"DeleteFile should fail
\n
"
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment