Compare commits

..

1 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
2ecd3b8b8e Release v5.12.1 2020-07-06 07:54:38 +10:00
109 changed files with 5533 additions and 2535 deletions

View File

@@ -1,29 +1,27 @@
From 8d80506ade85cac639a732280111226f65e0aac3 Mon Sep 17 00:00:00 2001
From 1eb8acd819f9eee8fdf154d0ef43881008265916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 4 Aug 2017 02:33:14 +0200
Subject: [PATCH] ntdll: Implement NtFilterToken.
Subject: ntdll: Implement NtFilterToken.
---
dlls/ntdll/nt.c | 59 ++++++++++++++++++++++++++++++
dlls/ntdll/nt.c | 59 ++++++++++++++++++++++++++++++++++++
dlls/ntdll/ntdll.spec | 2 +-
include/winnt.h | 5 +++
include/winternl.h | 1 +
server/named_pipe.c | 2 +-
server/process.c | 2 +-
server/protocol.def | 10 ++++++
server/security.h | 4 ++-
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++--
9 files changed, 163 insertions(+), 6 deletions(-)
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++--
8 files changed, 162 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index cc13672b2b9..443d46c71c7 100644
index c3f5df3..59a08de 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -90,6 +90,65 @@ NTSTATUS WINAPI NtDuplicateToken(
return status;
@@ -119,6 +119,65 @@ NTSTATUS WINAPI NtDuplicateToken(
}
+/******************************************************************************
/******************************************************************************
+ * NtFilterToken [NTDLL.@]
+ * ZwFilterToken [NTDLL.@]
+ */
@@ -82,27 +80,28 @@ index cc13672b2b9..443d46c71c7 100644
+ return status;
+}
+
/******************************************************************************
+/******************************************************************************
* NtOpenProcessToken [NTDLL.@]
* ZwOpenProcessToken [NTDLL.@]
*/
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 6293dc81ed4..36f7ddbda81 100644
index c260b0d..3c5e69c 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -208,7 +208,7 @@
@@ -176,7 +176,7 @@
# @ stub NtEnumerateSystemEnvironmentValuesEx
@ stdcall -syscall NtEnumerateValueKey(long long long ptr long ptr)
@ stdcall NtEnumerateValueKey(long long long ptr long ptr)
@ stub NtExtendSection
-# @ stub NtFilterToken
+@ stdcall NtFilterToken(long long ptr ptr ptr ptr)
@ stdcall -syscall NtFindAtom(ptr long ptr)
@ stdcall -syscall NtFlushBuffersFile(long ptr)
@ stdcall -syscall NtFlushInstructionCache(long ptr long)
@ stdcall NtFindAtom(ptr long ptr)
@ stdcall NtFlushBuffersFile(long ptr)
@ stdcall NtFlushInstructionCache(long ptr long)
diff --git a/include/winnt.h b/include/winnt.h
index e1cf78420a6..da17fe3e330 100644
index 16d96d8..4e238f9 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -4221,6 +4221,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
@@ -3904,6 +3904,11 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TOKEN_ADJUST_SESSIONID | \
TOKEN_ADJUST_DEFAULT )
@@ -115,10 +114,10 @@ index e1cf78420a6..da17fe3e330 100644
#define _SECURITY_DEFINED
diff --git a/include/winternl.h b/include/winternl.h
index b3fbb90feff..4687a410ca4 100644
index c84e6d7..288f93e 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2749,6 +2749,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
@@ -2303,6 +2303,7 @@ NTSYSAPI NTSTATUS WINAPI NtDuplicateToken(HANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES
NTSYSAPI NTSTATUS WINAPI NtEnumerateKey(HANDLE,ULONG,KEY_INFORMATION_CLASS,void *,DWORD,DWORD *);
NTSYSAPI NTSTATUS WINAPI NtEnumerateValueKey(HANDLE,ULONG,KEY_VALUE_INFORMATION_CLASS,PVOID,ULONG,PULONG);
NTSYSAPI NTSTATUS WINAPI NtExtendSection(HANDLE,PLARGE_INTEGER);
@@ -126,24 +125,11 @@ index b3fbb90feff..4687a410ca4 100644
NTSYSAPI NTSTATUS WINAPI NtFindAtom(const WCHAR*,ULONG,RTL_ATOM*);
NTSYSAPI NTSTATUS WINAPI NtFlushBuffersFile(HANDLE,IO_STATUS_BLOCK*);
NTSYSAPI NTSTATUS WINAPI NtFlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
diff --git a/server/named_pipe.c b/server/named_pipe.c
index b259abb8de4..4cd4d7dc4a8 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -1142,7 +1142,7 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
if (current->process->token) /* FIXME: use the client token */
{
struct token *token;
- if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL )))
+ if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL, NULL, 0, NULL, 0 )))
return 0;
if (current->token) release_object( current->token );
current->token = token;
diff --git a/server/process.c b/server/process.c
index 5e587b28cbe..406167e825b 100644
index f8739d0..71d9d6d 100644
--- a/server/process.c
+++ b/server/process.c
@@ -577,7 +577,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
@@ -566,7 +566,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
@@ -153,10 +139,10 @@ index 5e587b28cbe..406167e825b 100644
}
if (!process->handles || !process->token) goto error;
diff --git a/server/protocol.def b/server/protocol.def
index a121c371c19..ee07b1eca14 100644
index 35824ae..6ee6d28 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3263,6 +3263,16 @@ enum caret_state
@@ -3356,6 +3356,16 @@ enum caret_state
obj_handle_t new_handle; /* duplicated handle */
@END
@@ -174,10 +160,10 @@ index a121c371c19..ee07b1eca14 100644
obj_handle_t handle; /* handle to the token */
unsigned int desired_access; /* desired access to the object */
diff --git a/server/security.h b/server/security.h
index 606dbb2ab2c..6c337143c3d 100644
index 873bbc6..bc4a8f6 100644
--- a/server/security.h
+++ b/server/security.h
@@ -56,7 +56,9 @@ extern const PSID security_high_label_sid;
@@ -55,7 +55,9 @@ extern const PSID security_high_label_sid;
extern struct token *token_create_admin(void);
extern int token_assign_label( struct token *token, PSID label );
extern struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -189,10 +175,10 @@ index 606dbb2ab2c..6c337143c3d 100644
const LUID_AND_ATTRIBUTES *reqprivs,
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
diff --git a/server/token.c b/server/token.c
index 2fa95e17aaf..38a4c203d54 100644
index 0810a61..2f6a467 100644
--- a/server/token.c
+++ b/server/token.c
@@ -285,6 +285,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
@@ -276,6 +276,19 @@ static int acl_is_valid( const ACL *acl, data_size_t size )
return TRUE;
}
@@ -212,7 +198,7 @@ index 2fa95e17aaf..38a4c203d54 100644
/* checks whether all members of a security descriptor fit inside the size
* of memory specified */
int sd_is_valid( const struct security_descriptor *sd, data_size_t size )
@@ -626,8 +639,36 @@ static struct token *create_token( unsigned primary, const SID *user,
@@ -619,8 +632,36 @@ static struct token *create_token( unsigned primary, const SID *user,
return token;
}
@@ -250,7 +236,7 @@ index 2fa95e17aaf..38a4c203d54 100644
{
const luid_t *modified_id =
primary || (impersonation_level == src_token->impersonation_level) ?
@@ -663,6 +704,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -656,6 +697,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
return NULL;
}
memcpy( newgroup, group, size );
@@ -263,7 +249,7 @@ index 2fa95e17aaf..38a4c203d54 100644
list_add_tail( &token->groups, &newgroup->entry );
if (src_token->primary_group == &group->sid)
{
@@ -674,11 +721,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -667,11 +714,14 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
/* copy privileges */
LIST_FOR_EACH_ENTRY( privilege, &src_token->privileges, struct privilege, entry )
@@ -278,7 +264,7 @@ index 2fa95e17aaf..38a4c203d54 100644
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
@@ -1311,7 +1361,7 @@ DECL_HANDLER(duplicate_token)
@@ -1304,7 +1354,7 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
@@ -287,7 +273,7 @@ index 2fa95e17aaf..38a4c203d54 100644
if (token)
{
reply->new_handle = alloc_handle_no_access_check( current->process, token, req->access, objattr->attributes );
@@ -1321,6 +1371,36 @@ DECL_HANDLER(duplicate_token)
@@ -1314,6 +1364,36 @@ DECL_HANDLER(duplicate_token)
}
}
@@ -325,5 +311,5 @@ index 2fa95e17aaf..38a4c203d54 100644
DECL_HANDLER(check_token_privileges)
{
--
2.27.0
2.7.4

View File

@@ -1,4 +1,4 @@
From 182f23825cd873fc2b4ee2ddb81b21d7194e60d2 Mon Sep 17 00:00:00 2001
From 2588eb4eb5fe56aca7d229ea42b0eaa3786ff600 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 01:45:29 +0200
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
@@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
6 files changed, 117 insertions(+)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 42ce9815489..401bdd61d21 100644
index e5db07f0a4e..d52f6b76aa4 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1598,6 +1598,9 @@
@@ -1594,6 +1594,9 @@
# Virtual memory
@ cdecl __wine_locked_recvmsg(long ptr long)
@@ -28,7 +28,7 @@ index 42ce9815489..401bdd61d21 100644
@ cdecl wine_get_version()
@ cdecl wine_get_build_id()
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index c8fbc1ae09d..2603b57be38 100644
index 92fcde95a8a..80be882e76d 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -69,6 +69,9 @@ extern void init_locale( HMODULE module ) DECLSPEC_HIDDEN;
@@ -42,10 +42,10 @@ index c8fbc1ae09d..2603b57be38 100644
extern BOOL is_wow64 DECLSPEC_HIDDEN;
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 77ba5b371e2..3e91a1fa9c4 100644
index 992721d133f..24cb8f53de2 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -72,6 +72,24 @@ HANDLE CDECL __wine_make_process_system(void)
@@ -82,6 +82,24 @@ HANDLE CDECL __wine_make_process_system(void)
return ret;
}
@@ -67,14 +67,14 @@ index 77ba5b371e2..3e91a1fa9c4 100644
+ return ret;
+}
+
/***********************************************************************
* restart_process
*/
/******************************************************************************
* NtQueryInformationProcess [NTDLL.@]
* ZwQueryInformationProcess [NTDLL.@]
diff --git a/server/protocol.def b/server/protocol.def
index 9da597e2773..abfc744c960 100644
index 96bc9250ab0..14b811684d8 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3583,6 +3583,14 @@ struct handle_info
@@ -3759,6 +3759,14 @@ struct handle_info
@END

View File

@@ -1,4 +1,4 @@
From b7e3ca4678d073c92f950708c1be35f37fda86d0 Mon Sep 17 00:00:00 2001
From 1f2b1bafabfd457836f18741f178b3745e129c36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 5 Aug 2017 03:39:55 +0200
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
@@ -12,10 +12,10 @@ Subject: [PATCH] ntdll: Implement process token elevation through manifests.
5 files changed, 67 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 3513102b6f0..3b68f6685d0 100644
index 0c8f05285c4..92ae87c6e6d 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3489,6 +3489,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
@@ -3898,6 +3898,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
}
@@ -48,7 +48,7 @@ index 3513102b6f0..3b68f6685d0 100644
/***********************************************************************
* load_global_options
*/
@@ -3922,6 +3948,7 @@ void __wine_process_init(void)
@@ -4359,6 +4385,7 @@ void __wine_process_init(void)
'k','e','r','n','e','l','3','2','.','d','l','l',0};
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
RTL_USER_PROCESS_PARAMETERS *params;
@@ -56,7 +56,7 @@ index 3513102b6f0..3b68f6685d0 100644
WINE_MODREF *wm;
NTSTATUS status;
ANSI_STRING func_name;
@@ -4032,6 +4059,16 @@ void __wine_process_init(void)
@@ -4453,6 +4480,16 @@ void __wine_process_init(void)
unix_funcs->virtual_set_large_address_space();
@@ -74,11 +74,11 @@ index 3513102b6f0..3b68f6685d0 100644
RemoveEntryList( &wm->ldr.InLoadOrderLinks );
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
diff --git a/server/process.c b/server/process.c
index c414717a8d7..100cb424623 100644
index ac85cace95d..52604ec4d61 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1086,6 +1086,14 @@ int set_process_debug_flag( struct process *process, int flag )
return write_process_memory( process, process->peb + 2, 1, &data );
@@ -1115,6 +1115,14 @@ struct process_snapshot *process_snap( int *count )
return snapshot;
}
+/* replace the token of a process */
@@ -93,22 +93,22 @@ index c414717a8d7..100cb424623 100644
DECL_HANDLER(new_process)
{
diff --git a/server/process.h b/server/process.h
index fb29f21cb12..d0b7ec4987b 100644
index 5b83e111a6f..dfe5c4e52d8 100644
--- a/server/process.h
+++ b/server/process.h
@@ -129,6 +129,7 @@ extern void kill_console_processes( struct thread *renderer, int exit_code );
extern void kill_debugged_processes( struct thread *debugger, int exit_code );
@@ -139,6 +139,7 @@ extern void kill_debugged_processes( struct thread *debugger, int exit_code );
extern void detach_debugged_processes( struct thread *debugger );
extern struct process_snapshot *process_snap( int *count );
extern void enum_processes( int (*cb)(struct process*, void*), void *user);
+extern void replace_process_token( struct process *process, struct token *token );
/* console functions */
extern void inherit_console( struct thread *parent_thread, struct process *parent,
diff --git a/server/protocol.def b/server/protocol.def
index bc0d0723eb3..ec67ce7ab87 100644
index 7315f8ac4ea..901c380b721 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3737,6 +3737,13 @@ struct handle_info
@@ -3763,6 +3763,13 @@ struct handle_info
@END
@@ -145,5 +145,5 @@ index 970ed1838da..1c1d49989b3 100644
+ }
+}
--
2.27.0
2.26.2

