mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[MOUNTMGR_APITEST] Add custom DesiredAccess to GetMountMgrHandle()
This will allow any future tests, employing IOCTL_MOUNTMGR_* that require read or write accesses, to also use this helper.
This commit is contained in:
parent
8d91d4c8e1
commit
cf2cbe6ff6
4 changed files with 7 additions and 5 deletions
|
@ -571,7 +571,7 @@ START_TEST(QueryDosVolumePaths)
|
|||
HANDLE hFindVolume;
|
||||
WCHAR szVolumeName[MAX_PATH];
|
||||
|
||||
MountMgrHandle = GetMountMgrHandle();
|
||||
MountMgrHandle = GetMountMgrHandle(FILE_READ_ATTRIBUTES);
|
||||
if (!MountMgrHandle)
|
||||
{
|
||||
win_skip("MountMgr unavailable: %lu\n", GetLastError());
|
||||
|
|
|
@ -36,7 +36,7 @@ START_TEST(QueryPoints)
|
|||
MOUNTMGR_MOUNT_POINTS MountPoints;
|
||||
PMOUNTMGR_MOUNT_POINTS AllocatedPoints;
|
||||
|
||||
MountMgrHandle = GetMountMgrHandle();
|
||||
MountMgrHandle = GetMountMgrHandle(FILE_READ_ATTRIBUTES);
|
||||
if (!MountMgrHandle)
|
||||
{
|
||||
win_skip("MountMgr unavailable: %lu\n", GetLastError());
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
LPCSTR wine_dbgstr_us(const UNICODE_STRING *us);
|
||||
|
||||
HANDLE
|
||||
GetMountMgrHandle(VOID);
|
||||
GetMountMgrHandle(
|
||||
_In_ ACCESS_MASK DesiredAccess);
|
||||
|
||||
VOID
|
||||
DumpBuffer(
|
||||
|
|
|
@ -19,7 +19,8 @@ LPCSTR wine_dbgstr_us(const UNICODE_STRING *us)
|
|||
* The handle should be closed with NtClose() once it is no longer in use.
|
||||
**/
|
||||
HANDLE
|
||||
GetMountMgrHandle(VOID)
|
||||
GetMountMgrHandle(
|
||||
_In_ ACCESS_MASK DesiredAccess)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING MountMgrDevice;
|
||||
|
@ -34,7 +35,7 @@ GetMountMgrHandle(VOID)
|
|||
NULL,
|
||||
NULL);
|
||||
Status = NtOpenFile(&MountMgrHandle,
|
||||
FILE_READ_ATTRIBUTES | SYNCHRONIZE,
|
||||
DesiredAccess | SYNCHRONIZE,
|
||||
&ObjectAttributes,
|
||||
&IoStatusBlock,
|
||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
|
|
Loading…
Reference in a new issue