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
393e953b
Commit
393e953b
authored
Jun 29, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Jun 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsiproxy: Create the nsi device.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f4a0b90f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
0 deletions
+110
-0
configure
configure
+2
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/nsiproxy.sys/Makefile.in
+6
-0
device.c
dlls/nsiproxy.sys/device.c
+87
-0
nsiproxy.sys.spec
dlls/nsiproxy.sys/nsiproxy.sys.spec
+1
-0
wine.inf.in
loader/wine.inf.in
+13
-0
No files found.
configure
View file @
393e953b
...
...
@@ -1526,6 +1526,7 @@ enable_normaliz
enable_npmshtml
enable_npptools
enable_nsi
enable_nsiproxy_sys
enable_ntdll
enable_ntdsapi
enable_ntoskrnl_exe
...
...
@@ -20822,6 +20823,7 @@ wine_fn_config_makefile dlls/npmshtml enable_npmshtml
wine_fn_config_makefile dlls/npptools enable_npptools
wine_fn_config_makefile dlls/nsi enable_nsi
wine_fn_config_makefile dlls/nsi/tests enable_tests
wine_fn_config_makefile dlls/nsiproxy.sys enable_nsiproxy_sys
wine_fn_config_makefile dlls/ntdll enable_ntdll
wine_fn_config_makefile dlls/ntdll/tests enable_tests
wine_fn_config_makefile dlls/ntdsapi enable_ntdsapi
...
...
configure.ac
View file @
393e953b
...
...
@@ -3498,6 +3498,7 @@ WINE_CONFIG_MAKEFILE(dlls/npmshtml)
WINE_CONFIG_MAKEFILE(dlls/npptools)
WINE_CONFIG_MAKEFILE(dlls/nsi)
WINE_CONFIG_MAKEFILE(dlls/nsi/tests)
WINE_CONFIG_MAKEFILE(dlls/nsiproxy.sys)
WINE_CONFIG_MAKEFILE(dlls/ntdll)
WINE_CONFIG_MAKEFILE(dlls/ntdll/tests)
WINE_CONFIG_MAKEFILE(dlls/ntdsapi)
...
...
dlls/nsiproxy.sys/Makefile.in
0 → 100644
View file @
393e953b
MODULE
=
nsiproxy.sys
IMPORTS
=
ntoskrnl
EXTRADLLFLAGS
=
-Wl
,--subsystem,native
C_SRCS
=
\
device.c
dlls/nsiproxy.sys/device.c
0 → 100644
View file @
393e953b
/*
* nsiproxy.sys
*
* Copyright 2021 Huw Davies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#define NONAMELESSUNION
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winioctl.h"
#include "ddk/wdm.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
nsi
);
static
NTSTATUS
WINAPI
nsi_ioctl
(
DEVICE_OBJECT
*
device
,
IRP
*
irp
)
{
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
TRACE
(
"ioctl %x insize %u outsize %u
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
,
irpsp
->
Parameters
.
DeviceIoControl
.
InputBufferLength
,
irpsp
->
Parameters
.
DeviceIoControl
.
OutputBufferLength
);
switch
(
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
)
{
default:
FIXME
(
"ioctl %x not supported
\n
"
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
irp
->
IoStatus
.
u
.
Status
=
STATUS_NOT_SUPPORTED
;
break
;
}
IoCompleteRequest
(
irp
,
IO_NO_INCREMENT
);
return
STATUS_SUCCESS
;
}
static
int
add_device
(
DRIVER_OBJECT
*
driver
)
{
static
const
WCHAR
name_str
[]
=
{
'\\'
,
'D'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'\\'
,
'N'
,
's'
,
'i'
,
0
};
static
const
WCHAR
link_str
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'N'
,
's'
,
'i'
,
0
};
UNICODE_STRING
name
,
link
;
DEVICE_OBJECT
*
device
;
NTSTATUS
status
;
RtlInitUnicodeString
(
&
name
,
name_str
);
RtlInitUnicodeString
(
&
link
,
link_str
);
if
(
!
(
status
=
IoCreateDevice
(
driver
,
0
,
&
name
,
FILE_DEVICE_NETWORK
,
FILE_DEVICE_SECURE_OPEN
,
FALSE
,
&
device
)))
status
=
IoCreateSymbolicLink
(
&
link
,
&
name
);
if
(
status
)
{
FIXME
(
"failed to create device error %x
\n
"
,
status
);
return
0
;
}
return
1
;
}
NTSTATUS
WINAPI
DriverEntry
(
DRIVER_OBJECT
*
driver
,
UNICODE_STRING
*
path
)
{
TRACE
(
"(%p, %s)
\n
"
,
driver
,
debugstr_w
(
path
->
Buffer
)
);
driver
->
MajorFunction
[
IRP_MJ_DEVICE_CONTROL
]
=
nsi_ioctl
;
add_device
(
driver
);
return
STATUS_SUCCESS
;
}
dlls/nsiproxy.sys/nsiproxy.sys.spec
0 → 100644
View file @
393e953b
# no exported functions
loader/wine.inf.in
View file @
393e953b
...
...
@@ -165,6 +165,7 @@ AddService=Schedule,0,TaskSchedulerService
AddService=Winmgmt,0,WinmgmtService
AddService=wuauserv,0,wuauService
AddService=NDIS,0x800,NDISService
AddService=nsiproxy,0x800,NsiProxyService
[DefaultInstall.NT.Services]
AddService=BITS,0,BITSService
...
...
@@ -184,6 +185,7 @@ AddService=Schedule,0,TaskSchedulerService
AddService=Winmgmt,0,WinmgmtService
AddService=wuauserv,0,wuauService
AddService=NDIS,0x800,NDISService
AddService=nsiproxy,0x800,NsiProxyService
[DefaultInstall.ntamd64.Services]
AddService=BITS,0,BITSService
...
...
@@ -203,6 +205,7 @@ AddService=Schedule,0,TaskSchedulerService
AddService=Winmgmt,0,WinmgmtService
AddService=wuauserv,0,wuauService
AddService=NDIS,0x800,NDISService
AddService=nsiproxy,0x800,NsiProxyService
[DefaultInstall.ntarm64.Services]
AddService=BITS,0,BITSService
...
...
@@ -222,6 +225,7 @@ AddService=Schedule,0,TaskSchedulerService
AddService=Winmgmt,0,WinmgmtService
AddService=wuauserv,0,wuauService
AddService=NDIS,0x800,NDISService
AddService=nsiproxy,0x800,NsiProxyService
[Strings]
MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions"
...
...
@@ -3779,6 +3783,15 @@ StartType=2
ErrorControl=1
LoadOrderGroup="System Bus Extender"
[NsiProxyService]
Description="NSI proxy service"
DisplayName="NSI Proxy"
ServiceBinary="%12%\nsiproxy.sys"
ServiceType=1
StartType=2
ErrorControl=1
LoadOrderGroup="System Bus Extender"
[RpcSsService]
Description="RPC service"
DisplayName="Remote Procedure Call (RPC)"
...
...
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