View File

@@ -1,21 +1,20 @@
From a8915b8ebd4c06b0216fc82d1ba8d958a677eccf Mon Sep 17 00:00:00 2001
From 6d8fd34cabbcbc64062675be610fb8704fcdc3ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 7 Aug 2017 03:33:26 +0200
Subject: [PATCH] server: Correctly assign security labels for tokens.
---
dlls/advapi32/tests/security.c | 21 +++++++++--------
server/named_pipe.c | 2 +-
server/process.c | 8 +------
dlls/advapi32/tests/security.c | 21 ++++++++++-----------
server/process.c | 8 +-------
server/security.h | 2 +-
server/token.c | 41 ++++++++++++++++++++--------------
5 files changed, 37 insertions(+), 37 deletions(-)
server/token.c | 41 ++++++++++++++++++++++++-----------------
4 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 94f3ea4601a..ab572421a73 100644
index bf4161c..0610ec7 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -7105,7 +7105,6 @@ static void test_token_security_descriptor(void)
@@ -7186,7 +7186,6 @@ static void test_token_security_descriptor(void)
defaulted = TRUE;
ret = GetSecurityDescriptorDacl(sd2, &present, &acl2, &defaulted);
ok(ret, "GetSecurityDescriptorDacl failed with error %u\n", GetLastError());
@@ -23,7 +22,7 @@ index 94f3ea4601a..ab572421a73 100644
ok(present, "DACL not present\n");
if (present)
@@ -7226,7 +7225,7 @@ static void test_token_security_descriptor(void)
@@ -7307,7 +7306,7 @@ static void test_token_security_descriptor(void)
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
"Unexpected ACE type %#x\n", ace->Header.AceType);
@@ -32,7 +31,7 @@ index 94f3ea4601a..ab572421a73 100644
"Expected medium integrity level\n");
}
@@ -7279,8 +7278,8 @@ static void test_token_security_descriptor(void)
@@ -7360,8 +7359,8 @@ static void test_token_security_descriptor(void)
sacl = NULL;
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -43,7 +42,7 @@ index 94f3ea4601a..ab572421a73 100644
if (sacl)
{
@@ -7329,8 +7328,8 @@ static void test_token_security_descriptor(void)
@@ -7410,8 +7409,8 @@ static void test_token_security_descriptor(void)
sacl = NULL;
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -54,7 +53,7 @@ index 94f3ea4601a..ab572421a73 100644
if (sacl)
{
@@ -7394,8 +7393,8 @@ static void test_token_security_descriptor(void)
@@ -7475,8 +7474,8 @@ static void test_token_security_descriptor(void)
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -65,7 +64,7 @@ index 94f3ea4601a..ab572421a73 100644
if (sacl)
{
@@ -7432,8 +7431,8 @@ static void test_token_security_descriptor(void)
@@ -7513,8 +7512,8 @@ static void test_token_security_descriptor(void)
sacl = NULL;
ret = GetSecurityDescriptorSacl(sd3, &present, &sacl, &defaulted);
ok(ret, "GetSecurityDescriptorSacl failed with error %u\n", GetLastError());
@@ -76,7 +75,7 @@ index 94f3ea4601a..ab572421a73 100644
if (sacl)
{
@@ -7652,7 +7651,7 @@ static void test_child_token_sd_medium(void)
@@ -7732,7 +7731,7 @@ static void test_child_token_sd_medium(void)
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
"Unexpected ACE type %#x\n", ace_label->Header.AceType);
@@ -85,24 +84,11 @@ index 94f3ea4601a..ab572421a73 100644
"Expected medium integrity level\n");
memset(buffer_integrity, 0, sizeof(buffer_integrity));
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 4cd4d7dc4a8..06bf8402aea 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -1142,7 +1142,7 @@ static int pipe_server_ioctl( struct fd *fd, ioctl_code_t code, struct async *as
if (current->process->token) /* FIXME: use the client token */
{
struct token *token;
- if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL, NULL, 0, NULL, 0 )))
+ if (!(token = token_duplicate( current->process->token, 0, SecurityImpersonation, NULL, NULL, 0, NULL, 0, NULL )))
return 0;
if (current->token) release_object( current->token );
current->token = token;
diff --git a/server/process.c b/server/process.c
index 31d5b96a25d..2c485831e33 100644
index b7c9da3..250f777 100644
--- a/server/process.c
+++ b/server/process.c
@@ -577,17 +577,11 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
@@ -562,17 +562,11 @@ struct process *create_process( int fd, struct thread *parent_thread, int inheri
: alloc_handle_table( process, 0 );
/* Note: for security reasons, starting a new process does not attempt
* to use the current impersonation token for the new process */
@@ -122,7 +108,7 @@ index 31d5b96a25d..2c485831e33 100644
return process;
diff --git a/server/security.h b/server/security.h
index 32dfe5f8db9..87377ccd673 100644
index 32dfe5f..87377cc 100644
--- a/server/security.h
+++ b/server/security.h
@@ -59,7 +59,7 @@ extern int token_assign_label( struct token *token, PSID label );
@@ -135,10 +121,10 @@ index 32dfe5f8db9..87377ccd673 100644
const LUID_AND_ATTRIBUTES *reqprivs,
unsigned int count, LUID_AND_ATTRIBUTES *usedprivs);
diff --git a/server/token.c b/server/token.c
index 2f466aa1b25..23bc1cc13f7 100644
index 5db97b4..bd251c7 100644
--- a/server/token.c
+++ b/server/token.c
@@ -675,7 +675,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
@@ -668,7 +668,7 @@ static int filter_privilege( struct privilege *privilege, const LUID_AND_ATTRIBU
struct token *token_duplicate( struct token *src_token, unsigned primary,
int impersonation_level, const struct security_descriptor *sd,
const LUID_AND_ATTRIBUTES *filter_privileges, unsigned int priv_count,
@@ -147,7 +133,7 @@ index 2f466aa1b25..23bc1cc13f7 100644
{
const luid_t *modified_id =
primary || (impersonation_level == src_token->impersonation_level) ?
@@ -742,6 +742,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
@@ -735,6 +735,12 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
if (sd) default_set_sd( &token->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
@@ -160,7 +146,7 @@ index 2f466aa1b25..23bc1cc13f7 100644
return token;
}
@@ -913,6 +919,12 @@ struct token *token_create_admin( void )
@@ -906,6 +912,12 @@ struct token *token_create_admin( void )
admin_source, NULL, -1, TokenElevationTypeFull, &high_label_sid );
/* we really need a primary group */
assert( token->primary_group );
@@ -173,7 +159,7 @@ index 2f466aa1b25..23bc1cc13f7 100644
}
free( logon_sid );
@@ -971,6 +983,12 @@ static struct token *token_create_limited( void )
@@ -964,6 +976,12 @@ static struct token *token_create_limited( void )
admin_source, NULL, -1, TokenElevationTypeLimited, &medium_label_sid );
/* we really need a primary group */
assert( token->primary_group );
@@ -186,7 +172,7 @@ index 2f466aa1b25..23bc1cc13f7 100644
}
free( logon_sid );
@@ -1439,7 +1457,8 @@ DECL_HANDLER(duplicate_token)
@@ -1432,7 +1450,8 @@ DECL_HANDLER(duplicate_token)
TOKEN_DUPLICATE,
&token_ops )))
{
@@ -196,7 +182,7 @@ index 2f466aa1b25..23bc1cc13f7 100644
if (token)
{
unsigned int access = req->access ? req->access : get_handle_access( current->process, req->handle );
@@ -1469,7 +1488,7 @@ DECL_HANDLER(filter_token)
@@ -1462,7 +1481,7 @@ DECL_HANDLER(filter_token)
group_count = get_sid_count( filter_groups, get_req_data_size() - priv_count * sizeof(LUID_AND_ATTRIBUTES) );
token = token_duplicate( src_token, src_token->primary, src_token->impersonation_level, NULL,
@@ -205,7 +191,7 @@ index 2f466aa1b25..23bc1cc13f7 100644
if (token)
{
unsigned int access = get_handle_access( current->process, req->handle );
@@ -1795,23 +1814,11 @@ DECL_HANDLER(set_token_default_dacl)
@@ -1788,23 +1807,11 @@ DECL_HANDLER(set_token_default_dacl)
DECL_HANDLER(create_token)
{
struct token *token;
@@ -232,5 +218,5 @@ index 2f466aa1b25..23bc1cc13f7 100644
}
}
--
2.27.0
2.7.4

View File

@@ -1,28 +1,30 @@
From 415ededb3cceae15cb05a1860cef1d4e5e055b27 Mon Sep 17 00:00:00 2001
From b26a890a50b5c35d20c8f42993c4f578777584f0 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Fri, 27 Mar 2015 20:58:37 +0000
Subject: [PATCH] dsound: Add EAX init and free stubs.
---
dlls/dsound/buffer.c | 4 ++++
dlls/dsound/buffer.c | 6 +++++-
dlls/dsound/dsound_private.h | 2 ++
dlls/dsound/eax.c | 28 +++++++++++++++++++++++++++-
3 files changed, 33 insertions(+), 1 deletion(-)
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 6bbf468d136..e27fdfdecc4 100644
index 22e1a713ee6..10daf4fa71a 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -1110,6 +1110,8 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
@@ -1131,7 +1131,9 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
} else
DSOUND_RecalcVolPan(&(dsb->volpan));
InitializeSRWLock(&dsb->lock);
- InitializeSRWLock(&dsb->lock);
+ InitializeSRWLock(&dsb->lock);
+ if (dsb->device->eax.using_eax)
+ init_eax_buffer(dsb);
/* register buffer */
err = DirectSoundDevice_AddBuffer(device, dsb);
@@ -1150,6 +1152,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
@@ -1174,6 +1176,8 @@ void secondarybuffer_destroy(IDirectSoundBufferImpl *This)
HeapFree(GetProcessHeap(), 0, This->filters);
}
@@ -97,5 +99,5 @@ index 3931681d295..c0afb0f1acf 100644
HRESULT WINAPI EAX_Get(IDirectSoundBufferImpl *buf, REFGUID guidPropSet,
--
2.27.0
2.17.1

View File

@@ -1,4 +1,4 @@
From 66c0779d339d5d27753e6f0ac6509741b908cca1 Mon Sep 17 00:00:00 2001
From 204a68de061f5b6b1bcd992e743b61c3f9f53956 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 4 Apr 2015 21:09:18 +0200
Subject: [PATCH] dsound: Various improvements to EAX support.
@@ -24,10 +24,10 @@ the buffers).
5 files changed, 37 insertions(+), 41 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 030f0849fed..252122d0374 100644
index 10daf4fa71a..25aaa61f3de 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -1084,8 +1084,6 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
@@ -1106,8 +1106,6 @@ HRESULT secondarybuffer_create(DirectSoundDevice *device, const DSBUFFERDESC *ds
/* calculate fragment size and write lead */
DSOUND_RecalcFormat(dsb);
@@ -36,7 +36,7 @@ index 030f0849fed..252122d0374 100644
if (dsb->dsbd.dwFlags & DSBCAPS_CTRL3D) {
dsb->ds3db_ds3db.dwSize = sizeof(DS3DBUFFER);
dsb->ds3db_ds3db.vPosition.x = 0.0;
@@ -1168,7 +1166,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
@@ -1192,7 +1190,7 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
HRESULT hres = DS_OK;
TRACE("(%p,%p,%p)\n", device, ppdsb, pdsb);
@@ -45,7 +45,7 @@ index 030f0849fed..252122d0374 100644
if (dsb == NULL) {
WARN("out of memory\n");
*ppdsb = NULL;
@@ -1205,6 +1203,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
@@ -1229,6 +1227,8 @@ HRESULT IDirectSoundBufferImpl_Duplicate(
InitializeSRWLock(&dsb->lock);
@@ -92,7 +92,7 @@ index 110dfe2c207..bca2bf46601 100644
void init_eax_buffer(IDirectSoundBufferImpl *dsb) DECLSPEC_HIDDEN;
void process_eax_buffer(IDirectSoundBufferImpl *dsb, float *buf, DWORD count) DECLSPEC_HIDDEN;
diff --git a/dlls/dsound/eax.c b/dlls/dsound/eax.c
index a05b00e1c02..535ff92d44d 100644
index a05b00e1c02..e10156e3d4a 100644
--- a/dlls/dsound/eax.c
+++ b/dlls/dsound/eax.c
@@ -114,6 +114,8 @@ static const float LATE_LINE_MULTIPLIER = 4.0f;
@@ -152,12 +152,12 @@ index a05b00e1c02..535ff92d44d 100644
{
int i;
+ AcquireSRWLockShared(&dev->buffer_list_lock);
+ RtlAcquireResourceShared(&dev->buffer_list_lock, TRUE);
for (i = 0; i < dev->nrofbuffers; i++) {
- ReverbUpdate(dev->buffers[i]);
+ dev->buffers[i]->eax.reverb_update = TRUE;
}
+ ReleaseSRWLockShared(&dev->buffer_list_lock);
+ RtlReleaseResource(&dev->buffer_list_lock);
return TRUE;
}
@@ -253,5 +253,5 @@ index a05b00e1c02..535ff92d44d 100644
switch (dwPropID) {
case DSPROPERTY_EAXBUFFER_ALL:
--
2.27.0
2.17.1

View File

@@ -2,10 +2,12 @@ Fixes: [36692] Many multi-threaded applications have poor performance due to hea
# Note: the following dependencies are essentially artificial; in particular
# these patches do not make use of the Staging shared memory infrastructure.
Depends: server-Shared_Memory
Depends: ntdll-SystemRoot_Symlink
Depends: ws2_32-WSACleanup
Depends: server-Realtime_Priority
Depends: advapi32-Token_Integrity_Level
Depends: ntdll-Junction_Points
Depends: kernel32-K32GetPerformanceInfo
Depends: user32-rawinput-mouse
Depends: server-Desktop_Refcount
Disabled: true

View File

@@ -0,0 +1,131 @@
From 223addb60e053484eaa77df434898419683e926b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 19 Feb 2017 05:38:40 +0100
Subject: [PATCH] kernel32: Make K32GetPerformanceInfo faster.
---
dlls/kernelbase/debug.c | 44 ++++++++++++++---------------------------
server/process.c | 18 +++++++++++++++++
server/protocol.def | 8 ++++++++
3 files changed, 41 insertions(+), 29 deletions(-)
diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c
index 6acdf0f1ea95..8f021ebb0d21 100644
--- a/dlls/kernelbase/debug.c
+++ b/dlls/kernelbase/debug.c
@@ -1449,7 +1449,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32GetPerformanceInfo( PPERFORMANCE_INFORMATION in
{
SYSTEM_PERFORMANCE_INFORMATION perf;
SYSTEM_BASIC_INFORMATION basic;
- SYSTEM_PROCESS_INFORMATION *process, *spi;
DWORD info_size;
NTSTATUS status;
@@ -1462,9 +1461,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32GetPerformanceInfo( PPERFORMANCE_INFORMATION in
}
status = NtQuerySystemInformation( SystemPerformanceInformation, &perf, sizeof(perf), NULL );
- if (!set_ntstatus( status )) return FALSE;
+ if (status) goto err;
status = NtQuerySystemInformation( SystemBasicInformation, &basic, sizeof(basic), NULL );
- if (!set_ntstatus( status )) return FALSE;
+ if (status) goto err;
info->cb = sizeof(*info);
info->CommitTotal = perf.TotalCommittedPages;
@@ -1478,37 +1477,24 @@ BOOL WINAPI DECLSPEC_HOTPATCH K32GetPerformanceInfo( PPERFORMANCE_INFORMATION in
info->KernelNonpaged = perf.NonPagedPoolUsage;
info->PageSize = basic.PageSize;
- /* fields from SYSTEM_PROCESS_INFORMATION */
- NtQuerySystemInformation( SystemProcessInformation, NULL, 0, &info_size );
- for (;;)
+ SERVER_START_REQ( get_system_info )
{
- process = HeapAlloc( GetProcessHeap(), 0, info_size );
- if (!process)
+ status = wine_server_call( req );
+ if (!status)
{
- SetLastError( ERROR_OUTOFMEMORY );
- return FALSE;
- }
- status = NtQuerySystemInformation( SystemProcessInformation, process, info_size, &info_size );
- if (!status) break;
- HeapFree( GetProcessHeap(), 0, process );
- if (status != STATUS_INFO_LENGTH_MISMATCH)
- {
- SetLastError( RtlNtStatusToDosError( status ) );
- return FALSE;
+ info->ProcessCount = reply->processes;
+ info->HandleCount = reply->handles;
+ info->ThreadCount = reply->threads;
}
}
- info->HandleCount = info->ProcessCount = info->ThreadCount = 0;
- spi = process;
- for (;;)
- {
- info->ProcessCount++;
- info->HandleCount += spi->HandleCount;
- info->ThreadCount += spi->dwThreadCount;
- if (spi->NextEntryOffset == 0) break;
- spi = (SYSTEM_PROCESS_INFORMATION *)((char *)spi + spi->NextEntryOffset);
- }
- HeapFree( GetProcessHeap(), 0, process );
+ SERVER_END_REQ;
+
+ if (status) goto err;
return TRUE;
+
+err:
+ SetLastError( RtlNtStatusToDosError( status ) );
+ return FALSE;
}
diff --git a/server/process.c b/server/process.c
index 3156e1bc82a5..da5c55e5368a 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1830,3 +1830,21 @@ DECL_HANDLER(resume_process)
release_object( process );
}
}
+
+/* Retrieve process, thread and handle count */
+DECL_HANDLER(get_system_info)
+{
+ struct process *process;
+
+ reply->processes = 0;
+ reply->threads = 0;
+ reply->handles = 0;
+
+ LIST_FOR_EACH_ENTRY( process, &process_list, struct process, entry )
+ {
+ if (!process->running_threads) continue;
+ reply->processes++;
+ reply->threads += process->running_threads;
+ reply->handles += get_handle_table_count( process );
+ }
+}
diff --git a/server/protocol.def b/server/protocol.def
index ef10b5e1438c..ca34c9dc1b4b 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3992,3 +3992,11 @@ struct handle_info
@REQ(resume_process)
obj_handle_t handle; /* process handle */
@END
+
+/* Return system information values */
+@REQ(get_system_info)
+@REPLY
+ unsigned int processes; /* number of processes */
+ unsigned int threads; /* number of threads */
+ unsigned int handles; /* number of handles */
+@END
--
2.26.2

View File

@@ -0,0 +1 @@
Fixes: Use separate wineserver call for kernel32.K32GetPerformanceInfo

View File

@@ -1,4 +1,4 @@
From 83309ce4174bf56eef86e516221290b8d88bdc27 Mon Sep 17 00:00:00 2001
From aa9b48c7e76994f4b93fbc516eee5d39a597f63f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 1 Jun 2017 06:04:53 +0200
Subject: [PATCH] ntdll: Fix holes in ELF mappings. (v2)
@@ -10,10 +10,10 @@ Based on a patch by Andrew Wesie.
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index cdc8e1189b3..1f73e72a952 100644
index 66bcde8aff1..734dd130817 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -968,6 +968,16 @@ static inline BOOL is_write_watch_range( const void *addr, size_t size )
@@ -959,6 +959,16 @@ static inline BOOL is_write_watch_range( const void *addr, size_t size )
}
@@ -30,7 +30,7 @@ index cdc8e1189b3..1f73e72a952 100644
/***********************************************************************
* find_view_range
*
@@ -2966,6 +2976,19 @@ NTSTATUS virtual_handle_fault( void *addr, DWORD err, void *stack )
@@ -2920,6 +2930,19 @@ NTSTATUS virtual_handle_fault( LPCVOID addr, DWORD err, BOOL on_signal_stack )
/* ignore fault if page is writable now */
if (get_unix_prot( get_page_vprot( page ) ) & PROT_WRITE) ret = STATUS_SUCCESS;
}
@@ -47,7 +47,7 @@ index cdc8e1189b3..1f73e72a952 100644
+ else
+ set_page_vprot_bits( page, page_size, 0, VPROT_READ | VPROT_EXEC );
+ }
pthread_mutex_unlock( &virtual_mutex );
server_leave_uninterrupted_section( &virtual_mutex, &sigset );
return ret;
}
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c

View File

@@ -1,4 +1,4 @@
From f96ab0203c4119942b9d8ccc27207cc73389b375 Mon Sep 17 00:00:00 2001
From 0bfc43bff3a9b53e65c82d987bb072f0ff0a3a2b Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Tue, 19 Aug 2014 22:10:49 -0600
Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
@@ -14,7 +14,7 @@ Subject: [PATCH] ntdll: Implement retrieving DOS attributes in
create mode 100644 libs/port/xattr.c
diff --git a/configure.ac b/configure.ac
index 4829648c3a5..cff2d4b8288 100644
index d3bd12a6340..5e775c04449 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,7 @@ AC_ARG_WITH(usb, AS_HELP_STRING([--without-usb],[do not use the libusb lib
@@ -44,10 +44,10 @@ index 4829648c3a5..cff2d4b8288 100644
AC_SUBST(DLLFLAGS,"-D_REENTRANT")
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index bf435f109f1..6ac9b18da57 100644
index 66ce2eb5fe4..d2e783f3300 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1448,6 +1448,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name,
@@ -1431,6 +1431,22 @@ static BOOL append_entry( struct dir_data *data, const char *long_name,
}
@@ -70,7 +70,7 @@ index bf435f109f1..6ac9b18da57 100644
/* fetch the attributes of a file */
static inline ULONG get_file_attributes( const struct stat *st )
{
@@ -1491,7 +1507,8 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON
@@ -1450,7 +1466,8 @@ static inline ULONG get_file_attributes( const struct stat *st )
static int get_file_info( const char *path, struct stat *st, ULONG *attr )
{
char *parent_path;
@@ -80,8 +80,8 @@ index bf435f109f1..6ac9b18da57 100644
*attr = 0;
ret = lstat( path, st );
@@ -1517,6 +1534,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
free( parent_path );
@@ -1476,6 +1493,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
}
*attr |= get_file_attributes( st );
+ len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
@@ -91,10 +91,10 @@ index bf435f109f1..6ac9b18da57 100644
}
diff --git a/include/wine/port.h b/include/wine/port.h
index 928730a41d7..4670891ae77 100644
index e8434c73cca..6e81cb71a76 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -352,6 +352,15 @@ int usleep (unsigned int useconds);
@@ -361,6 +361,15 @@ int usleep (unsigned int useconds);
extern int mkstemps(char *template, int suffix_len);
@@ -111,10 +111,10 @@ index 928730a41d7..4670891ae77 100644
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 7bc67fa3fee..d1de285d527 100644
index 1963afe2423..4b1ecab7516 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -21,4 +21,5 @@ C_SRCS = \
@@ -22,4 +22,5 @@ C_SRCS = \
strnlen.c \
symlink.c \
usleep.c \

View File

@@ -1,14 +1,14 @@
From 29333aaab5e4d2b62741a8321382b24f1630eb70 Mon Sep 17 00:00:00 2001
From 7fbcb02d4e88819dead5b944c3b4676fb4c3bc35 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 15:28:00 -0600
Subject: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile.
---
dlls/ntdll/tests/directory.c | 24 +++++++++++-------------
dlls/ntdll/unix/file.c | 31 ++++++++++++++++++++++++++-----
include/wine/port.h | 2 ++
libs/port/xattr.c | 20 ++++++++++++++++++++
4 files changed, 59 insertions(+), 18 deletions(-)
dlls/ntdll/tests/directory.c | 24 +++++------
dlls/ntdll/unix/file.c | 78 +++++++++++++++++++++++-------------
include/wine/port.h | 2 +
libs/port/xattr.c | 20 +++++++++
4 files changed, 83 insertions(+), 41 deletions(-)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 248ed99ab20..e0f4debc624 100644
@@ -60,10 +60,10 @@ index 248ed99ab20..e0f4debc624 100644
}
testfiles[i].nfound++;
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 7ab1c130bf2..7c737edd22c 100644
index e3477f5cb5b..73bacabb4f3 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -3549,6 +3549,20 @@ void CDECL set_show_dot_files( BOOL enable )
@@ -3572,6 +3572,20 @@ void CDECL set_show_dot_files( BOOL enable )
show_dot_files = enable;
}
@@ -83,44 +83,98 @@ index 7ab1c130bf2..7c737edd22c 100644
+}
/******************************************************************************
* open_unix_file
@@ -3636,13 +3650,14 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
* NtCreateFile (NTDLL.@)
@@ -3581,6 +3595,10 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
ULONG attributes, ULONG sharing, ULONG disposition,
ULONG options, void *ea_buffer, ULONG ea_length )
{
+ static UNICODE_STRING empty_string;
+ OBJECT_ATTRIBUTES unix_attr;
+ data_size_t len;
+ struct object_attributes *objattr;
ANSI_STRING unix_name;
BOOL created = FALSE;
@@ -3623,36 +3641,34 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
io->u.Status = STATUS_SUCCESS;
}
- if (io->u.Status == STATUS_SUCCESS)
+ if (io->u.Status != STATUS_SUCCESS)
{
- io->u.Status = open_unix_file( handle, unix_name, access, attr, attributes,
- sharing, disposition, options, ea_buffer, ea_length );
- free( unix_name );
+ WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
- static UNICODE_STRING empty_string;
- OBJECT_ATTRIBUTES unix_attr = *attr;
- data_size_t len;
- struct object_attributes *objattr;
-
- unix_attr.ObjectName = &empty_string; /* we send the unix name instead */
- if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
- {
- RtlFreeAnsiString( &unix_name );
- return io->u.Status;
- }
- SERVER_START_REQ( create_file )
- {
- req->access = access;
- req->sharing = sharing;
- req->create = disposition;
- req->options = options;
- req->attrs = attributes;
- wine_server_add_data( req, objattr, len );
- wine_server_add_data( req, unix_name.Buffer, unix_name.Length );
- io->u.Status = wine_server_call( req );
- *handle = wine_server_ptr_handle( reply->handle );
- }
- SERVER_END_REQ;
- free( objattr );
- RtlFreeAnsiString( &unix_name );
+ WARN("%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
+ return io->u.Status;
}
- else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), io->u.Status );
+
+ io->u.Status = open_unix_file( handle, unix_name, access, attr, attributes,
+ sharing, disposition, options, ea_buffer, ea_length );
+ unix_attr = *attr;
+ unix_attr.ObjectName = &empty_string; /* we send the unix name instead */
+ if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
+ {
+ RtlFreeAnsiString( &unix_name );
+ return io->u.Status;
+ }
+
+ SERVER_START_REQ( create_file )
+ {
+ req->access = access;
+ req->sharing = sharing;
+ req->create = disposition;
+ req->options = options;
+ req->attrs = attributes;
+ wine_server_add_data( req, objattr, len );
+ wine_server_add_data( req, unix_name.Buffer, unix_name.Length );
+ io->u.Status = wine_server_call( req );
+ *handle = wine_server_ptr_handle( reply->handle );
+ }
+ SERVER_END_REQ;
+ free( objattr );
if (io->u.Status == STATUS_SUCCESS)
{
@@ -3664,6 +3679,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
@@ -3674,6 +3690,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
io->Information = FILE_OVERWRITTEN;
break;
}
+ if (io->Information == FILE_CREATED)
+ {
+ /* set any DOS extended attributes */
+ set_file_info( unix_name, attributes );
+ set_file_info( unix_name.Buffer, attributes );
+ }
}
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
{
@@ -3671,6 +3691,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
@@ -3681,6 +3702,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" );
}
+ free( unix_name );
+ RtlFreeAnsiString( &unix_name );
return io->u.Status;
}

View File

@@ -1,4 +1,4 @@
From 3f308239ced2e9fa2ac0b298eeb1ad5dde330840 Mon Sep 17 00:00:00 2001
From 01a10dd50491ca0162a5293836cf9b9a3d3c0e34 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 11:26:48 -0600
Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Perform the Unix-style hidden file check within the
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 7c737edd22c..c6b4928bd53 100644
index 496c92265e9..6f3772d20be 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1213,15 +1213,15 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
@@ -1217,15 +1217,15 @@ static BOOLEAN get_dir_case_sensitivity( const char *dir )
*
* Check if the specified file should be hidden based on its name and the show dot files option.
*/
@@ -33,8 +33,8 @@ index 7c737edd22c..c6b4928bd53 100644
if (p == end || *p != '.') return FALSE;
/* make sure it isn't '.' or '..' */
if (p + 1 == end) return FALSE;
@@ -1567,6 +1567,10 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
free( parent_path );
@@ -1493,6 +1493,10 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
}
*attr |= get_file_attributes( st );
+ /* convert Unix-style hidden files to a DOS hidden file attribute */
@@ -44,7 +44,7 @@ index 7c737edd22c..c6b4928bd53 100644
len = xattr_get( path, SAMBA_XATTR_DOS_ATTRIB, hexattr, sizeof(hexattr)-1 );
if (len == -1) return ret;
*attr |= get_file_xattr( hexattr, len );
@@ -2077,11 +2081,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
@@ -1684,11 +1688,6 @@ static NTSTATUS get_dir_data_entry( struct dir_data *dir_data, void *info_ptr, I
if (class != FileNamesInformation)
{
if (st.st_dev != dir_data->id.dev) st.st_ino = 0; /* ignore inode if on a different device */
@@ -56,15 +56,15 @@ index 7c737edd22c..c6b4928bd53 100644
fill_file_info( &st, attributes, info, class );
}
@@ -3838,7 +3837,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
@@ -3301,7 +3300,6 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
info->AllocationSize = std.AllocationSize;
info->EndOfFile = std.EndOfFile;
info->FileAttributes = basic.FileAttributes;
- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
}
free( unix_name );
RtlFreeAnsiString( &unix_name );
}
@@ -3865,10 +3863,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
@@ -3328,10 +3326,7 @@ NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC
else if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode))
status = STATUS_INVALID_INFO_CLASS;
else
@@ -72,7 +72,7 @@ index 7c737edd22c..c6b4928bd53 100644
status = fill_file_info( &st, attributes, info, FileBasicInformation );
- if (is_hidden_file( attr->ObjectName )) info->FileAttributes |= FILE_ATTRIBUTE_HIDDEN;
- }
free( unix_name );
RtlFreeAnsiString( &unix_name );
}
else WARN( "%s not found (%x)\n", debugstr_us(attr->ObjectName), status );
--

