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
e54f6d8f
Commit
e54f6d8f
authored
Nov 29, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr: Move the macOS credentials support to the Unix library.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
07c9dd9b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
44 deletions
+62
-44
cred.c
dlls/mountmgr.sys/cred.c
+0
-0
device.c
dlls/mountmgr.sys/device.c
+1
-1
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+38
-36
mountmgr.h
dlls/mountmgr.sys/mountmgr.h
+0
-2
unixlib.c
dlls/mountmgr.sys/unixlib.c
+5
-0
unixlib.h
dlls/mountmgr.sys/unixlib.h
+18
-5
No files found.
dlls/mountmgr.sys/cred.c
View file @
e54f6d8f
This diff is collapsed.
Click to expand it.
dlls/mountmgr.sys/device.c
View file @
e54f6d8f
...
...
@@ -139,7 +139,7 @@ static char *strdupA( const char *str )
return
ret
;
}
WCHAR
*
strdupW
(
const
WCHAR
*
str
)
static
WCHAR
*
strdupW
(
const
WCHAR
*
str
)
{
WCHAR
*
ret
;
...
...
dlls/mountmgr.sys/mountmgr.c
View file @
e54f6d8f
...
...
@@ -433,10 +433,12 @@ static void WINAPI query_symbol_file_callback( TP_CALLBACK_INSTANCE *instance, v
IRP
*
irp
=
context
;
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
ULONG
info
=
0
;
NTSTATUS
status
=
query_symbol_file
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
);
struct
ioctl_params
params
=
{
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
};
NTSTATUS
status
=
MOUNTMGR_CALL
(
query_symbol_file
,
&
params
);
irp
->
IoStatus
.
Information
=
info
;
irp
->
IoStatus
.
u
.
Status
=
status
;
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
...
...
@@ -550,52 +552,52 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
status
=
STATUS_NO_MEMORY
;
break
;
case
IOCTL_MOUNTMGR_READ_CREDENTIAL
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential
))
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
>=
sizeof
(
struct
mountmgr_credential
))
{
status
=
STATUS_INVALID_PARAMETER
;
break
;
struct
ioctl_params
params
=
{
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
};
status
=
MOUNTMGR_CALL
(
read_credential
,
&
params
);
irp
->
IoStatus
.
Information
=
info
;
}
status
=
read_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
);
irp
->
IoStatus
.
Information
=
info
;
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_MOUNTMGR_WRITE_CREDENTIAL
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential
))
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
>=
sizeof
(
struct
mountmgr_credential
))
{
status
=
STATUS_INVALID_PARAMETER
;
break
;
struct
ioctl_params
params
=
{
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
};
status
=
MOUNTMGR_CALL
(
write_credential
,
&
params
);
irp
->
IoStatus
.
Information
=
info
;
}
status
=
write_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
);
irp
->
IoStatus
.
Information
=
info
;
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_MOUNTMGR_DELETE_CREDENTIAL
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential
))
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
>=
sizeof
(
struct
mountmgr_credential
))
{
status
=
STATUS_INVALID_PARAMETER
;
break
;
struct
ioctl_params
params
=
{
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
};
status
=
MOUNTMGR_CALL
(
delete_credential
,
&
params
);
irp
->
IoStatus
.
Information
=
info
;
}
status
=
delete_credential
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
);
irp
->
IoStatus
.
Information
=
info
;
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
case
IOCTL_MOUNTMGR_ENUMERATE_CREDENTIALS
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential_list
))
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
>=
sizeof
(
struct
mountmgr_credential
))
{
status
=
STATUS_INVALID_PARAMETER
;
break
;
struct
ioctl_params
params
=
{
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
};
status
=
MOUNTMGR_CALL
(
enumerate_credentials
,
&
params
);
irp
->
IoStatus
.
Information
=
info
;
}
status
=
enumerate_credentials
(
irp
->
AssociatedIrp
.
SystemBuffer
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
info
);
irp
->
IoStatus
.
Information
=
info
;
else
status
=
STATUS_INVALID_PARAMETER
;
break
;
default:
FIXME
(
"ioctl %x not supported
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
...
...
dlls/mountmgr.sys/mountmgr.h
View file @
e54f6d8f
...
...
@@ -36,8 +36,6 @@
#define WINE_MOUNTMGR_EXTENSIONS
#include "ddk/mountmgr.h"
extern
WCHAR
*
strdupW
(
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
/* device functions */
enum
device_type
...
...
dlls/mountmgr.sys/unixlib.c
View file @
e54f6d8f
...
...
@@ -439,4 +439,9 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
set_shell_folder
,
get_shell_folder
,
dhcp_request
,
query_symbol_file
,
read_credential
,
write_credential
,
delete_credential
,
enumerate_credentials
,
};
dlls/mountmgr.sys/unixlib.h
View file @
e54f6d8f
...
...
@@ -127,6 +127,14 @@ struct dhcp_request_params
ULONG
*
ret_size
;
};
struct
ioctl_params
{
void
*
buff
;
ULONG
insize
;
ULONG
outsize
;
ULONG
*
info
;
};
enum
mountmgr_funcs
{
unix_run_loop
,
...
...
@@ -142,6 +150,11 @@ enum mountmgr_funcs
unix_set_shell_folder
,
unix_get_shell_folder
,
unix_dhcp_request
,
unix_query_symbol_file
,
unix_read_credential
,
unix_write_credential
,
unix_delete_credential
,
unix_enumerate_credentials
,
};
extern
unixlib_handle_t
mountmgr_handle
;
...
...
@@ -155,8 +168,8 @@ extern void run_dbus_loop(void) DECLSPEC_HIDDEN;
extern
void
run_diskarbitration_loop
(
void
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
dhcp_request
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
query_symbol_file
(
void
*
buff
,
ULONG
insize
,
ULONG
outsize
,
ULONG
*
info
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
read_credential
(
void
*
buff
,
ULONG
insize
,
ULONG
outsize
,
ULONG
*
info
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
write_credential
(
void
*
buff
,
ULONG
insize
,
ULONG
outsize
,
ULONG
*
info
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
delete_credential
(
void
*
buff
,
ULONG
insize
,
ULONG
outsize
,
ULONG
*
info
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
enumerate_credentials
(
void
*
buff
,
ULONG
insize
,
ULONG
outsize
,
ULONG
*
info
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
query_symbol_file
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
read_credential
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
write_credential
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
delete_credential
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
enumerate_credentials
(
void
*
args
)
DECLSPEC_HIDDEN
;
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