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
d457a986
Commit
d457a986
authored
Feb 04, 2021
by
Erich E. Hoover
Committed by
Alexandre Julliard
Feb 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr.sys: Have mountmgr_ioctl return the same status as the IoStatus.
Signed-off-by:
Erich E. Hoover
<
erich.e.hoover@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b13f2e11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
43 deletions
+46
-43
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+46
-43
No files found.
dlls/mountmgr.sys/mountmgr.c
View file @
d457a986
...
...
@@ -973,6 +973,7 @@ static NTSTATUS enumerate_credentials( void *buff, SIZE_T insize, SIZE_T outsize
static
NTSTATUS
WINAPI
mountmgr_ioctl
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
NTSTATUS
status
;
TRACE
(
"ioctl %x insize %u outsize %u
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
,
...
...
@@ -984,109 +985,111 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
case
IOCTL_MOUNTMGR_QUERY_POINTS
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
MOUNTMGR_MOUNT_POINT
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
S
tatus
=
query_mount_points
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
s
tatus
=
query_mount_points
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
case
IOCTL_MOUNTMGR_DEFINE_UNIX_DRIVE
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_unix_drive
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
Information
=
0
;
irp
->
IoStatus
.
u
.
S
tatus
=
define_unix_drive
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
);
s
tatus
=
define_unix_drive
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
);
break
;
case
IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_unix_drive
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
S
tatus
=
query_unix_drive
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
s
tatus
=
query_unix_drive
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
case
IOCTL_MOUNTMGR_QUERY_DHCP_REQUEST_PARAMS
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_dhcp_request_params
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
S
tatus
=
query_dhcp_request_params
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
s
tatus
=
query_dhcp_request_params
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
#ifdef __APPLE__
case
IOCTL_MOUNTMGR_QUERY_SYMBOL_FILE
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
!=
sizeof
(
GUID
)
||
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
<
sizeof
(
MOUNTMGR_TARGET_NAME
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
if
(
TrySubmitThreadpoolCallback
(
query_symbol_file
,
irp
,
NULL
))
return
STATUS_PENDING
;
irp
->
IoStatus
.
u
.
Status
=
STATUS_NO_MEMORY
;
if
(
TrySubmitThreadpoolCallback
(
query_symbol_file
,
irp
,
NULL
))
return
(
irp
->
IoStatus
.
u
.
Status
=
STATUS_PENDING
);
status
=
STATUS_NO_MEMORY
;
break
;
case
IOCTL_MOUNTMGR_READ_CREDENTIAL
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
S
tatus
=
read_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
s
tatus
=
read_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
case
IOCTL_MOUNTMGR_WRITE_CREDENTIAL
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
S
tatus
=
write_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
s
tatus
=
write_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
case
IOCTL_MOUNTMGR_DELETE_CREDENTIAL
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
S
tatus
=
delete_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
s
tatus
=
delete_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
case
IOCTL_MOUNTMGR_ENUMERATE_CREDENTIALS
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential_list
))
{
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_INVALID_PARAMETER
;
s
tatus
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
S
tatus
=
enumerate_credentials
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
s
tatus
=
enumerate_credentials
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
#endif
default:
FIXME
(
"ioctl %x not supported
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
irp
->
IoStatus
.
u
.
S
tatus
=
STATUS_NOT_SUPPORTED
;
s
tatus
=
STATUS_NOT_SUPPORTED
;
break
;
}
irp
->
IoStatus
.
u
.
Status
=
status
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
return
STATUS_SUCCESS
;
return
status
;
}
/* main entry point for the mount point manager driver */
...
...
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