winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2011
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
849 discussions
Start a n
N
ew thread
Hans Leidekker : msi: Make sure to access the 64-bit portion of the registry where needed on Wow64 .
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 881ff642a2130df414c022305ff06dabbeda9e95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=881ff642a2130df414c022305…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:32:21 2011 +0200 msi: Make sure to access the 64-bit portion of the registry where needed on Wow64. --- dlls/msi/registry.c | 600 +++++++++++++++++++++------------------------------ 1 files changed, 247 insertions(+), 353 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=881ff642a2130df414c02…
1
0
0
0
Hans Leidekker : msi/tests: Remove unneeded Wow64 checks.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: a0a7a7fc3d5548a1b9b402c4fd46072ea2b53e2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0a7a7fc3d5548a1b9b402c4f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:57 2011 +0200 msi/tests: Remove unneeded Wow64 checks. --- dlls/msi/tests/action.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 70fd066..2643e39 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -2546,7 +2546,7 @@ static void test_register_product(void) res = RegOpenKeyA(HKEY_CURRENT_USER, userugkey, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall_32node, 0, KEY_ALL_ACCESS, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -2653,7 +2653,7 @@ static void test_register_product(void) res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, userugkey, 0, access, &hkey); ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, uninstall_32node, 0, KEY_ALL_ACCESS, &hkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3616,7 +3616,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3699,7 +3699,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3759,7 +3759,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3819,7 +3819,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -3902,7 +3902,7 @@ static void test_publish(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(uninstall_32node, prodcode, 0, KEY_ALL_ACCESS, &prodkey); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -4550,7 +4550,7 @@ static void test_write_registry_values(void) ok(delete_pf("msitest\\augustus", TRUE), "File installed\n"); ok(delete_pf("msitest", FALSE), "File installed\n"); - if (is_64bit && !is_wow64) + if (is_64bit) res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wow6432Node\\Wine\\msitest", 0, KEY_ALL_ACCESS, &hkey); else res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest", 0, KEY_ALL_ACCESS, &hkey); @@ -5318,7 +5318,7 @@ static void test_remove_registry_values(void) ok(res == ERROR_SUCCESS, "key removed\n"); RegCloseKey(key); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\key2", 0, KEY_ALL_ACCESS, &key); ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); @@ -5336,7 +5336,7 @@ static void test_remove_registry_values(void) r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\key1", 0, KEY_ALL_ACCESS, &key); ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); @@ -5355,7 +5355,7 @@ static void test_remove_registry_values(void) ok(res == ERROR_SUCCESS, "key removed\n"); RegCloseKey(key); - if (is_64bit && !is_wow64) + if (is_64bit) { res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Wine\\keyB", 0, KEY_ALL_ACCESS, &key); ok(res == ERROR_FILE_NOT_FOUND, "key not removed\n"); @@ -5649,7 +5649,7 @@ static void test_register_class_info(void) } ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - if (is_64bit && !is_wow64) + if (is_64bit) res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); else res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); @@ -5667,7 +5667,7 @@ static void test_register_class_info(void) r = MsiInstallProductA(msifile, "REMOVE=ALL"); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); - if (is_64bit && !is_wow64) + if (is_64bit) res = RegOpenKeyA(HKEY_CLASSES_ROOT, "Wow6432Node\\CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey); else res = RegOpenKeyA(HKEY_CLASSES_ROOT, "CLSID\\{110913E7-86D1-4BF3-9922-BA103FCDDDFA}", &hkey);
1
0
0
0
Hans Leidekker : msi: Implement MsiGetFileSignatureInformationA/W.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: f3f25af9002d4f3386f1eb372173b80ace4cf164 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f3f25af9002d4f3386f1eb372…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:35 2011 +0200 msi: Implement MsiGetFileSignatureInformationA/W. --- dlls/msi/Makefile.in | 2 +- dlls/msi/msi.c | 80 +++++++++++++++++++++++++++++++++++++++++--------- dlls/msi/tests/msi.c | 43 ++++++++++++++++++++++++++- 3 files changed, 109 insertions(+), 16 deletions(-) diff --git a/dlls/msi/Makefile.in b/dlls/msi/Makefile.in index 8217bcf..066398e 100644 --- a/dlls/msi/Makefile.in +++ b/dlls/msi/Makefile.in @@ -1,7 +1,7 @@ MODULE = msi.dll IMPORTLIB = msi IMPORTS = uuid urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 -DELAYIMPORTS = odbccp32 +DELAYIMPORTS = odbccp32 wintrust crypt32 C_SRCS = \ action.c \ diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 325a5b0..890132a 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -28,7 +28,6 @@ #include "winreg.h" #include "winnls.h" #include "shlwapi.h" -#include "wine/debug.h" #include "msi.h" #include "msidefs.h" #include "msiquery.h" @@ -39,6 +38,10 @@ #include "shlobj.h" #include "shobjidl.h" #include "objidl.h" +#include "wintrust.h" +#include "softpub.h" + +#include "wine/debug.h" #include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); @@ -2261,22 +2264,71 @@ UINT WINAPI MsiProvideComponentFromDescriptorW( LPCWSTR szDescriptor, return ERROR_CALL_NOT_IMPLEMENTED; } -HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR szSignedObjectPath, - DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, LPBYTE pbHashData, - LPDWORD pcbHashData) +HRESULT WINAPI MsiGetFileSignatureInformationA( LPCSTR path, DWORD flags, PCCERT_CONTEXT *cert, + LPBYTE hash, LPDWORD hashlen ) { - FIXME("%s %08x %p %p %p\n", debugstr_a(szSignedObjectPath), dwFlags, - ppcCertContext, pbHashData, pcbHashData); - return ERROR_CALL_NOT_IMPLEMENTED; + UINT r; + WCHAR *pathW = NULL; + + TRACE("%s %08x %p %p %p\n", debugstr_a(path), flags, cert, hash, hashlen); + + if (path && !(pathW = strdupAtoW( path ))) return ERROR_OUTOFMEMORY; + r = MsiGetFileSignatureInformationW( pathW, flags, cert, hash, hashlen ); + msi_free( pathW ); + return r; } -HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR szSignedObjectPath, - DWORD dwFlags, PCCERT_CONTEXT* ppcCertContext, LPBYTE pbHashData, - LPDWORD pcbHashData) -{ - FIXME("%s %08x %p %p %p\n", debugstr_w(szSignedObjectPath), dwFlags, - ppcCertContext, pbHashData, pcbHashData); - return ERROR_CALL_NOT_IMPLEMENTED; +HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCERT_CONTEXT *cert, + LPBYTE hash, LPDWORD hashlen ) +{ + static GUID generic_verify_v2 = WINTRUST_ACTION_GENERIC_VERIFY_V2; + HRESULT hr; + WINTRUST_DATA data; + WINTRUST_FILE_INFO info; + CRYPT_PROVIDER_SGNR *signer; + CRYPT_PROVIDER_CERT *provider; + + TRACE("%s %08x %p %p %p\n", debugstr_w(path), flags, cert, hash, hashlen); + + if (!path || !cert) return E_INVALIDARG; + + info.cbStruct = sizeof(info); + info.pcwszFilePath = path; + info.hFile = NULL; + info.pgKnownSubject = NULL; + + data.cbStruct = sizeof(data); + data.pPolicyCallbackData = NULL; + data.pSIPClientData = NULL; + data.dwUIChoice = WTD_UI_NONE; + data.fdwRevocationChecks = WTD_REVOKE_WHOLECHAIN; + data.dwUnionChoice = WTD_CHOICE_FILE; + data.u.pFile = &info; + data.dwStateAction = WTD_STATEACTION_VERIFY; + data.hWVTStateData = NULL; + data.pwszURLReference = NULL; + data.dwProvFlags = 0; + data.dwUIContext = WTD_UICONTEXT_INSTALL; + hr = WinVerifyTrustEx( INVALID_HANDLE_VALUE, &generic_verify_v2, &data ); + if (FAILED(hr)) return hr; + + signer = WTHelperGetProvSignerFromChain( data.hWVTStateData, 0, FALSE, 0 ); + if (!signer) return TRUST_E_NOSIGNATURE; + if (hash) + { + DWORD len = signer->psSigner->EncryptedHash.cbData; + if (*hashlen < len) + { + *hashlen = len; + return HRESULT_FROM_WIN32(ERROR_MORE_DATA); + } + memcpy( hash, signer->psSigner->EncryptedHash.pbData, len ); + *hashlen = len; + } + provider = WTHelperGetProvCertFromChain( signer, 0 ); + if (!provider) return TRUST_E_PROVIDER_UNKNOWN; + *cert = CertDuplicateCertificateContext( provider->pCert ); + return S_OK; } /****************************************************************** diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index e21d1e1..6ba0e11 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -11753,6 +11753,47 @@ static void test_MsiEnumProducts(void) LocalFree(usersid); } +static void test_MsiGetFileSignatureInformation(void) +{ + HRESULT hr; + const CERT_CONTEXT *cert; + DWORD len; + + hr = MsiGetFileSignatureInformationA( NULL, 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( NULL, 0, NULL, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( NULL, 0, &cert, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "", 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len ); + todo_wine ok(hr == CRYPT_E_FILE_ERROR, "expected CRYPT_E_FILE_ERROR got 0x%08x\n", hr); + + create_file( "signature.bin", "signature", sizeof("signature") ); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, NULL ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len ); + ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + + hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len ); + todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FUNCTION_FAILED), "got 0x%08x\n", hr); + + DeleteFileA( "signature.bin" ); +} + START_TEST(msi) { init_functionpointers(); @@ -11786,6 +11827,6 @@ START_TEST(msi) test_MsiGetPatchInfo(); test_MsiEnumProducts(); } - test_MsiGetFileVersion(); + test_MsiGetFileSignatureInformation(); }
1
0
0
0
Hans Leidekker : msi: Accept whitespace-only property values on the command line.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 8d58ddfe12a1b299c18f683dc93b5df1b0805e3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d58ddfe12a1b299c18f683dc…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:19 2011 +0200 msi: Accept whitespace-only property values on the command line. --- dlls/msi/action.c | 10 +++++----- dlls/msi/tests/install.c | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index abee14c..a5a1e33 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -276,7 +276,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes ) break; case ' ': state = state_whitespace; - if (!count || !len) goto done; + if (!count) goto done; in_quotes = 1; break; default: @@ -317,7 +317,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, BOOL preserve_case ) { LPCWSTR ptr, ptr2; - int quotes; + int num_quotes; DWORD len; WCHAR *prop, *val; UINT r; @@ -345,10 +345,10 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine, ptr2++; while (*ptr2 == ' ') ptr2++; - quotes = 0; + num_quotes = 0; val = msi_alloc( (strlenW( ptr2 ) + 1) * sizeof(WCHAR) ); - len = parse_prop( ptr2, val, "es ); - if (quotes % 2) + len = parse_prop( ptr2, val, &num_quotes ); + if (num_quotes % 2) { WARN("unbalanced quotes\n"); msi_free( val ); diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 9e8535a..1f5ab9c 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -6282,6 +6282,10 @@ static void test_command_line_parsing(void) r = MsiInstallProductA(msifile, cmd); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + cmd = "P=\" \""; + r = MsiInstallProductA(msifile, cmd); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + cmd = "P=one"; r = MsiInstallProductA(msifile, cmd); ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
1
0
0
0
Hans Leidekker : msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and MSIREG_DeleteUninstallKey .
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: e4d19fc47b37ad6c375171811a18a4eae082884d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4d19fc47b37ad6c375171811…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:31:04 2011 +0200 msi: Explicitly pass product code and platform to MSIREG_OpenUninstallKey and MSIREG_DeleteUninstallKey. --- dlls/msi/action.c | 4 ++-- dlls/msi/msipriv.h | 4 ++-- dlls/msi/package.c | 2 +- dlls/msi/registry.c | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index a21f234..abee14c 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -5286,7 +5286,7 @@ static UINT ACTION_RegisterProduct(MSIPACKAGE *package) if (!msi_check_publish(package)) return ERROR_SUCCESS; - rc = MSIREG_OpenUninstallKey(package, &hkey, TRUE); + rc = MSIREG_OpenUninstallKey(package->ProductCode, package->platform, &hkey, TRUE); if (rc != ERROR_SUCCESS) return rc; @@ -5366,7 +5366,7 @@ static UINT msi_unpublish_product(MSIPACKAGE *package, WCHAR *remove) MSIREG_DeleteProductKey(package->ProductCode); MSIREG_DeleteUserDataProductKey(package->ProductCode); - MSIREG_DeleteUninstallKey(package); + MSIREG_DeleteUninstallKey(package->ProductCode, package->platform); MSIREG_DeleteLocalClassesProductKey(package->ProductCode); MSIREG_DeleteLocalClassesFeaturesKey(package->ProductCode); diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index 7af99a6..19e9be8 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -829,8 +829,8 @@ extern BOOL unsquash_guid(LPCWSTR in, LPWSTR out); extern BOOL squash_guid(LPCWSTR in, LPWSTR out); extern BOOL encode_base85_guid(GUID *,LPWSTR); extern BOOL decode_base85_guid(LPCWSTR,GUID*); -extern UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create); -extern UINT MSIREG_DeleteUninstallKey(MSIPACKAGE *package); +extern UINT MSIREG_OpenUninstallKey(const WCHAR *, enum platform, HKEY *, BOOL); +extern UINT MSIREG_DeleteUninstallKey(const WCHAR *, enum platform); extern UINT MSIREG_OpenProductKey(LPCWSTR szProduct, LPCWSTR szUserSid, MSIINSTALLCONTEXT context, HKEY* key, BOOL create); extern UINT MSIREG_OpenFeaturesKey(LPCWSTR szProduct, MSIINSTALLCONTEXT context, diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 00ed9f8..88cf34d 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -449,7 +449,7 @@ static UINT set_installed_prop( MSIPACKAGE *package ) HKEY hkey = 0; UINT r; - r = MSIREG_OpenUninstallKey( package, &hkey, FALSE ); + r = MSIREG_OpenUninstallKey( package->ProductCode, package->platform, &hkey, FALSE ); if (r == ERROR_SUCCESS) { RegCloseKey( hkey ); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index e146d82..60deeb9 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -525,17 +525,17 @@ static WCHAR *get_user_sid(void) return ret; } -UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create) +UINT MSIREG_OpenUninstallKey(const WCHAR *product, enum platform platform, HKEY *key, BOOL create) { UINT rc; WCHAR keypath[0x200]; - TRACE("%s\n", debugstr_w(package->ProductCode)); + TRACE("%s\n", debugstr_w(product)); - if (is_64bit && package->platform == PLATFORM_INTEL) - sprintfW(keypath, szUninstall_32node_fmt, package->ProductCode); + if (is_64bit && platform == PLATFORM_INTEL) + sprintfW(keypath, szUninstall_32node_fmt, product); else - sprintfW(keypath, szUninstall_fmt, package->ProductCode); + sprintfW(keypath, szUninstall_fmt, product); if (create) rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, keypath, 0, NULL, 0, KEY_ALL_ACCESS, NULL, key, NULL); @@ -545,16 +545,16 @@ UINT MSIREG_OpenUninstallKey(MSIPACKAGE *package, HKEY *key, BOOL create) return rc; } -UINT MSIREG_DeleteUninstallKey(MSIPACKAGE *package) +UINT MSIREG_DeleteUninstallKey(const WCHAR *product, enum platform platform) { WCHAR keypath[0x200]; - TRACE("%s\n", debugstr_w(package->ProductCode)); + TRACE("%s\n", debugstr_w(product)); - if (is_64bit && package->platform == PLATFORM_INTEL) - sprintfW(keypath, szUninstall_32node_fmt, package->ProductCode); + if (is_64bit && platform == PLATFORM_INTEL) + sprintfW(keypath, szUninstall_32node_fmt, product); else - sprintfW(keypath, szUninstall_fmt, package->ProductCode); + sprintfW(keypath, szUninstall_fmt, product); return RegDeleteTreeW(HKEY_LOCAL_MACHINE, keypath); }
1
0
0
0
Hans Leidekker : msi: Allocate the user token dynamically.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 6ad992c40722cd385e378e18835156e0799029d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ad992c40722cd385e378e188…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:30:49 2011 +0200 msi: Allocate the user token dynamically. --- dlls/msi/registry.c | 156 +++++++++++++++++++++----------------------------- 1 files changed, 66 insertions(+), 90 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6ad992c40722cd385e378…
1
0
0
0
Hans Leidekker : msi/tests: Allocate the user token dynamically and unify implementations.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 419496d0c8156e1cbf864c0d64a36301bbde653a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=419496d0c8156e1cbf864c0d6…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:30:35 2011 +0200 msi/tests: Allocate the user token dynamically and unify implementations. --- dlls/msi/tests/action.c | 34 +++++++++++++++++----------------- dlls/msi/tests/msi.c | 44 ++++++++++++++++++++++---------------------- dlls/msi/tests/package.c | 26 +++++++++++++------------- dlls/msi/tests/source.c | 45 ++++++++++++++++++++++++--------------------- 4 files changed, 76 insertions(+), 73 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=419496d0c8156e1cbf864…
1
0
0
0
Hans Leidekker : msi/tests: Get rid of workarounds for win9x test failures.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: c505c0fe985e769e3eb5a410480ec331b0d43c11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c505c0fe985e769e3eb5a4104…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:30:17 2011 +0200 msi/tests: Get rid of workarounds for win9x test failures. --- dlls/msi/tests/automation.c | 28 +++------ dlls/msi/tests/db.c | 16 +---- dlls/msi/tests/install.c | 130 +++++++------------------------------------ dlls/msi/tests/msi.c | 4 +- dlls/msi/tests/package.c | 31 ++--------- 5 files changed, 40 insertions(+), 169 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c505c0fe985e769e3eb5a…
1
0
0
0
Hans Leidekker : msi: Ignore invalid upgrade codes in the PublishProduct action.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: e82a4896f39bea9d5d31de93813ba7b9d468bc32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e82a4896f39bea9d5d31de938…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:29:59 2011 +0200 msi: Ignore invalid upgrade codes in the PublishProduct action. --- dlls/msi/action.c | 19 +++------ dlls/msi/tests/install.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 12 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 2f0b739..a21f234 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -4364,26 +4364,21 @@ static UINT msi_publish_upgrade_code(MSIPACKAGE *package) return ERROR_SUCCESS; if (package->Context == MSIINSTALLCONTEXT_MACHINE) - { r = MSIREG_OpenClassesUpgradeCodesKey(upgrade, &hkey, TRUE); - if (r != ERROR_SUCCESS) - goto done; - } else - { r = MSIREG_OpenUserUpgradeCodesKey(upgrade, &hkey, TRUE); - if (r != ERROR_SUCCESS) - goto done; - } + if (r != ERROR_SUCCESS) + { + WARN("failed to open upgrade code key\n"); + msi_free(upgrade); + return ERROR_SUCCESS; + } squash_guid(package->ProductCode, squashed_pc); msi_reg_set_val_str(hkey, squashed_pc, NULL); - RegCloseKey(hkey); - -done: msi_free(upgrade); - return r; + return ERROR_SUCCESS; } static BOOL msi_check_publish(MSIPACKAGE *package) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index deff5f7..fb71f9d 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1191,6 +1191,53 @@ static const CHAR cl_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" "InstallValidate\t\t1400\n" "InstallFinalize\t\t5000\n"; +static const CHAR uc_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n" + "s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n" + "File\tFile\n" + "upgradecode.txt\tupgradecode\tupgradecode.txt\t1000\t\t\t8192\t1\n"; + +static const CHAR uc_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" + "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" + "Feature\tFeature\n" + "upgradecode\t\t\tupgradecode feature\t1\t2\tMSITESTDIR\t0\n"; + +static const CHAR uc_feature_comp_dat[] = "Feature_\tComponent_\n" + "s38\ts72\n" + "FeatureComponents\tFeature_\tComponent_\n" + "upgradecode\tupgradecode\n"; + +static const CHAR uc_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "upgradecode\t{6952B732-2FCB-4E47-976F-989FCBD7EDFB}\tMSITESTDIR\t0\t\tupgradecode.txt\n"; + +static const CHAR uc_property_dat[] = "Property\tValue\n" + "s72\tl0\n" + "Property\tProperty\n" + "INSTALLLEVEL\t3\n" + "ProductCode\t{E5FB1241-F547-4BA7-A60E-8E75797268D4}\n" + "ProductName\tMSITEST\n" + "ProductVersion\t1.1.1\n" + "UpgradeCode\t#UPGEADECODE#\n" + "MSIFASTINSTALL\t1\n"; + +static const CHAR uc_install_exec_seq_dat[] = "Action\tCondition\tSequence\n" + "s72\tS255\tI2\n" + "InstallExecuteSequence\tAction\n" + "LaunchConditions\t\t100\n" + "CostInitialize\t\t200\n" + "FileCost\t\t300\n" + "CostFinalize\t\t400\n" + "InstallInitialize\t\t500\n" + "ProcessComponents\t\t600\n" + "InstallValidate\t\t700\n" + "RemoveFiles\t\t800\n" + "InstallFiles\t\t900\n" + "RegisterProduct\t\t1000\n" + "PublishFeatures\t\t1100\n" + "PublishProduct\t\t1200\n" + "InstallFinalize\t\t1300\n"; + typedef struct _msi_table { const CHAR *filename; @@ -1870,6 +1917,18 @@ static const msi_table cl_tables[] = ADD_TABLE(property) }; +static const msi_table uc_tables[] = +{ + ADD_TABLE(directory), + ADD_TABLE(uc_component), + ADD_TABLE(uc_feature), + ADD_TABLE(uc_feature_comp), + ADD_TABLE(uc_file), + ADD_TABLE(uc_install_exec_seq), + ADD_TABLE(media), + ADD_TABLE(uc_property) +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -6373,6 +6432,38 @@ static void test_command_line_parsing(void) RemoveDirectory("msitest"); } +static void test_upgrade_code(void) +{ + UINT r; + + if (is_process_limited()) + { + skip("process is limited\n"); + return; + } + + CreateDirectoryA("msitest", NULL); + create_file("msitest\\upgradecode.txt", 1000); + create_database(msifile, uc_tables, sizeof(uc_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(pf_exists("msitest\\upgradecode.txt"), "file not installed\n"); + + r = MsiInstallProductA(msifile, "REMOVE=ALL"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + + ok(!delete_pf("msitest\\upgradecode.txt", TRUE), "file not removed\n"); + ok(!delete_pf("msitest", FALSE), "directory not removed\n"); + + DeleteFileA("msitest\\upgradecode.txt"); + RemoveDirectoryA("msitest"); + DeleteFile(msifile); +} + START_TEST(install) { DWORD len; @@ -6463,6 +6554,7 @@ START_TEST(install) test_sourcedir_props(); test_package_validation(); test_command_line_parsing(); + test_upgrade_code(); DeleteFileA(log_file);
1
0
0
0
Hans Leidekker : mscms: Trace the CMM id as a string.
by Alexandre Julliard
30 Mar '11
30 Mar '11
Module: wine Branch: master Commit: 8800772f2d1237312fa28399ca953ddbae8737ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8800772f2d1237312fa28399c…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 30 12:29:45 2011 +0200 mscms: Trace the CMM id as a string. --- dlls/mscms/stub.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/mscms/stub.c b/dlls/mscms/stub.c index d7e6877..84c0cdc 100644 --- a/dlls/mscms/stub.c +++ b/dlls/mscms/stub.c @@ -137,21 +137,21 @@ BOOL WINAPI GetPS2ColorSpaceArray( HPROFILE profile, DWORD intent, DWORD type, P BOOL WINAPI RegisterCMMA( PCSTR machine, DWORD id, PCSTR dll ) { - FIXME( "( %p, 0x%08x, %p ) stub\n", machine, id, dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI RegisterCMMW( PCWSTR machine, DWORD id, PCWSTR dll ) { - FIXME( "( %p, 0x%08x, %p ) stub\n", machine, id, dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, MSCMS_dbgstr_tag(id), dll ); return TRUE; } BOOL WINAPI SelectCMM( DWORD id ) { - FIXME( "(%x) stub\n", id ); + FIXME( "(%s) stub\n", MSCMS_dbgstr_tag(id) ); return TRUE; } @@ -190,14 +190,14 @@ BOOL WINAPI SpoolerCopyFileEvent( LPWSTR printer, LPWSTR key, DWORD event ) BOOL WINAPI UnregisterCMMA( PCSTR machine, DWORD id ) { - FIXME( "( %p, 0x%08x ) stub\n", machine, id ); + FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); return TRUE; } BOOL WINAPI UnregisterCMMW( PCWSTR machine, DWORD id ) { - FIXME( "( %p, 0x%08x ) stub\n", machine, id ); + FIXME( "( %p, %s ) stub\n", machine, MSCMS_dbgstr_tag(id) ); return TRUE; }
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
85
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Results per page:
10
25
50
100
200