diff --git a/patches/advapi32-LsaLookupSids/0004-advapi32-Fallback-to-Sid-string-when-LookupAccountSi.patch b/patches/advapi32-LsaLookupSids/0004-advapi32-Fallback-to-Sid-string-when-LookupAccountSi.patch deleted file mode 100644 index 7cf47838..00000000 --- a/patches/advapi32-LsaLookupSids/0004-advapi32-Fallback-to-Sid-string-when-LookupAccountSi.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 77d43d721793edda9b419f7426442a35f0cb5918 Mon Sep 17 00:00:00 2001 -From: Qian Hong -Date: Tue, 7 Apr 2015 11:23:34 +0800 -Subject: advapi32: Fallback to Sid string when LookupAccountSid fails. - ---- - dlls/advapi32/lsa.c | 31 +++++++++++++++++++++++++++++++ - 1 file changed, 31 insertions(+) - -diff --git a/dlls/advapi32/lsa.c b/dlls/advapi32/lsa.c -index 1b270a80829..b8dedbd6d58 100644 ---- a/dlls/advapi32/lsa.c -+++ b/dlls/advapi32/lsa.c -@@ -29,6 +29,7 @@ - #include "winbase.h" - #include "winreg.h" - #include "winternl.h" -+#include "sddl.h" - #include "advapi32_misc.h" - - #include "wine/debug.h" -@@ -562,6 +563,21 @@ NTSTATUS WINAPI LsaLookupSids( - domain.MaximumLength = sizeof(WCHAR); - } - } -+ else -+ { -+ WCHAR *strsid = NULL; -+ -+ if (ConvertSidToStringSidW(Sids[i], &strsid)) -+ { -+ name_size = strlenW(strsid) + 1; -+ -+ (*Names)[i].Name.Length = (name_size - 1) * sizeof(WCHAR); -+ (*Names)[i].Name.MaximumLength = name_size * sizeof(WCHAR); -+ name_fullsize += (*Names)[i].Name.MaximumLength; -+ -+ LocalFree(strsid); -+ } -+ } - } - - /* now we have full length needed for both */ -@@ -605,6 +621,21 @@ NTSTATUS WINAPI LsaLookupSids( - (*Names)[i].DomainIndex = lsa_reflist_add_domain(*ReferencedDomains, &domain, &domain_data); - heap_free(domain.Buffer); - } -+ else -+ { -+ WCHAR *strsid = NULL; -+ -+ if (ConvertSidToStringSidW(Sids[i], &strsid)) -+ { -+ name_size = strlenW(strsid) + 1; -+ mapped++; -+ -+ (*Names)[i].Name.Buffer = name_buffer; -+ memcpy((*Names)[i].Name.Buffer, strsid, name_size * sizeof(WCHAR)); -+ -+ LocalFree(strsid); -+ } -+ } - - name_buffer += name_size; - } --- -2.11.0 - diff --git a/patches/advapi32-LsaLookupSids/0007-advapi32-Fix-name-and-use-of-DOMAIN_GROUP_RID_USERS.patch b/patches/advapi32-LsaLookupSids/0007-advapi32-Fix-name-and-use-of-DOMAIN_GROUP_RID_USERS.patch deleted file mode 100644 index 8d0ace6f..00000000 --- a/patches/advapi32-LsaLookupSids/0007-advapi32-Fix-name-and-use-of-DOMAIN_GROUP_RID_USERS.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 486ec8b5ea1b39195d92cfdbfe3a334280780a14 Mon Sep 17 00:00:00 2001 -From: Qian Hong -Date: Tue, 28 Apr 2015 23:00:08 +0800 -Subject: [PATCH] advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS. - ---- - dlls/advapi32/security.c | 7 +++++-- - dlls/advapi32/tests/security.c | 4 ++-- - 2 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c -index a7707f15d39..73c1f054d5c 100644 ---- a/dlls/advapi32/security.c -+++ b/dlls/advapi32/security.c -@@ -187,7 +187,7 @@ static const WCHAR Domain_Admins[] = { 'D','o','m','a','i','n',' ','A','d','m',' - static const WCHAR Domain_Computers[] = { 'D','o','m','a','i','n',' ','C','o','m','p','u','t','e','r','s',0 }; - static const WCHAR Domain_Controllers[] = { 'D','o','m','a','i','n',' ','C','o','n','t','r','o','l','l','e','r','s',0 }; - static const WCHAR Domain_Guests[] = { 'D','o','m','a','i','n',' ','G','u','e','s','t','s',0 }; --static const WCHAR Domain_Users[] = { 'D','o','m','a','i','n',' ','U','s','e','r','s',0 }; -+static const WCHAR None[] = { 'N','o','n','e',0 }; - static const WCHAR Enterprise_Admins[] = { 'E','n','t','e','r','p','r','i','s','e',' ','A','d','m','i','n','s',0 }; - static const WCHAR ENTERPRISE_DOMAIN_CONTROLLERS[] = { 'E','N','T','E','R','P','R','I','S','E',' ','D','O','M','A','I','N',' ','C','O','N','T','R','O','L','L','E','R','S',0 }; - static const WCHAR Everyone[] = { 'E','v','e','r','y','o','n','e',0 }; -@@ -1185,7 +1185,10 @@ LookupAccountSidW( - ac = Domain_Admins; - break; - case DOMAIN_GROUP_RID_USERS: -- ac = Domain_Users; -+ /* MSDN says the name of DOMAIN_GROUP_RID_USERS is Domain Users, -+ * tests show that MSDN seems to be wrong. */ -+ ac = None; -+ use = 2; - break; - case DOMAIN_GROUP_RID_GUESTS: - ac = Domain_Guests; -diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c -index 5f65ed385dd..a9d745cfe39 100644 ---- a/dlls/advapi32/tests/security.c -+++ b/dlls/advapi32/tests/security.c -@@ -3003,11 +3003,11 @@ static void test_process_security(void) - dom_size = sizeof(domain); - ret = LookupAccountSidA( NULL, UsersSid, account, &acc_size, domain, &dom_size, &use ); - ok(ret, "LookupAccountSid failed with %d\n", ret); -- todo_wine ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use); -+ ok(use == SidTypeGroup, "expect SidTypeGroup, got %d\n", use); - if (PRIMARYLANGID(GetSystemDefaultLangID()) != LANG_ENGLISH) - skip("Non-English locale (test with hardcoded 'None')\n"); - else -- todo_wine ok(!strcmp(account, "None"), "expect None, got %s\n", account); -+ ok(!strcmp(account, "None"), "expect None, got %s\n", account); - - res = GetTokenInformation( token, TokenUser, NULL, 0, &size ); - ok(!res, "Expected failure, got %d\n", res); --- -2.17.1 - diff --git a/patches/advapi32-LsaLookupSids/definition b/patches/advapi32-LsaLookupSids/definition deleted file mode 100644 index 322844a9..00000000 --- a/patches/advapi32-LsaLookupSids/definition +++ /dev/null @@ -1,3 +0,0 @@ -# Originally sent 2015 April by Qian Hong, apparently dropped off the list: -# -# Some of the patches were labeled as for Cygwin. \ No newline at end of file diff --git a/patches/gdiplus-FontFamily-RefCount/0001-gdiplus-Use-refcounting-for-GpFontFamily-instead-of-.patch b/patches/gdiplus-FontFamily-RefCount/0001-gdiplus-Use-refcounting-for-GpFontFamily-instead-of-.patch deleted file mode 100644 index 92dac246..00000000 --- a/patches/gdiplus-FontFamily-RefCount/0001-gdiplus-Use-refcounting-for-GpFontFamily-instead-of-.patch +++ /dev/null @@ -1,213 +0,0 @@ -From d668ed8e163bb76577bd43727574c3f2a2653c24 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Wed, 18 Dec 2019 15:14:05 +0800 -Subject: [PATCH] gdiplus: Use refcounting for GpFontFamily instead of - cloning. - -.Net 4.7+ depends on this behaviour. - -Signed-off-by: Dmitry Timoshkov ---- - dlls/gdiplus/font.c | 38 ++++++++++++----------- - dlls/gdiplus/gdiplus_private.h | 1 + - dlls/gdiplus/tests/font.c | 57 +++++++++++++++++++++++++++++++++- - 3 files changed, 77 insertions(+), 19 deletions(-) - -diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c -index eee272082f1..bc4fd2281f5 100644 ---- a/dlls/gdiplus/font.c -+++ b/dlls/gdiplus/font.c -@@ -115,8 +115,6 @@ typedef struct - #define MS_OS2_TAG MS_MAKE_TAG('O','S','/','2') - #define MS_HHEA_TAG MS_MAKE_TAG('h','h','e','a') - --static GpStatus clone_font_family(const GpFontFamily *, GpFontFamily **); -- - static GpFontCollection installedFontCollection = {0}; - - /******************************************************************************* -@@ -183,13 +181,8 @@ GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily, - (*font)->unit = unit; - (*font)->emSize = emSize; - (*font)->otm = otm; -- -- stat = clone_font_family(fontFamily, &(*font)->family); -- if (stat != Ok) -- { -- heap_free(*font); -- return stat; -- } -+ (*font)->family = (GpFontFamily *)fontFamily; -+ InterlockedIncrement(&(*font)->family->ref); - - TRACE("<-- %p\n", *font); - -@@ -322,7 +315,10 @@ GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family) - if (!(font && family)) - return InvalidParameter; - -- return GdipCloneFontFamily(font->family, family); -+ InterlockedIncrement(&font->family->ref); -+ *family = font->family; -+ -+ return Ok; - } - - static REAL get_font_size(const GpFont *font) -@@ -518,8 +514,6 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW - */ - GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont) - { -- GpStatus stat; -- - TRACE("(%p, %p)\n", font, cloneFont); - - if(!font || !cloneFont) -@@ -529,10 +523,10 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont) - if(!*cloneFont) return OutOfMemory; - - **cloneFont = *font; -- stat = GdipCloneFontFamily(font->family, &(*cloneFont)->family); -- if (stat != Ok) heap_free(*cloneFont); -+ InterlockedIncrement(&font->family->ref); -+ (*cloneFont)->family = font->family; - -- return stat; -+ return Ok; - } - - /******************************************************************************* -@@ -769,6 +763,7 @@ GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name, - ffamily->descent = fm.descent; - ffamily->line_spacing = fm.line_spacing; - ffamily->dpi = fm.dpi; -+ ffamily->ref = 1; - - *FontFamily = ffamily; - -@@ -783,6 +778,7 @@ static GpStatus clone_font_family(const GpFontFamily *family, GpFontFamily **clo - if (!*clone) return OutOfMemory; - - **clone = *family; -+ (*clone)->ref = 1; - - return Ok; - } -@@ -867,11 +863,17 @@ GpStatus WINGDIPAPI GdipGetFamilyName (GDIPCONST GpFontFamily *family, - */ - GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily) - { -- if (!FontFamily) -+ LONG ref; -+ -+ if (!FontFamily || !FontFamily->ref) - return InvalidParameter; -- TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName)); - -- heap_free (FontFamily); -+ ref = InterlockedDecrement(&FontFamily->ref); -+ if (!ref) -+ { -+ TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName)); -+ heap_free(FontFamily); -+ } - - return Ok; - } -diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h -index 8c4fccededa..6b48c360e60 100644 ---- a/dlls/gdiplus/gdiplus_private.h -+++ b/dlls/gdiplus/gdiplus_private.h -@@ -518,6 +518,7 @@ struct GpFontCollection{ - }; - - struct GpFontFamily{ -+ LONG ref; - WCHAR FamilyName[LF_FACESIZE]; - UINT16 em_height, ascent, descent, line_spacing; /* in font units */ - int dpi; -diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c -index 33b75c5bc52..3cada58e394 100644 ---- a/dlls/gdiplus/tests/font.c -+++ b/dlls/gdiplus/tests/font.c -@@ -141,7 +141,6 @@ static void test_createfont(void) - expect(Ok, stat); - stat = GdipGetFamilyName(fontfamily2, familyname, 0); - expect(Ok, stat); --todo_wine - ok (fontfamily == fontfamily2, "Unexpected family instance.\n"); - ok (lstrcmpiW(Tahoma, familyname) == 0, "Expected Tahoma, got %s\n", - wine_dbgstr_w(familyname)); -@@ -1282,6 +1281,61 @@ static void test_GdipGetFontCollectionFamilyCount(void) - ok(status == InvalidParameter, "Unexpected status %d.\n", status); - } - -+static void test_CloneFont(void) -+{ -+ GpStatus status; -+ GpFont *font, *font2; -+ GpFontFamily *family, *family2; -+ REAL height; -+ Unit unit; -+ int style; -+ -+ status = GdipCreateFontFamilyFromName(Tahoma, NULL, &family); -+ expect(Ok, status); -+ -+ status = GdipCreateFont(family, 30.0f, FontStyleRegular, UnitPixel, &font); -+ expect(Ok, status); -+ -+ status = GdipGetFontUnit(font, &unit); -+ expect(Ok, status); -+ ok(unit == UnitPixel, "got %u\n", unit); -+ -+ status = GdipGetFontSize(font, &height); -+ expect(Ok, status); -+ ok(height == 30.0f, "got %f\n", height); -+ -+ status = GdipGetFontStyle(font, &style); -+ expect(Ok, status); -+ ok(style == FontStyleRegular, "got %d\n", style); -+ -+ status = GdipGetFamily(font, &family2); -+ expect(Ok, status); -+ ok(family == family2, "got %p\n", family2); -+ -+ status = GdipCloneFont(font, &font2); -+ expect(Ok, status); -+ -+ status = GdipGetFontUnit(font2, &unit); -+ expect(Ok, status); -+ ok(unit == UnitPixel, "got %u\n", unit); -+ -+ status = GdipGetFontSize(font2, &height); -+ expect(Ok, status); -+ ok(height == 30.0f, "got %f\n", height); -+ -+ status = GdipGetFontStyle(font2, &style); -+ expect(Ok, status); -+ ok(style == FontStyleRegular, "got %d\n", style); -+ -+ status = GdipGetFamily(font2, &family2); -+ expect(Ok, status); -+ ok(family == family2, "got %p\n", family2); -+ -+ GdipDeleteFont(font2); -+ GdipDeleteFont(font); -+ GdipDeleteFontFamily(family); -+} -+ - START_TEST(font) - { - struct GdiplusStartupInput gdiplusStartupInput; -@@ -1301,6 +1355,7 @@ START_TEST(font) - - GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - -+ test_CloneFont(); - test_long_name(); - test_font_transform(); - test_font_substitution(); --- -2.24.1 - diff --git a/patches/gdiplus-FontFamily-RefCount/definition b/patches/gdiplus-FontFamily-RefCount/definition deleted file mode 100644 index 93226013..00000000 --- a/patches/gdiplus-FontFamily-RefCount/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [48489] gdiplus: Reference cound the GpFontFamily object. diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 276cfdd8..5650c45c 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "1bb953c6766c9cc4372ca23a7c5b7de101324218" + echo "bdf8d94e2a40f82c618ba5587cc82382c5230ac0" } # Show version information @@ -89,7 +89,6 @@ patch_enable_all () enable_activeds_ADsOpenObject="$1" enable_advapi32_CreateRestrictedToken="$1" enable_advapi32_LsaLookupPrivilegeName="$1" - enable_advapi32_LsaLookupSids="$1" enable_advapi32_Token_Integrity_Level="$1" enable_api_ms_win_Stub_DLLs="$1" enable_atl_AtlAxDialogBox="$1" @@ -149,7 +148,6 @@ patch_enable_all () enable_fsutil_Stub_Program="$1" enable_gdi32_Lazy_Font_Initialization="$1" enable_gdi32_rotation="$1" - enable_gdiplus_FontFamily_RefCount="$1" enable_gdiplus_Performance_Improvements="$1" enable_imagehlp_BindImageEx="$1" enable_imm32_message_on_focus="$1" @@ -392,9 +390,6 @@ patch_enable () advapi32-LsaLookupPrivilegeName) enable_advapi32_LsaLookupPrivilegeName="$2" ;; - advapi32-LsaLookupSids) - enable_advapi32_LsaLookupSids="$2" - ;; advapi32-Token_Integrity_Level) enable_advapi32_Token_Integrity_Level="$2" ;; @@ -572,9 +567,6 @@ patch_enable () gdi32-rotation) enable_gdi32_rotation="$2" ;; - gdiplus-FontFamily-RefCount) - enable_gdiplus_FontFamily_RefCount="$2" - ;; gdiplus-Performance-Improvements) enable_gdiplus_Performance_Improvements="$2" ;; @@ -2203,20 +2195,6 @@ if test "$enable_advapi32_LsaLookupPrivilegeName" -eq 1; then ) >> "$patchlist" fi -# Patchset advapi32-LsaLookupSids -# | -# | Modified files: -# | * dlls/advapi32/lsa.c, dlls/advapi32/security.c, dlls/advapi32/tests/security.c -# | -if test "$enable_advapi32_LsaLookupSids" -eq 1; then - patch_apply advapi32-LsaLookupSids/0004-advapi32-Fallback-to-Sid-string-when-LookupAccountSi.patch - patch_apply advapi32-LsaLookupSids/0007-advapi32-Fix-name-and-use-of-DOMAIN_GROUP_RID_USERS.patch - ( - printf '%s\n' '+ { "Qian Hong", "advapi32: Fallback to Sid string when LookupAccountSid fails.", 1 },'; - printf '%s\n' '+ { "Qian Hong", "advapi32: Fix name and use of DOMAIN_GROUP_RID_USERS.", 1 },'; - ) >> "$patchlist" -fi - # Patchset advapi32-Token_Integrity_Level # | # | This patchset has the following (direct or indirect) dependencies: @@ -4102,21 +4080,6 @@ if test "$enable_gdi32_rotation" -eq 1; then ) >> "$patchlist" fi -# Patchset gdiplus-FontFamily-RefCount -# | -# | This patchset fixes the following Wine bugs: -# | * [#48489] gdiplus: Reference cound the GpFontFamily object. -# | -# | Modified files: -# | * dlls/gdiplus/font.c, dlls/gdiplus/gdiplus_private.h, dlls/gdiplus/tests/font.c -# | -if test "$enable_gdiplus_FontFamily_RefCount" -eq 1; then - patch_apply gdiplus-FontFamily-RefCount/0001-gdiplus-Use-refcounting-for-GpFontFamily-instead-of-.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "gdiplus: Use refcounting for GpFontFamily instead of cloning.", 1 },'; - ) >> "$patchlist" -fi - # Patchset gdiplus-Performance-Improvements # | # | Modified files: