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
0f4bc322
Commit
0f4bc322
authored
May 20, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
May 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Pass PROC_THREAD_ATTRIBUTE_JOB_LIST to NtCreateUserProcess().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0986c8a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
process.c
dlls/kernelbase/process.c
+20
-6
No files found.
dlls/kernelbase/process.c
View file @
0f4bc322
...
@@ -249,11 +249,12 @@ static NTSTATUS create_nt_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBUT
...
@@ -249,11 +249,12 @@ static NTSTATUS create_nt_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBUT
SECURITY_ATTRIBUTES
*
tsa
,
DWORD
process_flags
,
SECURITY_ATTRIBUTES
*
tsa
,
DWORD
process_flags
,
RTL_USER_PROCESS_PARAMETERS
*
params
,
RTL_USER_PROCESS_PARAMETERS
*
params
,
RTL_USER_PROCESS_INFORMATION
*
info
,
HANDLE
parent
,
RTL_USER_PROCESS_INFORMATION
*
info
,
HANDLE
parent
,
const
struct
proc_thread_attr
*
handle_list
)
const
struct
proc_thread_attr
*
handle_list
,
const
struct
proc_thread_attr
*
job_list
)
{
{
OBJECT_ATTRIBUTES
process_attr
,
thread_attr
;
OBJECT_ATTRIBUTES
process_attr
,
thread_attr
;
PS_CREATE_INFO
create_info
;
PS_CREATE_INFO
create_info
;
ULONG_PTR
buffer
[
offsetof
(
PS_ATTRIBUTE_LIST
,
Attributes
[
7
]
)
/
sizeof
(
ULONG_PTR
)];
ULONG_PTR
buffer
[
offsetof
(
PS_ATTRIBUTE_LIST
,
Attributes
[
8
]
)
/
sizeof
(
ULONG_PTR
)];
PS_ATTRIBUTE_LIST
*
attr
=
(
PS_ATTRIBUTE_LIST
*
)
buffer
;
PS_ATTRIBUTE_LIST
*
attr
=
(
PS_ATTRIBUTE_LIST
*
)
buffer
;
UNICODE_STRING
nameW
;
UNICODE_STRING
nameW
;
NTSTATUS
status
;
NTSTATUS
status
;
...
@@ -312,6 +313,14 @@ static NTSTATUS create_nt_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBUT
...
@@ -312,6 +313,14 @@ static NTSTATUS create_nt_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBUT
attr
->
Attributes
[
pos
].
ReturnLength
=
NULL
;
attr
->
Attributes
[
pos
].
ReturnLength
=
NULL
;
pos
++
;
pos
++
;
}
}
if
(
job_list
)
{
attr
->
Attributes
[
pos
].
Attribute
=
PS_ATTRIBUTE_JOB_LIST
;
attr
->
Attributes
[
pos
].
Size
=
job_list
->
size
;
attr
->
Attributes
[
pos
].
ValuePtr
=
job_list
->
value
;
attr
->
Attributes
[
pos
].
ReturnLength
=
NULL
;
pos
++
;
}
attr
->
TotalLength
=
offsetof
(
PS_ATTRIBUTE_LIST
,
Attributes
[
pos
]
);
attr
->
TotalLength
=
offsetof
(
PS_ATTRIBUTE_LIST
,
Attributes
[
pos
]
);
InitializeObjectAttributes
(
&
process_attr
,
NULL
,
0
,
NULL
,
psa
?
psa
->
lpSecurityDescriptor
:
NULL
);
InitializeObjectAttributes
(
&
process_attr
,
NULL
,
0
,
NULL
,
psa
?
psa
->
lpSecurityDescriptor
:
NULL
);
...
@@ -353,7 +362,7 @@ static NTSTATUS create_vdm_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBU
...
@@ -353,7 +362,7 @@ static NTSTATUS create_vdm_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBU
winevdm
,
params
->
ImagePathName
.
Buffer
,
params
->
CommandLine
.
Buffer
);
winevdm
,
params
->
ImagePathName
.
Buffer
,
params
->
CommandLine
.
Buffer
);
RtlInitUnicodeString
(
&
params
->
ImagePathName
,
winevdm
);
RtlInitUnicodeString
(
&
params
->
ImagePathName
,
winevdm
);
RtlInitUnicodeString
(
&
params
->
CommandLine
,
newcmdline
);
RtlInitUnicodeString
(
&
params
->
CommandLine
,
newcmdline
);
status
=
create_nt_process
(
token
,
debug
,
psa
,
tsa
,
flags
,
params
,
info
,
NULL
,
NULL
);
status
=
create_nt_process
(
token
,
debug
,
psa
,
tsa
,
flags
,
params
,
info
,
NULL
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
newcmdline
);
HeapFree
(
GetProcessHeap
(),
0
,
newcmdline
);
return
status
;
return
status
;
}
}
...
@@ -382,7 +391,7 @@ static NTSTATUS create_cmd_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBU
...
@@ -382,7 +391,7 @@ static NTSTATUS create_cmd_process( HANDLE token, HANDLE debug, SECURITY_ATTRIBU
swprintf
(
newcmdline
,
len
,
L"%s /s/c
\"
%s
\"
"
,
comspec
,
params
->
CommandLine
.
Buffer
);
swprintf
(
newcmdline
,
len
,
L"%s /s/c
\"
%s
\"
"
,
comspec
,
params
->
CommandLine
.
Buffer
);
RtlInitUnicodeString
(
&
params
->
ImagePathName
,
comspec
);
RtlInitUnicodeString
(
&
params
->
ImagePathName
,
comspec
);
RtlInitUnicodeString
(
&
params
->
CommandLine
,
newcmdline
);
RtlInitUnicodeString
(
&
params
->
CommandLine
,
newcmdline
);
status
=
create_nt_process
(
token
,
debug
,
psa
,
tsa
,
flags
,
params
,
info
,
NULL
,
NULL
);
status
=
create_nt_process
(
token
,
debug
,
psa
,
tsa
,
flags
,
params
,
info
,
NULL
,
NULL
,
NULL
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
newcmdline
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
newcmdline
);
return
status
;
return
status
;
}
}
...
@@ -485,7 +494,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
...
@@ -485,7 +494,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
const
WCHAR
*
cur_dir
,
STARTUPINFOW
*
startup_info
,
const
WCHAR
*
cur_dir
,
STARTUPINFOW
*
startup_info
,
PROCESS_INFORMATION
*
info
,
HANDLE
*
new_token
)
PROCESS_INFORMATION
*
info
,
HANDLE
*
new_token
)
{
{
const
struct
proc_thread_attr
*
handle_list
=
NULL
;
const
struct
proc_thread_attr
*
handle_list
=
NULL
,
*
job_list
=
NULL
;
WCHAR
name
[
MAX_PATH
];
WCHAR
name
[
MAX_PATH
];
WCHAR
*
p
,
*
tidy_cmdline
=
cmd_line
;
WCHAR
*
p
,
*
tidy_cmdline
=
cmd_line
;
RTL_USER_PROCESS_PARAMETERS
*
params
=
NULL
;
RTL_USER_PROCESS_PARAMETERS
*
params
=
NULL
;
...
@@ -580,6 +589,11 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
...
@@ -580,6 +589,11 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
params
->
ConsoleHandle
=
console
->
reference
;
params
->
ConsoleHandle
=
console
->
reference
;
break
;
break
;
}
}
case
PROC_THREAD_ATTRIBUTE_JOB_LIST
:
job_list
=
&
attrs
->
attrs
[
i
];
TRACE
(
"PROC_THREAD_ATTRIBUTE_JOB_LIST handle count %Iu.
\n
"
,
attrs
->
attrs
[
i
].
size
/
sizeof
(
HANDLE
)
);
break
;
default:
default:
FIXME
(
"Unsupported attribute %#Ix.
\n
"
,
attrs
->
attrs
[
i
].
attr
);
FIXME
(
"Unsupported attribute %#Ix.
\n
"
,
attrs
->
attrs
[
i
].
attr
);
break
;
break
;
...
@@ -594,7 +608,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
...
@@ -594,7 +608,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
if
(
flags
&
CREATE_SUSPENDED
)
nt_flags
|=
PROCESS_CREATE_FLAGS_SUSPENDED
;
if
(
flags
&
CREATE_SUSPENDED
)
nt_flags
|=
PROCESS_CREATE_FLAGS_SUSPENDED
;
status
=
create_nt_process
(
token
,
debug
,
process_attr
,
thread_attr
,
status
=
create_nt_process
(
token
,
debug
,
process_attr
,
thread_attr
,
nt_flags
,
params
,
&
rtl_info
,
parent
,
handle_list
);
nt_flags
,
params
,
&
rtl_info
,
parent
,
handle_list
,
job_list
);
switch
(
status
)
switch
(
status
)
{
{
case
STATUS_SUCCESS
:
case
STATUS_SUCCESS
:
...
...
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