View File

@@ -1,4 +1,4 @@
From dd02380fff84cbef2a6df7b6f82b271e0e9d732f Mon Sep 17 00:00:00 2001
From 29e0ef12afb2651e61492a8a9f021baca4c66519 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 14 Jan 2016 23:09:19 +0100
Subject: [PATCH] ntdll: Always store SAMBA_XATTR_DOS_ATTRIB when path could be
@@ -9,11 +9,11 @@ Subject: [PATCH] ntdll: Always store SAMBA_XATTR_DOS_ATTRIB when path could be
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index c6b4928bd53..3bf82b1d45d 100644
index 9636c0efe3e..444332e7baa 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -1567,12 +1567,15 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
free( parent_path );
@@ -1561,12 +1561,15 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr )
RtlFreeHeap( GetProcessHeap(), 0, parent_path );
}
*attr |= get_file_attributes( st );
- /* convert Unix-style hidden files to a DOS hidden file attribute */
@@ -32,7 +32,7 @@ index c6b4928bd53..3bf82b1d45d 100644
*attr |= get_file_xattr( hexattr, len );
return ret;
}
@@ -3556,7 +3559,7 @@ NTSTATUS set_file_info( const char *path, ULONG attr )
@@ -3440,7 +3443,7 @@ NTSTATUS set_file_info( const char *path, ULONG attr )
/* Note: unix mode already set when called this way */
attr &= ~FILE_ATTRIBUTE_NORMAL; /* do not store everything, but keep everything Samba can use */
len = sprintf( hexattr, "0x%x", attr );

View File

@@ -0,0 +1,54 @@
From 6cf9c37c1e5b2211a61e8d61f97d46f89d86d753 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 29 May 2015 19:57:22 +0200
Subject: [PATCH] ntdll: Return fake device type when systemroot is located on
virtual disk.
---
dlls/ntdll/unix/file.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ca6899b50f5..4f35de4da97 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -6136,9 +6136,36 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io
else
{
FILE_FS_DEVICE_INFORMATION *info = buffer;
+ ANSI_STRING unix_name;
if ((io->u.Status = get_device_info( fd, info )) == STATUS_SUCCESS)
+ {
io->Information = sizeof(*info);
+
+ /* Some MSI installers complain when the SystemRoot is located
+ * on a virtual disk. Fake return values for compatibility. */
+ if (info->DeviceType == FILE_DEVICE_VIRTUAL_DISK &&
+ user_shared_data->NtSystemRoot[1] == ':' &&
+ !server_get_unix_name( handle, &unix_name ))
+ {
+ UNICODE_STRING nt_name;
+ if (!unix_to_nt_file_name( &unix_name, &nt_name ))
+ {
+ WCHAR *buf = nt_name.Buffer;
+ if (nt_name.Length >= 6 * sizeof(WCHAR) &&
+ buf[0] == '\\' && buf[1] == '?' && buf[2] == '?' && buf[3] == '\\' &&
+ buf[4] == user_shared_data->NtSystemRoot[0] && buf[5] == ':')
+ {
+ WARN( "returning fake disk type for %s\n",
+ debugstr_wn(buf, nt_name.Length/sizeof(WCHAR)) );
+ info->DeviceType = FILE_DEVICE_DISK_FILE_SYSTEM;
+ }
+ RtlFreeUnicodeString( &nt_name );
+ }
+ RtlFreeAnsiString( &unix_name );
+ }
+
+ }
}
break;
--
2.27.0

