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
2c733057
Commit
2c733057
authored
Mar 07, 2017
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement FileAccessInformation class in NtQueryInformationFile.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b53957df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
file.c
dlls/ntdll/file.c
+13
-0
file.c
dlls/ntdll/tests/file.c
+24
-0
No files found.
dlls/ntdll/file.c
View file @
2c733057
...
...
@@ -2446,6 +2446,19 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
info
->
EaSize
=
0
;
}
break
;
case
FileAccessInformation
:
{
FILE_ACCESS_INFORMATION
*
info
=
ptr
;
SERVER_START_REQ
(
get_object_info
)
{
req
->
handle
=
wine_server_obj_handle
(
hFile
);
io
->
u
.
Status
=
wine_server_call
(
req
);
if
(
io
->
u
.
Status
==
STATUS_SUCCESS
)
info
->
AccessFlags
=
reply
->
access
;
}
SERVER_END_REQ
;
}
break
;
case
FileEndOfFileInformation
:
if
(
fd_get_file_info
(
fd
,
&
st
,
&
attr
)
==
-
1
)
io
->
u
.
Status
=
FILE_GetNtStatus
();
else
fill_file_info
(
&
st
,
attr
,
ptr
,
class
);
...
...
dlls/ntdll/tests/file.c
View file @
2c733057
...
...
@@ -3433,6 +3433,29 @@ static void test_file_id_information(void)
CloseHandle
(
h
);
}
static
void
test_file_access_information
(
void
)
{
FILE_ACCESS_INFORMATION
info
;
IO_STATUS_BLOCK
io
;
NTSTATUS
status
;
HANDLE
h
;
if
(
!
(
h
=
create_temp_file
(
0
)))
return
;
status
=
pNtQueryInformationFile
(
h
,
&
io
,
&
info
,
sizeof
(
info
)
-
1
,
FileAccessInformation
);
ok
(
status
==
STATUS_INFO_LENGTH_MISMATCH
,
"expected STATUS_INFO_LENGTH_MISMATCH, got %08x
\n
"
,
status
);
status
=
pNtQueryInformationFile
(
(
HANDLE
)
0xdeadbeef
,
&
io
,
&
info
,
sizeof
(
info
),
FileAccessInformation
);
ok
(
status
==
STATUS_INVALID_HANDLE
,
"expected STATUS_INVALID_HANDLE, got %08x
\n
"
,
status
);
memset
(
&
info
,
0x11
,
sizeof
(
info
));
status
=
pNtQueryInformationFile
(
h
,
&
io
,
&
info
,
sizeof
(
info
),
FileAccessInformation
);
ok
(
status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
ok
(
info
.
AccessFlags
==
0x13019f
,
"got %08x
\n
"
,
info
.
AccessFlags
);
CloseHandle
(
h
);
}
static
void
test_query_volume_information_file
(
void
)
{
NTSTATUS
status
;
...
...
@@ -4506,6 +4529,7 @@ START_TEST(file)
test_file_disposition_information
();
test_file_completion_information
();
test_file_id_information
();
test_file_access_information
();
test_query_volume_information_file
();
test_query_attribute_information_file
();
test_ioctl
();
...
...
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