Rebase against e08ed6cac218fc09044d06d3cbe2a54f7ec898cf.

This commit is contained in:
Sebastian Lackner 2017-02-04 07:47:58 +01:00
parent e374d7a750
commit e4754f827a
5 changed files with 10 additions and 105 deletions

View File

@ -1,4 +1,4 @@
From 616c17cc58a4943d3a367704943e737d5713740d Mon Sep 17 00:00:00 2001
From 77d43d721793edda9b419f7426442a35f0cb5918 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Tue, 7 Apr 2015 11:23:34 +0800
Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
@ -8,7 +8,7 @@ Subject: advapi32: Fallback to Sid string when LookupAccountSid fails.
1 file changed, 31 insertions(+)
diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c
index 258b8ca..93afa20 100644
index 1b270a80829..b8dedbd6d58 100644
--- a/dlls/advapi32/lsa.c
+++ b/dlls/advapi32/lsa.c
@@ -29,6 +29,7 @@
@ -19,8 +19,8 @@ index 258b8ca..93afa20 100644
#include "advapi32_misc.h"
#include "wine/debug.h"
@@ -554,6 +555,21 @@ NTSTATUS WINAPI LsaLookupSids(
heap_free(name);
@@ -562,6 +563,21 @@ NTSTATUS WINAPI LsaLookupSids(
domain.MaximumLength = sizeof(WCHAR);
}
}
+ else
@ -41,9 +41,9 @@ index 258b8ca..93afa20 100644
}
/* now we have full length needed for both */
@@ -593,6 +609,21 @@ NTSTATUS WINAPI LsaLookupSids(
heap_free(domain.Buffer);
}
@@ -605,6 +621,21 @@ NTSTATUS WINAPI LsaLookupSids(
(*Names)[i].DomainIndex = lsa_reflist_add_domain(*ReferencedDomains, &domain, &domain_data);
heap_free(domain.Buffer);
}
+ else
+ {
@ -64,5 +64,5 @@ index 258b8ca..93afa20 100644
name_buffer += name_size;
}
--
2.3.5
2.11.0

View File