View File

@@ -0,0 +1 @@
Fixes: [36546] Return fake device type when systemroot is located on virtual disk

View File

@@ -0,0 +1,35 @@
From 980ca40adb1f4d268b42f434c353dc461df19b49 Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Thu, 9 Jan 2020 15:05:09 +0300
Subject: [PATCH] ntdll: Stop search on mmap() error in try_map_free_area().
The anon mmap errors do not depend on start address hint. Ignoring them
makes the search take incredible time until it fails.
---
dlls/ntdll/unix/virtual.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 04889113c339..088e73b17b34 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1063,8 +1063,14 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
return start;
TRACE( "Found free area is already mapped, start %p.\n", start );
- if (ptr != (void *)-1)
- munmap( ptr, size );
+ if (ptr == (void *)-1)
+ {
+ ERR("wine_anon_mmap() error %s, start %p, size %p, unix_prot %#x.\n",
+ strerror(errno), start, (void *)size, unix_prot);
+ return NULL;
+ }
+
+ munmap( ptr, size );
if ((step > 0 && (char *)end - (char *)start < step) ||
(step < 0 && (char *)start - (char *)base < -step) ||
--
2.26.2

View File

@@ -0,0 +1,51 @@
From 1aa1c57302aef175849799185f324e461161f9eb Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Thu, 16 Jan 2020 16:09:24 +0300
Subject: [PATCH] ntdll: Use MAP_FIXED_NOREPLACE flag in try_map_free_area() if
available.
Avoids actual mapping followed by unmapping back if the memory range is
already mapped.
---
dlls/ntdll/unix/virtual.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index 088e73b17b34..3907b0db70a9 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -1055,22 +1055,28 @@ static struct wine_rb_entry *find_view_inside_range( void **base_ptr, void **end
static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
void *start, size_t size, int unix_prot )
{
+#ifdef MAP_FIXED_NOREPLACE
+ static int flags = MAP_FIXED_NOREPLACE;
+#else
+ static int flags = 0;
+#endif
void *ptr;
while (start && base <= start && (char*)start + size <= (char*)end)
{
- if ((ptr = wine_anon_mmap( start, size, unix_prot, 0 )) == start)
+ if ((ptr = wine_anon_mmap( start, size, unix_prot, flags )) == start)
return start;
TRACE( "Found free area is already mapped, start %p.\n", start );
- if (ptr == (void *)-1)
+ if (ptr == (void *)-1 && errno != EEXIST)
{
ERR("wine_anon_mmap() error %s, start %p, size %p, unix_prot %#x.\n",
strerror(errno), start, (void *)size, unix_prot);
return NULL;
}
- munmap( ptr, size );
+ if (ptr != (void *)-1)
+ munmap( ptr, size );
if ((step > 0 && (char *)end - (char *)start < step) ||
(step < 0 && (char *)start - (char *)base < -step) ||
--
2.26.2

View File

@@ -1,4 +1,4 @@
From 7264548fa5272de83119327be9f7b1f2815dbc79 Mon Sep 17 00:00:00 2001
From 04a45064d81f63de64effc2748b70cf15bba5f5d Mon Sep 17 00:00:00 2001
From: Paul Gofman <pgofman@codeweavers.com>
Date: Tue, 14 Jan 2020 21:42:21 +0300
Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
@@ -8,10 +8,10 @@ Subject: [PATCH] ntdll: Use free area list for virtual memory allocation.
1 file changed, 230 insertions(+), 112 deletions(-)
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index cc7ca87241b..ec404479329 100644
index 00b29bc5d1d..667401aaa93 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -189,7 +189,11 @@ static BYTE *pages_vprot;
@@ -186,7 +186,11 @@ static BYTE *pages_vprot;
#endif
static struct file_view *view_block_start, *view_block_end, *next_free_view;
@@ -23,7 +23,7 @@ index cc7ca87241b..ec404479329 100644
static void *preload_reserve_start;
static void *preload_reserve_end;
static BOOL force_exec_prot; /* whether to force PROT_EXEC on all PROT_READ mmaps */
@@ -546,13 +550,13 @@ static struct range_entry *free_ranges_lower_bound( void *addr )
@@ -521,13 +525,13 @@ static struct range_entry *free_ranges_lower_bound( void *addr )
*
* Updates the free_ranges after a new view has been created.
*/
@@ -40,7 +40,7 @@ index cc7ca87241b..ec404479329 100644
/* free_ranges initial value is such that the view is either inside range or before another one. */
assert( range != free_ranges_end );
assert( range->end > view_base || next != free_ranges_end );
@@ -563,7 +567,7 @@ static void free_ranges_insert_view( struct file_view *view )
@@ -538,7 +542,7 @@ static void free_ranges_insert_view( struct file_view *view )
(range->end == view_base && next->base >= view_end))
{
/* on Win64, assert that it's correctly aligned so we're not going to be in trouble later */
@@ -49,7 +49,7 @@ index cc7ca87241b..ec404479329 100644
WARN( "range %p - %p is already mapped\n", view_base, view_end );
return;
}
@@ -603,6 +607,12 @@ static void free_ranges_insert_view( struct file_view *view )
@@ -578,6 +582,12 @@ static void free_ranges_insert_view( struct file_view *view )
}
}
@@ -62,7 +62,7 @@ index cc7ca87241b..ec404479329 100644
/***********************************************************************
* free_ranges_remove_view
@@ -633,6 +643,7 @@ static void free_ranges_remove_view( struct file_view *view )
@@ -608,6 +618,7 @@ static void free_ranges_remove_view( struct file_view *view )
return;
}
#endif
@@ -70,7 +70,7 @@ index cc7ca87241b..ec404479329 100644
/* free_ranges initial value is such that the view is either inside range or before another one. */
assert( range != free_ranges_end );
@@ -1008,44 +1019,6 @@ static struct file_view *find_view_range( const void *addr, size_t size )
@@ -954,44 +965,6 @@ static struct file_view *find_view_range( const void *addr, size_t size )
}
@@ -115,7 +115,7 @@ index cc7ca87241b..ec404479329 100644
/***********************************************************************
* try_map_free_area
*
@@ -1084,65 +1057,11 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
@@ -1035,65 +1008,11 @@ static void* try_map_free_area( void *base, void *end, ptrdiff_t step,
return NULL;
}
@@ -181,7 +181,7 @@ index cc7ca87241b..ec404479329 100644
*/
static void *find_reserved_free_area( void *base, void *end, size_t size, int top_down )
{
@@ -1356,8 +1275,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
@@ -1307,8 +1226,7 @@ static void delete_view( struct file_view *view ) /* [in] View */
{
if (!(view->protect & VPROT_SYSTEM)) unmap_area( view->base, view->size );
set_page_vprot( view->base, view->size, 0 );
@@ -191,7 +191,7 @@ index cc7ca87241b..ec404479329 100644
wine_rb_remove( &views_tree, &view->entry );
*(struct file_view **)view = next_free_view;
next_free_view = view;
@@ -1405,8 +1323,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz
@@ -1356,8 +1274,7 @@ static NTSTATUS create_view( struct file_view **view_ret, void *base, size_t siz
set_page_vprot( base, size, vprot );
wine_rb_put( &views_tree, view->base, &view->entry );
@@ -201,7 +201,7 @@ index cc7ca87241b..ec404479329 100644
*view_ret = view;
@@ -1651,6 +1568,7 @@ struct alloc_area
@@ -1589,6 +1506,7 @@ struct alloc_area
int top_down;
void *limit;
void *result;
@@ -209,7 +209,7 @@ index cc7ca87241b..ec404479329 100644
};
/***********************************************************************
@@ -1692,6 +1610,210 @@ static int CDECL alloc_reserved_area_callback( void *start, SIZE_T size, void *a
@@ -1630,6 +1548,210 @@ static int CDECL alloc_reserved_area_callback( void *start, SIZE_T size, void *a
return 0;
}
@@ -420,7 +420,7 @@ index cc7ca87241b..ec404479329 100644
/***********************************************************************
* map_fixed_area
*
@@ -1777,11 +1899,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -1715,11 +1837,15 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
alloc.size = size;
alloc.top_down = top_down;
alloc.limit = (void*)(get_zero_bits_64_mask( zero_bits_64 ) & (UINT_PTR)user_space_limit);
@@ -439,7 +439,7 @@ index cc7ca87241b..ec404479329 100644
}
if (mmap_enum_reserved_areas( alloc_reserved_area_callback, &alloc, top_down ))
@@ -1793,15 +1919,6 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
@@ -1731,15 +1857,6 @@ static NTSTATUS map_view( struct file_view **view_ret, void *base, size_t size,
goto done;
}
@@ -455,14 +455,14 @@ index cc7ca87241b..ec404479329 100644
view_size = size + granularity_mask + 1;
for (;;)
@@ -2456,6 +2573,7 @@ void virtual_init(void)
@@ -2392,6 +2509,7 @@ void virtual_init(void)
if (preload_reserve_start)
address_space_start = min( address_space_start, preload_reserve_start );
}
+ TRACE("preload reserve %p-%p.\n", preload_reserve_start, preload_reserve_end);
}
size = teb_size + max( MINSIGSTKSZ, 8192 );
size = ROUND_SIZE( 0, sizeof(TEB) ) + max( MINSIGSTKSZ, 8192 );
--
2.27.0

View File

@@ -1,4 +1,4 @@
From 1b79a7d8eb8c813cca81916eda14090a15b93290 Mon Sep 17 00:00:00 2001
From a64bc7c1b8d5625fcb7b1b666d95aced4009341b Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 22 Jul 2017 07:21:45 +0200
Subject: [PATCH] ntdll: Improve heap allocation performance. (v2)
@@ -8,7 +8,7 @@ Subject: [PATCH] ntdll: Improve heap allocation performance. (v2)
1 file changed, 210 insertions(+), 96 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index 4fe11fe2b48..de33fcce4bb 100644
index 3cbbff2de35..fc669d9dc4d 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -3,6 +3,7 @@
@@ -87,7 +87,7 @@ index 4fe11fe2b48..de33fcce4bb 100644
-/* Max size of the blocks on the free lists above HEAP_MAX_SMALL_FREE_LIST */
-static const SIZE_T HEAP_freeListSizes[] =
-{
- 0x200, 0x400, 0x1000, ~(SIZE_T)0
- 0x200, 0x400, 0x1000, ~0UL
-};
-#define HEAP_NB_FREE_LISTS (ARRAY_SIZE( HEAP_freeListSizes ) + HEAP_NB_SMALL_FREE_LISTS)
-

Some files were not shown because too many files have changed in this diff Show More