Added patch to initialize System\CurrentControlSet\Control\TimeZoneInformation registry keys.

This commit is contained in:
Sebastian Lackner 2015-06-06 03:50:17 +02:00
parent 9149fde0ff
commit 16d40cf5d5
6 changed files with 190 additions and 67 deletions

View File

@ -39,14 +39,16 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [10]:**
**Bug fixes and features included in the next upcoming release [12]:**
* Add implementation for kernel32.GetNumaProcessorNode ([Wine Bug #38660](https://bugs.winehq.org/show_bug.cgi?id=38660))
* Allow to enable/disable InsertMode in wineconsole settings ([Wine Bug #38697](https://bugs.winehq.org/show_bug.cgi?id=38697))
* Allow to set pixel format for desktop window
* Implement mscoree._CorValidateImage for mono runtime ([Wine Bug #38662](https://bugs.winehq.org/show_bug.cgi?id=38662))
* Implement proper handling of CLI .NET images in Wine library loader ([Wine Bug #38661](https://bugs.winehq.org/show_bug.cgi?id=38661))
* Initialize System\CurrentControlSet\Control\TimeZoneInformation registry keys
* Multiple applications needs better NtQueryInformationJobObject stub
* Return proper status codes when NtReadFile/NtWriteFile is called on closed (but not disconnected) pipe
* Set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe in NtQueryInformationFile
* Support for AT_ROUND_TO_PAGE flag in NtMapViewOfSection
* Support for NtSetInformationFile class FileLinkInformation

2
debian/changelog vendored
View File

@ -28,6 +28,8 @@ wine-staging (1.7.45) UNRELEASED; urgency=low
Wine Staging Bug 347).
* Added patches to fix error code for ReadFile/WriteFile on closed pipe (fixes
Wine Staging Bug #348).
* Added patch to initialize
System\CurrentControlSet\Control\TimeZoneInformation registry keys.
* Removed patch to handle '\r' as whitespace in wbemprox queries (accepted
upstream).
* Removed patch to make sure OpenClipboard with current owner doesn't fail

View File

@ -2,5 +2,6 @@ Fixes: [16550] Fix for ConnectNamedPort return value in overlapped mode
Fixes: [17195] Support for named pipe message mode (Linux only)
Fixes: Improve ReadDataAvailable handling in FilePipeLocalInformation class
Fixes: Set NamedPipeState to FILE_PIPE_CLOSING_STATE on broken pipe in NtQueryInformationFile
FIxes: Return proper status codes when NtReadFile/NtWriteFile is called on closed (but not disconnected) pipe
Depends: rpcrt4-Pipe_Transport
Category: stable

View File

@ -0,0 +1,101 @@
From accdfe8f540d28911a56df946bee00d589778b2a Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Sat, 6 Jun 2015 09:24:00 +0800
Subject: kernel32: Init TimezoneInformation registry.
---
dlls/kernel32/kernel_main.c | 3 +++
dlls/kernel32/kernel_private.h | 3 +++
dlls/kernel32/time.c | 48 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+)
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index e24100b..d3420ec 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -88,6 +88,9 @@ static BOOL process_attach( HMODULE module )
/* Setup registry locale information */
LOCALE_InitRegistry();
+ /* Setup registry timezone information */
+ TIMEZONE_InitRegistry();
+
/* Setup computer name */
COMPUTERNAME_Init();
diff --git a/dlls/kernel32/kernel_private.h b/dlls/kernel32/kernel_private.h
index 76611d7..2d4ba02 100644
--- a/dlls/kernel32/kernel_private.h
+++ b/dlls/kernel32/kernel_private.h
@@ -104,6 +104,9 @@ extern void COMPUTERNAME_Init(void) DECLSPEC_HIDDEN;
extern void LOCALE_Init(void) DECLSPEC_HIDDEN;
extern void LOCALE_InitRegistry(void) DECLSPEC_HIDDEN;
+/* time.c */
+extern void TIMEZONE_InitRegistry(void) DECLSPEC_HIDDEN;
+
/* oldconfig.c */
extern void convert_old_config(void) DECLSPEC_HIDDEN;
diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index daafc7f..43c2f80 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -581,6 +581,54 @@ static void TIME_ClockTimeToFileTime(clock_t unix_time, LPFILETIME filetime)
filetime->dwHighDateTime = (DWORD)(secs >> 32);
}
+/***********************************************************************
+ * TIMEZONE_InitRegistry
+ *
+ * Update registry contents on startup if the user timezone has changed.
+ * This simulates the action of the Windows control panel.
+ */
+void TIMEZONE_InitRegistry(void)
+{
+ static const WCHAR szTimezoneInformation[] = {
+ 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\',
+ 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
+ 'C','o','n','t','r','o','l','\\',
+ 'T','i','m','e','Z','o','n','e','I','n','f','o','r','m','a','t','i','o','n','\0'
+ };
+ WCHAR standardnameW[] = {'S','t','a','n','d','a','r','d','N','a','m','e','\0'};
+ WCHAR timezonekeynameW[] = {'T','i','m','e','Z','o','n','e','K','e','y','N','a','m','e','\0'};
+ DYNAMIC_TIME_ZONE_INFORMATION tzinfo;
+ UNICODE_STRING keyName;
+ OBJECT_ATTRIBUTES attr;
+ HANDLE hkey;
+ DWORD tzid;
+
+ tzid = GetDynamicTimeZoneInformation(&tzinfo);
+ if (tzid == TIME_ZONE_ID_INVALID)
+ {
+ ERR("fail to get timezone information.\n");
+ return;
+ }
+
+ RtlInitUnicodeString(&keyName, szTimezoneInformation);
+ InitializeObjectAttributes(&attr, &keyName, 0, 0, NULL);
+ if (NtCreateKey(&hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL) != STATUS_SUCCESS)
+ {
+ ERR("fail to create timezone information key.\n");
+ return;
+ }
+
+ RtlInitUnicodeString(&keyName, standardnameW);
+ NtSetValueKey(hkey, &keyName, 0, REG_SZ, tzinfo.StandardName,
+ (strlenW(tzinfo.StandardName) + 1) * sizeof(WCHAR));
+
+ RtlInitUnicodeString(&keyName, timezonekeynameW);
+ NtSetValueKey(hkey, &keyName, 0, REG_SZ, tzinfo.TimeZoneKeyName,
+ (strlenW(tzinfo.TimeZoneKeyName) + 1) * sizeof(WCHAR));
+
+ NtClose( hkey );
+}
+
/*********************************************************************
* GetProcessTimes (KERNEL32.@)
*
--
2.4.2

View File

@ -0,0 +1 @@
Fixes: Initialize System\CurrentControlSet\Control\TimeZoneInformation registry keys

View File

@ -143,6 +143,7 @@ patch_enable_all ()
enable_kernel32_Profile="$1"
enable_kernel32_SetFileCompletionNotificationMode="$1"
enable_kernel32_SetFileInformationByHandle="$1"
enable_kernel32_TimezoneInformation_Registry="$1"
enable_kernel32_VerifyVersionInfo="$1"
enable_libs_Debug_Channel="$1"
enable_libs_Unicode_Collation="$1"
@ -498,6 +499,9 @@ patch_enable ()
kernel32-SetFileInformationByHandle)
enable_kernel32_SetFileInformationByHandle="$2"
;;
kernel32-TimezoneInformation_Registry)
enable_kernel32_TimezoneInformation_Registry="$2"
;;
kernel32-VerifyVersionInfo)
enable_kernel32_VerifyVersionInfo="$2"
;;
@ -1824,13 +1828,6 @@ if test "$enable_kernel32_CopyFileEx" -eq 1; then
enable_ntdll_FileDispositionInformation=1
fi
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
if test "$enable_kernel32_SetFileCompletionNotificationMode" -gt 1; then
abort "Patchset kernel32-SetFileCompletionNotificationMode disabled, but kernel32-SetFileInformationByHandle depends on that."
fi
enable_kernel32_SetFileCompletionNotificationMode=1
fi
if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
if test "$enable_server_File_Permissions" -gt 1; then
abort "Patchset server-File_Permissions disabled, but ntdll-FileDispositionInformation depends on that."
@ -1838,6 +1835,13 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
enable_server_File_Permissions=1
fi
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
if test "$enable_kernel32_SetFileCompletionNotificationMode" -gt 1; then
abort "Patchset kernel32-SetFileCompletionNotificationMode disabled, but kernel32-SetFileInformationByHandle depends on that."
fi
enable_kernel32_SetFileCompletionNotificationMode=1
fi
if test "$enable_dxva2_Video_Decoder" -eq 1; then
if test "$enable_winecfg_Staging" -gt 1; then
abort "Patchset winecfg-Staging disabled, but dxva2-Video_Decoder depends on that."
@ -2040,6 +2044,23 @@ if test "$enable_Staging" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Misc_ACL
# |
# | This patchset fixes the following Wine bugs:
# | * [#15980] GetSecurityInfo returns NULL DACL for process object
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c
# |
if test "$enable_server_Misc_ACL" -eq 1; then
patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch
patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch
(
echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },';
echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },';
) >> "$patchlist"
fi
# Patchset server-CreateProcess_ACLs
# |
# | This patchset fixes the following Wine bugs:
@ -2059,23 +2080,6 @@ if test "$enable_server_CreateProcess_ACLs" -eq 1; then
) >> "$patchlist"
fi
# Patchset server-Misc_ACL
# |
# | This patchset fixes the following Wine bugs:
# | * [#15980] GetSecurityInfo returns NULL DACL for process object
# |
# | Modified files:
# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c
# |
if test "$enable_server_Misc_ACL" -eq 1; then
patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch
patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch
(
echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },';
echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },';
) >> "$patchlist"
fi
# Patchset advapi32-LsaLookupSids
# |
# | Modified files:
@ -2946,6 +2950,36 @@ if test "$enable_kernel32_CompareStringEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileCompletionNotificationMode
# |
# | This patchset fixes the following Wine bugs:
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
# |
# | Modified files:
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
# | dlls/kernel32/kernel32.spec, include/winbase.h
# |
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
(
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset server-File_Permissions
# |
# | Modified files:
@ -3009,36 +3043,6 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileCompletionNotificationMode
# |
# | This patchset fixes the following Wine bugs:
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
# |
# | Modified files:
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
# | dlls/kernel32/kernel32.spec, include/winbase.h
# |
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
(
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-CopyFileEx
# |
# | This patchset fixes the following Wine bugs:
@ -3242,6 +3246,18 @@ if test "$enable_kernel32_Profile" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-TimezoneInformation_Registry
# |
# | Modified files:
# | * dlls/kernel32/kernel_main.c, dlls/kernel32/kernel_private.h, dlls/kernel32/time.c
# |
if test "$enable_kernel32_TimezoneInformation_Registry" -eq 1; then
patch_apply kernel32-TimezoneInformation_Registry/0001-kernel32-Init-TimezoneInformation-registry.patch
(
echo '+ { "Qian Hong", "kernel32: Init TimezoneInformation registry.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-VerifyVersionInfo
# |
# | This patchset fixes the following Wine bugs:
@ -5051,6 +5067,18 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-resource_check_usage
# |
# | Modified files:
# | * dlls/wined3d/resource.c
# |
if test "$enable_wined3d_resource_check_usage" -eq 1; then
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
(
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
) >> "$patchlist"
fi
# Patchset wined3d-wined3d_swapchain_present
# |
# | Modified files:
@ -5124,18 +5152,6 @@ if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-resource_check_usage
# |
# | Modified files:
# | * dlls/wined3d/resource.c
# |
if test "$enable_wined3d_resource_check_usage" -eq 1; then
patch_apply wined3d-resource_check_usage/0001-wined3d-Silence-repeated-resource_check_usage-FIXME.patch
(
echo '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset fixes the following Wine bugs: