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
4e8fcc41
Commit
4e8fcc41
authored
May 24, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Replace __wine_make_process_system by a Wine-specific NtSetInformationProcess() class.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d7b9b306
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
31 additions
and
30 deletions
+31
-30
ntdll.spec
dlls/ntdll/ntdll.spec
+0
-1
process.c
dlls/ntdll/unix/process.c
+11
-19
service.c
dlls/sechost/service.c
+2
-3
server_protocol.h
include/wine/server_protocol.h
+2
-2
winternl.h
include/winternl.h
+4
-1
rpc.c
programs/services/rpc.c
+2
-3
process.c
server/process.c
+7
-1
protocol.def
server/protocol.def
+1
-0
request.h
server/request.h
+1
-0
trace.c
server/trace.c
+1
-0
No files found.
dlls/ntdll/ntdll.spec
View file @
4e8fcc41
...
...
@@ -1610,7 +1610,6 @@
@ cdecl -syscall -norelay wine_server_call(ptr)
@ cdecl -syscall wine_server_fd_to_handle(long long long ptr)
@ cdecl -syscall wine_server_handle_to_fd(long long ptr ptr)
@ cdecl -syscall __wine_make_process_system()
# Unix interface
@ cdecl __wine_set_unix_funcs(long ptr)
...
...
dlls/ntdll/unix/process.c
View file @
4e8fcc41
...
...
@@ -1485,6 +1485,17 @@ NTSTATUS WINAPI NtSetInformationProcess( HANDLE handle, PROCESSINFOCLASS class,
break
;
}
case
ProcessWineMakeProcessSystem
:
if
(
size
!=
sizeof
(
HANDLE
*
))
return
STATUS_INFO_LENGTH_MISMATCH
;
SERVER_START_REQ
(
make_process_system
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
if
(
!
(
ret
=
wine_server_call
(
req
)))
*
(
HANDLE
*
)
info
=
wine_server_ptr_handle
(
reply
->
event
);
}
SERVER_END_REQ
;
return
ret
;
default:
FIXME
(
"(%p,0x%08x,%p,0x%08x) stub
\n
"
,
handle
,
class
,
info
,
size
);
ret
=
STATUS_NOT_IMPLEMENTED
;
...
...
@@ -1605,22 +1616,3 @@ NTSTATUS WINAPI NtDebugContinue( HANDLE handle, CLIENT_ID *client, NTSTATUS stat
SERVER_END_REQ
;
return
ret
;
}
/***********************************************************************
* __wine_make_process_system (NTDLL.@)
*
* Mark the current process as a system process.
* Returns the event that is signaled when all non-system processes have exited.
*/
HANDLE
CDECL
__wine_make_process_system
(
void
)
{
HANDLE
ret
=
0
;
SERVER_START_REQ
(
make_process_system
)
{
if
(
!
wine_server_call
(
req
))
ret
=
wine_server_ptr_handle
(
reply
->
event
);
}
SERVER_END_REQ
;
return
ret
;
}
dlls/sechost/service.c
View file @
4e8fcc41
...
...
@@ -90,8 +90,6 @@ static unsigned int nb_services;
static
HANDLE
service_event
;
static
BOOL
stop_service
;
extern
HANDLE
CDECL
__wine_make_process_system
(
void
);
static
WCHAR
*
heap_strdupAtoW
(
const
char
*
src
)
{
WCHAR
*
dst
=
NULL
;
...
...
@@ -1845,7 +1843,8 @@ static BOOL service_run_main_thread(void)
stop_service
=
FALSE
;
/* FIXME: service_control_dispatcher should be merged into the main thread */
wait_handles
[
0
]
=
__wine_make_process_system
();
NtSetInformationProcess
(
GetCurrentProcess
(),
ProcessWineMakeProcessSystem
,
&
wait_handles
[
0
],
sizeof
(
HANDLE
*
)
);
wait_handles
[
1
]
=
CreateThread
(
NULL
,
0
,
service_control_dispatcher
,
disp
,
0
,
NULL
);
wait_handles
[
2
]
=
service_event
;
...
...
include/wine/server_protocol.h
View file @
4e8fcc41
...
...
@@ -4917,7 +4917,7 @@ struct get_kernel_object_handle_reply
struct
make_process_system_request
{
struct
request_header
__header
;
char
__pad_12
[
4
]
;
obj_handle_t
handle
;
};
struct
make_process_system_reply
{
...
...
@@ -6267,7 +6267,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 70
3
#define SERVER_PROTOCOL_VERSION 70
4
/* ### protocol_version end ### */
...
...
include/winternl.h
View file @
4e8fcc41
...
...
@@ -1455,7 +1455,10 @@ typedef enum _PROCESSINFOCLASS {
ProcessThreadStackAllocation
=
41
,
ProcessWorkingSetWatchEx
=
42
,
ProcessImageFileNameWin32
=
43
,
MaxProcessInfoClass
MaxProcessInfoClass
,
#ifdef __WINESRC__
ProcessWineMakeProcessSystem
=
1000
,
#endif
}
PROCESSINFOCLASS
,
PROCESS_INFORMATION_CLASS
;
#define MEM_EXECUTE_OPTION_DISABLE 0x01
...
...
programs/services/rpc.c
View file @
4e8fcc41
...
...
@@ -35,8 +35,6 @@
#include "services.h"
#include "svcctl.h"
extern
HANDLE
CDECL
__wine_make_process_system
(
void
);
WINE_DEFAULT_DEBUG_CHANNEL
(
service
);
static
const
GENERIC_MAPPING
g_scm_generic
=
...
...
@@ -2135,7 +2133,8 @@ DWORD RPC_Init(void)
return
err
;
}
exit_event
=
__wine_make_process_system
();
NtSetInformationProcess
(
GetCurrentProcess
(),
ProcessWineMakeProcessSystem
,
&
exit_event
,
sizeof
(
HANDLE
*
)
);
return
ERROR_SUCCESS
;
}
...
...
server/process.c
View file @
4e8fcc41
...
...
@@ -1635,7 +1635,7 @@ DECL_HANDLER(get_process_idle_event)
/* make the current process a system process */
DECL_HANDLER
(
make_process_system
)
{
struct
process
*
process
=
current
->
process
;
struct
process
*
process
;
struct
thread
*
thread
;
if
(
!
shutdown_event
)
...
...
@@ -1644,8 +1644,13 @@ DECL_HANDLER(make_process_system)
release_object
(
shutdown_event
);
}
if
(
!
(
process
=
get_process_from_handle
(
req
->
handle
,
PROCESS_SET_INFORMATION
)))
return
;
if
(
!
(
reply
->
event
=
alloc_handle
(
current
->
process
,
shutdown_event
,
SYNCHRONIZE
,
0
)))
{
release_object
(
process
);
return
;
}
if
(
!
process
->
is_system
)
{
...
...
@@ -1655,6 +1660,7 @@ DECL_HANDLER(make_process_system)
if
(
!--
user_processes
&&
!
shutdown_stage
&&
master_socket_timeout
!=
TIMEOUT_INFINITE
)
shutdown_timeout
=
add_timeout_user
(
master_socket_timeout
,
server_shutdown_timeout
,
NULL
);
}
release_object
(
process
);
}
/* create a new job object */
...
...
server/protocol.def
View file @
4e8fcc41
...
...
@@ -3430,6 +3430,7 @@ struct handle_info
/* Make the current process a system process */
@REQ(make_process_system)
obj_handle_t handle; /* handle to the process */
@REPLY
obj_handle_t event; /* event signaled when all user processes have exited */
@END
...
...
server/request.h
View file @
4e8fcc41
...
...
@@ -2091,6 +2091,7 @@ C_ASSERT( FIELD_OFFSET(struct get_kernel_object_handle_request, access) == 24 );
C_ASSERT
(
sizeof
(
struct
get_kernel_object_handle_request
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_kernel_object_handle_reply
,
handle
)
==
8
);
C_ASSERT
(
sizeof
(
struct
get_kernel_object_handle_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
make_process_system_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
make_process_system_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
make_process_system_reply
,
event
)
==
8
);
C_ASSERT
(
sizeof
(
struct
make_process_system_reply
)
==
16
);
...
...
server/trace.c
View file @
4e8fcc41
...
...
@@ -4181,6 +4181,7 @@ static void dump_get_kernel_object_handle_reply( const struct get_kernel_object_
static
void
dump_make_process_system_request
(
const
struct
make_process_system_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
}
static
void
dump_make_process_system_reply
(
const
struct
make_process_system_reply
*
req
)
...
...
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