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
26daece7
Commit
26daece7
authored
Sep 03, 2020
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mountmgr: Add ioctl to delete host credentials on macOS.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
98a3986c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
mountmgr.c
dlls/mountmgr.sys/mountmgr.c
+28
-0
mountmgr.h
include/ddk/mountmgr.h
+1
-0
No files found.
dlls/mountmgr.sys/mountmgr.c
View file @
26daece7
...
...
@@ -819,6 +819,23 @@ error:
RtlFreeHeap
(
GetProcessHeap
(),
0
,
password
);
return
ret
;
}
static
NTSTATUS
delete_credential
(
void
*
buff
,
SIZE_T
insize
,
SIZE_T
outsize
,
IO_STATUS_BLOCK
*
iosb
)
{
const
struct
mountmgr_credential
*
cred
=
buff
;
const
WCHAR
*
targetname
;
SecKeychainItemRef
item
;
if
(
!
check_credential_string
(
buff
,
insize
,
cred
->
targetname_size
,
cred
->
targetname_offset
))
return
STATUS_INVALID_PARAMETER
;
targetname
=
(
const
WCHAR
*
)((
const
char
*
)
cred
+
cred
->
targetname_offset
);
if
(
!
(
item
=
find_credential
(
targetname
)))
return
STATUS_NOT_FOUND
;
SecKeychainItemDelete
(
item
);
CFRelease
(
item
);
return
STATUS_SUCCESS
;
}
#endif
/* __APPLE__ */
/* handler for ioctls on the mount manager device */
...
...
@@ -909,6 +926,17 @@ static NTSTATUS WINAPI mountmgr_ioctl( DEVICE_OBJECT *device, IRP *irp )
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
,
&
irp
->
IoStatus
);
break
;
case
IOCTL_MOUNTMGR_DELETE_CREDENTIAL
:
if
(
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
<
sizeof
(
struct
mountmgr_credential
))
{
irp
->
IoStatus
.
u
.
Status
=
STATUS_INVALID_PARAMETER
;
break
;
}
irp
->
IoStatus
.
u
.
Status
=
delete_credential
(
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
);
...
...
include/ddk/mountmgr.h
View file @
26daece7
...
...
@@ -76,6 +76,7 @@ struct mountmgr_unix_drive
#define IOCTL_MOUNTMGR_READ_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 48, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_MOUNTMGR_WRITE_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 49, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define IOCTL_MOUNTMGR_DELETE_CREDENTIAL CTL_CODE(MOUNTMGRCONTROLTYPE, 50, METHOD_BUFFERED, FILE_WRITE_ACCESS)
struct
mountmgr_credential
{
...
...
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