Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
07f8b0c8
Commit
07f8b0c8
authored
Jul 08, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid calling NtCreateFile() from the Unix side.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
76f94957
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
file.c
dlls/ntdll/unix/file.c
+13
-5
registry.c
dlls/ntdll/unix/registry.c
+12
-3
No files found.
dlls/ntdll/unix/file.c
View file @
07f8b0c8
...
...
@@ -3919,12 +3919,20 @@ NTSTATUS WINAPI NtDeleteFile( OBJECT_ATTRIBUTES *attr )
{
HANDLE
handle
;
NTSTATUS
status
;
IO_STATUS_BLOCK
io
;
char
*
unix_name
;
UNICODE_STRING
nt_name
;
OBJECT_ATTRIBUTES
new_attr
=
*
attr
;
status
=
NtCreateFile
(
&
handle
,
GENERIC_READ
|
GENERIC_WRITE
|
DELETE
,
attr
,
&
io
,
NULL
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
|
FILE_SHARE_DELETE
,
FILE_OPEN
,
FILE_DELETE_ON_CLOSE
,
NULL
,
0
);
if
(
status
==
STATUS_SUCCESS
)
NtClose
(
handle
);
get_redirect
(
&
new_attr
,
&
nt_name
);
if
(
!
(
status
=
nt_to_unix_file_name
(
&
new_attr
,
&
unix_name
,
FILE_OPEN
)))
{
if
(
!
(
status
=
open_unix_file
(
&
handle
,
unix_name
,
GENERIC_READ
|
GENERIC_WRITE
|
DELETE
,
&
new_attr
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
|
FILE_SHARE_DELETE
,
FILE_OPEN
,
FILE_DELETE_ON_CLOSE
,
NULL
,
0
)))
NtClose
(
handle
);
free
(
unix_name
);
}
free
(
nt_name
.
Buffer
);
return
status
;
}
...
...
dlls/ntdll/unix/registry.c
View file @
07f8b0c8
...
...
@@ -661,14 +661,23 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil
{
NTSTATUS
ret
;
HANDLE
key
;
IO_STATUS_BLOCK
io
;
data_size_t
len
;
struct
object_attributes
*
objattr
;
char
*
unix_name
;
UNICODE_STRING
nt_name
;
OBJECT_ATTRIBUTES
new_attr
=
*
file
;
TRACE
(
"(%p,%p)
\n
"
,
attr
,
file
);
ret
=
NtCreateFile
(
&
key
,
GENERIC_READ
|
SYNCHRONIZE
,
file
,
&
io
,
NULL
,
FILE_ATTRIBUTE_NORMAL
,
0
,
FILE_OPEN
,
0
,
NULL
,
0
);
get_redirect
(
&
new_attr
,
&
nt_name
);
if
(
!
(
ret
=
nt_to_unix_file_name
(
&
new_attr
,
&
unix_name
,
FILE_OPEN
)))
{
ret
=
open_unix_file
(
&
key
,
unix_name
,
GENERIC_READ
|
SYNCHRONIZE
,
&
new_attr
,
0
,
0
,
FILE_OPEN
,
0
,
NULL
,
0
);
free
(
unix_name
);
}
free
(
nt_name
.
Buffer
);
if
(
ret
)
return
ret
;
if
((
ret
=
alloc_object_attributes
(
attr
,
&
objattr
,
&
len
)))
return
ret
;
...
...
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