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
9e255ba4
Commit
9e255ba4
authored
Feb 09, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Pass the NT name in the set_fd_name_info request.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
76b32843
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
5 deletions
+22
-5
file.c
dlls/ntdll/unix/file.c
+4
-0
server_protocol.h
include/wine/server_protocol.h
+3
-2
fd.c
server/fd.c
+8
-1
protocol.def
server/protocol.def
+2
-0
request.h
server/request.h
+3
-2
trace.c
server/trace.c
+2
-0
No files found.
dlls/ntdll/unix/file.c
View file @
9e255ba4
...
...
@@ -4387,8 +4387,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
rootdir
=
wine_server_obj_handle
(
attr
.
RootDirectory
);
req
->
namelen
=
nt_name
.
Length
;
req
->
link
=
FALSE
;
req
->
replace
=
info
->
ReplaceIfExists
;
wine_server_add_data
(
req
,
nt_name
.
Buffer
,
nt_name
.
Length
);
wine_server_add_data
(
req
,
unix_name
,
strlen
(
unix_name
)
);
io
->
u
.
Status
=
wine_server_call
(
req
);
}
...
...
@@ -4425,8 +4427,10 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io,
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
rootdir
=
wine_server_obj_handle
(
attr
.
RootDirectory
);
req
->
namelen
=
nt_name
.
Length
;
req
->
link
=
TRUE
;
req
->
replace
=
info
->
ReplaceIfExists
;
wine_server_add_data
(
req
,
nt_name
.
Buffer
,
nt_name
.
Length
);
wine_server_add_data
(
req
,
unix_name
,
strlen
(
unix_name
)
);
io
->
u
.
Status
=
wine_server_call
(
req
);
}
...
...
include/wine/server_protocol.h
View file @
9e255ba4
...
...
@@ -5130,10 +5130,11 @@ struct set_fd_name_info_request
struct
request_header
__header
;
obj_handle_t
handle
;
obj_handle_t
rootdir
;
data_size_t
namelen
;
int
link
;
int
replace
;
/* VARARG(name,unicode_str,namelen); */
/* VARARG(filename,string); */
char
__pad_28
[
4
];
};
struct
set_fd_name_info_reply
{
...
...
@@ -6279,7 +6280,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 67
0
#define SERVER_PROTOCOL_VERSION 67
1
/* ### protocol_version end ### */
...
...
server/fd.c
View file @
9e255ba4
...
...
@@ -2825,6 +2825,12 @@ DECL_HANDLER(set_fd_name_info)
{
struct
fd
*
fd
,
*
root_fd
=
NULL
;
if
(
req
->
namelen
>
get_req_data_size
())
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
;
}
if
(
req
->
rootdir
)
{
struct
dir
*
root
;
...
...
@@ -2837,7 +2843,8 @@ DECL_HANDLER(set_fd_name_info)
if
((
fd
=
get_handle_fd_obj
(
current
->
process
,
req
->
handle
,
0
)))
{
set_fd_name
(
fd
,
root_fd
,
get_req_data
(),
get_req_data_size
(),
req
->
link
,
req
->
replace
);
set_fd_name
(
fd
,
root_fd
,
(
const
char
*
)
get_req_data
()
+
req
->
namelen
,
get_req_data_size
()
-
req
->
namelen
,
req
->
link
,
req
->
replace
);
release_object
(
fd
);
}
if
(
root_fd
)
release_object
(
root_fd
);
...
...
server/protocol.def
View file @
9e255ba4
...
...
@@ -3542,8 +3542,10 @@ struct handle_info
@REQ(set_fd_name_info)
obj_handle_t handle; /* handle to a file or directory */
obj_handle_t rootdir; /* root directory */
data_size_t namelen; /* length of NT name in bytes */
int link; /* link instead of renaming */
int replace; /* replace an existing file? */
VARARG(name,unicode_str,namelen); /* NT name */
VARARG(filename,string); /* new file name */
@END
...
...
server/request.h
View file @
9e255ba4
...
...
@@ -2173,8 +2173,9 @@ C_ASSERT( FIELD_OFFSET(struct set_fd_disp_info_request, unlink) == 16 );
C_ASSERT
(
sizeof
(
struct
set_fd_disp_info_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_fd_name_info_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_fd_name_info_request
,
rootdir
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_fd_name_info_request
,
link
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_fd_name_info_request
,
replace
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_fd_name_info_request
,
namelen
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_fd_name_info_request
,
link
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_fd_name_info_request
,
replace
)
==
28
);
C_ASSERT
(
sizeof
(
struct
set_fd_name_info_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_window_layered_info_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_window_layered_info_request
)
==
16
);
...
...
server/trace.c
View file @
9e255ba4
...
...
@@ -4292,8 +4292,10 @@ static void dump_set_fd_name_info_request( const struct set_fd_name_info_request
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
fprintf
(
stderr
,
", rootdir=%04x"
,
req
->
rootdir
);
fprintf
(
stderr
,
", namelen=%u"
,
req
->
namelen
);
fprintf
(
stderr
,
", link=%d"
,
req
->
link
);
fprintf
(
stderr
,
", replace=%d"
,
req
->
replace
);
dump_varargs_unicode_str
(
", name="
,
min
(
cur_size
,
req
->
namelen
)
);
dump_varargs_string
(
", filename="
,
cur_size
);
}
...
...
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