@ -1,27 +0,0 @@
From d386a3724eac666427f7f176e7209f74e1b98885 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 15 Jan 2017 18:59:10 +0100
Subject: msvideo16: Check if any 16 bit thunks have been allocated before
accessing pointer.
---
dlls/msvideo.dll16/msvideo16.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/msvideo.dll16/msvideo16.c b/dlls/msvideo.dll16/msvideo16.c
index 8f02cc1ebc8..5a3b8aa74ee 100644
--- a/dlls/msvideo.dll16/msvideo16.c
+++ b/dlls/msvideo.dll16/msvideo16.c
@@ -762,6 +762,9 @@ static struct msvideo_thunk* MSVIDEO_HasThunk(HIC16 hic)
{
struct msvideo_thunk* thunk;
+ if (!MSVIDEO_Thunks)
+ return NULL;
+
for (thunk = MSVIDEO_Thunks; thunk < &MSVIDEO_Thunks[MAX_THUNKS]; thunk++)
{
if (thunk->hIC16 == hic) return thunk;
--
2.11.0

View File

@ -1 +0,0 @@
Fixes: [41448] Check if any 16 bit thunks have been allocated before accessing pointer

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "2a28e4d843ec5302f53a3168061fdf2ca30eb076"
echo "e08ed6cac218fc09044d06d3cbe2a54f7ec898cf"
}
# Show version information
@ -213,7 +213,6 @@ patch_enable_all ()
enable_msvcr120__SetWinRTOutOfMemoryExceptionCallback="$1"
enable_msvcrt_Math_Precision="$1"
enable_msvfw32_ICGetDisplayFormat="$1"
enable_msvideo16_HasThunk="$1"
enable_ntdll_APC_Performance="$1"
enable_ntdll_APC_Start_Process="$1"
enable_ntdll_Activation_Context="$1"
@ -846,9 +845,6 @@ patch_enable ()
msvfw32-ICGetDisplayFormat)
enable_msvfw32_ICGetDisplayFormat="$2"
;;
msvideo16-HasThunk)
enable_msvideo16_HasThunk="$2"
;;
ntdll-APC_Performance)
enable_ntdll_APC_Performance="$2"
;;
@ -5029,21 +5025,6 @@ if test "$enable_msvfw32_ICGetDisplayFormat" -eq 1; then
) >> "$patchlist"
fi
# Patchset msvideo16-HasThunk
# |
# | This patchset fixes the following Wine bugs:
# | * [#41448] Check if any 16 bit thunks have been allocated before accessing pointer
# |
# | Modified files:
# | * dlls/msvideo.dll16/msvideo16.c
# |
if test "$enable_msvideo16_HasThunk" -eq 1; then
patch_apply msvideo16-HasThunk/0001-msvideo16-Check-if-any-16-bit-thunks-have-been-alloc.patch
(
printf '%s\n' '+ { "Michael Müller", "msvideo16: Check if any 16 bit thunks have been allocated before accessing pointer.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-APC_Performance
# |
# | Modified files:
@ -6408,7 +6389,7 @@ fi
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, include/wine/port.h, server/change.c, server/file.c, server/file.h, server/handle.c,
# | server/object.c, server/object.h, server/token.c
# | server/object.c, server/object.h
# |
if test "$enable_server_Stored_ACLs" -eq 1; then
patch_apply server-Stored_ACLs/0001-server-Unify-the-storage-of-security-attributes-for-.patch
@ -6418,7 +6399,6 @@ if test "$enable_server_Stored_ACLs" -eq 1; then
patch_apply server-Stored_ACLs/0005-server-Store-file-security-attributes-with-extended-.patch
patch_apply server-Stored_ACLs/0006-server-Convert-return-of-file-security-masks-with-ge.patch
patch_apply server-Stored_ACLs/0007-server-Retrieve-file-security-attributes-with-extend.patch
patch_apply server-Stored_ACLs/0008-server-Fix-handling-of-MAXIMUM_ALLOWED-in-token_acce.patch
patch_apply server-Stored_ACLs/0009-server-Give-all-access-rights-when-opening-an-object.patch
(
printf '%s\n' '+ { "Erich E. Hoover", "server: Unify the storage of security attributes for files and directories.", 7 },';
@ -6428,7 +6408,6 @@ if test "$enable_server_Stored_ACLs" -eq 1; then
printf '%s\n' '+ { "Erich E. Hoover", "server: Store file security attributes with extended file attributes.", 8 },';
printf '%s\n' '+ { "Erich E. Hoover", "server: Convert return of file security masks with generic access mappings.", 7 },';
printf '%s\n' '+ { "Erich E. Hoover", "server: Retrieve file security attributes with extended file attributes.", 7 },';
printf '%s\n' '+ { "Sebastian Lackner", "server: Fix handling of MAXIMUM_ALLOWED in token_access_check.", 1 },';
printf '%s\n' '+ { "Michael Müller", "server: Give all access rights when opening an object with MAXIMUM_ALLOWED.", 1 },';
) >> "$patchlist"
fi

View File

@ -1,46 +0,0 @@
From f85560693bd9a615e9c1b1ff2eabda967389dd32 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 16 Oct 2016 01:50:17 +0200
Subject: server: Fix handling of MAXIMUM_ALLOWED in token_access_check.
---
dlls/advapi32/tests/security.c | 6 ++++++
server/token.c | 5 ++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 403c04a..9fbe33e 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -1378,6 +1378,12 @@ static void test_AccessCheck(void)
ok(AccessStatus && (Access == KEY_READ),
"AccessCheck failed to grant access with error %d\n",
GetLastError());
+ ret = AccessCheck(SecurityDescriptor, Token, MAXIMUM_ALLOWED, &Mapping,
+ PrivSet, &PrivSetLen, &Access, &AccessStatus);
+ ok(ret, "AccessCheck failed with error %d\n", GetLastError());
+ ok(AccessStatus && (Access == KEY_ALL_ACCESS),
+ "AccessCheck failed to grant access with error %d\n",
+ GetLastError());
/* sd with blank dacl */
ret = SetSecurityDescriptorDacl(SecurityDescriptor, TRUE, Acl, FALSE);
diff --git a/server/token.c b/server/token.c
index f77ca2c..b903420 100644
--- a/server/token.c
+++ b/server/token.c
@@ -854,7 +854,10 @@ static unsigned int token_access_check( struct token *token,
if (!dacl_present || !dacl)
{
if (priv_count) *priv_count = 0;
- *granted_access = desired_access;
+ if (desired_access & MAXIMUM_ALLOWED)
+ *granted_access = mapping->GenericAll;
+ else
+ *granted_access = desired_access;
return *status = STATUS_SUCCESS;
}
--
2.9.0