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
84d25135
Commit
84d25135
authored
Jun 10, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement NtCreateUserProcess().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
df513b95
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
1 deletion
+124
-1
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-0
process.c
dlls/ntdll/process.c
+0
-0
winternl.h
include/winternl.h
+123
-1
No files found.
dlls/ntdll/ntdll.spec
View file @
84d25135
...
...
@@ -186,6 +186,7 @@
@ stdcall NtCreateThreadEx(ptr long ptr long ptr ptr long long long long ptr)
@ stdcall NtCreateTimer(ptr long ptr long)
@ stub NtCreateToken
@ stdcall NtCreateUserProcess(ptr ptr long long ptr ptr long long ptr ptr ptr)
# @ stub NtCreateWaitablePort
@ stdcall -arch=win32,arm64 NtCurrentTeb()
# @ stub NtDebugActiveProcess
...
...
dlls/ntdll/process.c
View file @
84d25135
This diff is collapsed.
Click to expand it.
include/winternl.h
View file @
84d25135
...
...
@@ -2442,6 +2442,18 @@ typedef struct _SYSTEM_MODULE_INFORMATION
SYSTEM_MODULE
Modules
[
1
];
/* FIXME: should be Modules[0] */
}
SYSTEM_MODULE_INFORMATION
,
*
PSYSTEM_MODULE_INFORMATION
;
#define PROCESS_CREATE_FLAGS_BREAKAWAY 0x00000001
#define PROCESS_CREATE_FLAGS_NO_DEBUG_INHERIT 0x00000002
#define PROCESS_CREATE_FLAGS_INHERIT_HANDLES 0x00000004
#define PROCESS_CREATE_FLAGS_OVERRIDE_ADDRESS_SPACE 0x00000008
#define PROCESS_CREATE_FLAGS_LARGE_PAGES 0x00000010
#define PROCESS_CREATE_FLAGS_LARGE_PAGE_SYSTEM_DLL 0x00000020
#define PROCESS_CREATE_FLAGS_PROTECTED_PROCESS 0x00000040
#define PROCESS_CREATE_FLAGS_CREATE_SESSION 0x00000080
#define PROCESS_CREATE_FLAGS_INHERIT_FROM_PARENT 0x00000100
#define PROCESS_CREATE_FLAGS_SUSPENDED 0x00000200
#define PROCESS_CREATE_FLAGS_EXTENDED_UNKNOWN 0x00000400
#define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001
#define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002
#define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004
...
...
@@ -2455,7 +2467,7 @@ typedef void (CALLBACK *PTP_IO_CALLBACK)(PTP_CALLBACK_INSTANCE,void*,void*,IO_ST
#define PS_ATTRIBUTE_THREAD 0x00010000
#define PS_ATTRIBUTE_INPUT 0x00020000
#define PS_ATTRIBUTE_
UNKNOWN
0x00040000
#define PS_ATTRIBUTE_
ADDITIVE
0x00040000
typedef
enum
_PS_ATTRIBUTE_NUM
{
...
...
@@ -2479,10 +2491,41 @@ typedef enum _PS_ATTRIBUTE_NUM
PsAttributeProtectionLevel
,
PsAttributeSecureProcess
,
PsAttributeJobList
,
PsAttributeChildProcessPolicy
,
PsAttributeAllApplicationPackagesPolicy
,
PsAttributeWin32kFilter
,
PsAttributeSafeOpenPromptOriginClaim
,
PsAttributeBnoIsolation
,
PsAttributeDesktopAppPolicy
,
PsAttributeChpe
,
PsAttributeMax
}
PS_ATTRIBUTE_NUM
;
#define PS_ATTRIBUTE_PARENT_PROCESS (PsAttributeParentProcess | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
#define PS_ATTRIBUTE_DEBUG_PORT (PsAttributeDebugPort | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
#define PS_ATTRIBUTE_TOKEN (PsAttributeToken | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_ADDITIVE)
#define PS_ATTRIBUTE_CLIENT_ID (PsAttributeClientId | PS_ATTRIBUTE_THREAD)
#define PS_ATTRIBUTE_TEB_ADDRESS (PsAttributeTebAddress | PS_ATTRIBUTE_THREAD)
#define PS_ATTRIBUTE_IMAGE_NAME (PsAttributeImageName | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_IMAGE_INFO (PsAttributeImageInfo)
#define PS_ATTRIBUTE_MEMORY_RESERVE (PsAttributeMemoryReserve | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_PRIORITY_CLASS (PsAttributePriorityClass | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_ERROR_MODE (PsAttributeErrorMode | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_STD_HANDLE_INFO (PsAttributeStdHandleInfo | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_HANDLE_LIST (PsAttributeHandleList | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_GROUP_AFFINITY (PsAttributeGroupAffinity | PS_ATTRIBUTE_THREAD | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_PREFERRED_NODE (PsAttributePreferredNode | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_IDEAL_PROCESSOR (PsAttributeIdealProcessor | PS_ATTRIBUTE_THREAD | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_MITIGATION_OPTIONS (PsAttributeMitigationOptions | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_UNKNOWN)
#define PS_ATTRIBUTE_PROTECTION_LEVEL (PsAttributeProtectionLevel | PS_ATTRIBUTE_INPUT | PS_ATTRIBUTE_UNKNOWN)
#define PS_ATTRIBUTE_SECURE_PROCESS (PsAttributeSecureProcess | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_JOB_LIST (PsAttributeJobList | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_CHILD_PROCESS_POLICY (PsAttributeChildProcessPolicy | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_ALL_APPLICATION_PACKAGES_POLICY (PsAttributeAllApplicationPackagesPolicy | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_WIN32K_FILTER (PsAttributeWin32kFilter | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_SAFE_OPEN_PROMPT_ORIGIN_CLAIM (PsAttributeSafeOpenPromptOriginClaim | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_BNO_ISOLATION (PsAttributeBnoIsolation | PS_ATTRIBUTE_INPUT)
#define PS_ATTRIBUTE_DESKTOP_APP_POLICY (PsAttributeDesktopAppPolicy | PS_ATTRIBUTE_INPUT)
typedef
struct
_PS_ATTRIBUTE
{
...
...
@@ -2502,6 +2545,84 @@ typedef struct _PS_ATTRIBUTE_LIST
PS_ATTRIBUTE
Attributes
[
1
];
}
PS_ATTRIBUTE_LIST
,
*
PPS_ATTRIBUTE_LIST
;
typedef
enum
_PS_CREATE_STATE
{
PsCreateInitialState
,
PsCreateFailOnFileOpen
,
PsCreateFailOnSectionCreate
,
PsCreateFailExeFormat
,
PsCreateFailMachineMismatch
,
PsCreateFailExeName
,
PsCreateSuccess
,
PsCreateMaximumStates
}
PS_CREATE_STATE
;
typedef
struct
_PS_CREATE_INFO
{
SIZE_T
Size
;
PS_CREATE_STATE
State
;
union
{
struct
{
union
{
ULONG
InitFlags
;
struct
{
UCHAR
WriteOutputOnExit
:
1
;
UCHAR
DetectManifest
:
1
;
UCHAR
IFEOSkipDebugger
:
1
;
UCHAR
IFEODoNotPropagateKeyState
:
1
;
UCHAR
SpareBits1
:
4
;
UCHAR
SpareBits2
:
8
;
USHORT
ProhibitedImageCharacteristics
:
16
;
};
};
ACCESS_MASK
AdditionalFileAccess
;
}
InitState
;
struct
{
HANDLE
FileHandle
;
}
FailSection
;
struct
{
USHORT
DllCharacteristics
;
}
ExeFormat
;
struct
{
HANDLE
IFEOKey
;
}
ExeName
;
struct
{
union
{
ULONG
OutputFlags
;
struct
{
UCHAR
ProtectedProcess
:
1
;
UCHAR
AddressSpaceOverride
:
1
;
UCHAR
DevOverrideEnabled
:
1
;
UCHAR
ManifestDetected
:
1
;
UCHAR
ProtectedProcessLight
:
1
;
UCHAR
SpareBits1
:
3
;
UCHAR
SpareBits2
:
8
;
USHORT
SpareBits3
:
16
;
};
};
HANDLE
FileHandle
;
HANDLE
SectionHandle
;
ULONGLONG
UserProcessParametersNative
;
ULONG
UserProcessParametersWow64
;
ULONG
CurrentParameterFlags
;
ULONGLONG
PebAddressNative
;
ULONG
PebAddressWow64
;
ULONGLONG
ManifestAddress
;
ULONG
ManifestSize
;
}
SuccessState
;
};
}
PS_CREATE_INFO
,
*
PPS_CREATE_INFO
;
/***********************************************************************
* Function declarations
*/
...
...
@@ -2585,6 +2706,7 @@ NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,
NTSYSAPI
NTSTATUS
WINAPI
NtCreateThreadEx
(
HANDLE
*
,
ACCESS_MASK
,
OBJECT_ATTRIBUTES
*
,
HANDLE
,
PRTL_THREAD_START_ROUTINE
,
void
*
,
ULONG
,
SIZE_T
,
SIZE_T
,
SIZE_T
,
PS_ATTRIBUTE_LIST
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateTimer
(
HANDLE
*
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
,
TIMER_TYPE
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateToken
(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
,
TOKEN_TYPE
,
PLUID
,
PLARGE_INTEGER
,
PTOKEN_USER
,
PTOKEN_GROUPS
,
PTOKEN_PRIVILEGES
,
PTOKEN_OWNER
,
PTOKEN_PRIMARY_GROUP
,
PTOKEN_DEFAULT_DACL
,
PTOKEN_SOURCE
);
NTSYSAPI
NTSTATUS
WINAPI
NtCreateUserProcess
(
HANDLE
*
,
HANDLE
*
,
ACCESS_MASK
,
ACCESS_MASK
,
OBJECT_ATTRIBUTES
*
,
OBJECT_ATTRIBUTES
*
,
ULONG
,
ULONG
,
RTL_USER_PROCESS_PARAMETERS
*
,
PS_CREATE_INFO
*
,
PS_ATTRIBUTE_LIST
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtDelayExecution
(
BOOLEAN
,
const
LARGE_INTEGER
*
);
NTSYSAPI
NTSTATUS
WINAPI
NtDeleteAtom
(
RTL_ATOM
);
NTSYSAPI
NTSTATUS
WINAPI
NtDeleteFile
(
POBJECT_ATTRIBUTES
);
...
...
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