ReactOS.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
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
List overview
Download
Ros-diffs
February 2009
----- 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
ros-diffs@reactos.org
29 participants
559 discussions
Start a n
N
ew thread
[dchapyshev] 39262: - Sync dwmapi with Wine head
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sun Feb 1 04:34:53 2009 New Revision: 39262 URL:
http://svn.reactos.org/svn/reactos?rev=39262&view=rev
Log: - Sync dwmapi with Wine head Modified: trunk/reactos/dll/win32/dwmapi/dwmapi.spec trunk/reactos/dll/win32/dwmapi/dwmapi_main.c Modified: trunk/reactos/dll/win32/dwmapi/dwmapi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dwmapi/dwmapi.sp…
============================================================================== --- trunk/reactos/dll/win32/dwmapi/dwmapi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dwmapi/dwmapi.spec [iso-8859-1] Sun Feb 1 04:34:53 2009 @@ -24,7 +24,7 @@ @ stub DwmDefWindowProc @ stub DwmDetachMilContent @ stub DwmEnableBlurBehindWindow -@ stub DwmEnableMMCSS +@ stdcall DwmEnableMMCSS(long) @ stdcall DwmExtendFrameIntoClientArea(long ptr) @ stdcall DwmFlush() @ stdcall DwmGetColorizationColor(ptr long) Modified: trunk/reactos/dll/win32/dwmapi/dwmapi_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/dwmapi/dwmapi_ma…
============================================================================== --- trunk/reactos/dll/win32/dwmapi/dwmapi_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/dwmapi/dwmapi_main.c [iso-8859-1] Sun Feb 1 04:34:53 2009 @@ -93,7 +93,7 @@ /********************************************************************** * DwmFlush (DWMAPI.@) */ -HRESULT WINAPI DwmFlush() +HRESULT WINAPI DwmFlush(void) { FIXME("() stub\n"); @@ -119,3 +119,13 @@ return E_NOTIMPL; } + +/********************************************************************** + * DwmEnableMMCSS (DWMAPI.@) + */ +HRESULT WINAPI DwmEnableMMCSS(BOOL enableMMCSS) +{ + FIXME("(%d) stub\n", enableMMCSS); + + return S_OK; +}
15 years, 10 months
1
0
0
0
[dchapyshev] 39261: - Add stub for SHOpenFolderAndSelectItems - Add SHParseDisplayName to .spec file foobar2000 now it is started normally
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sun Feb 1 04:03:33 2009 New Revision: 39261 URL:
http://svn.reactos.org/svn/reactos?rev=39261&view=rev
Log: - Add stub for SHOpenFolderAndSelectItems - Add SHParseDisplayName to .spec file foobar2000 now it is started normally Modified: trunk/reactos/dll/win32/shell32/shell32.spec trunk/reactos/dll/win32/shell32/shlfolder.c Modified: trunk/reactos/dll/win32/shell32/shell32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32.spec [iso-8859-1] Sun Feb 1 04:03:33 2009 @@ -444,3 +444,5 @@ @ stdcall StrStrIW(wstr wstr) shlwapi.StrStrIW @ stdcall StrStrW(wstr wstr) shlwapi.StrStrW @ stub WOWShellExecute +@ stdcall SHOpenFolderAndSelectItems(ptr long ptr long) +@ stdcall SHParseDisplayName(wstr ptr ptr long ptr) Modified: trunk/reactos/dll/win32/shell32/shlfolder.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfolde…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlfolder.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlfolder.c [iso-8859-1] Sun Feb 1 04:03:33 2009 @@ -546,3 +546,19 @@ FIXME("%p %s %p %08x %p\n",hWnd,lpszDir,lpDataObject,uFlags,lppidlLinks); return E_NOTIMPL; } + +/*********************************************************************** + * SHOpenFolderAndSelectItems + * + * Unimplemented. + */ +HRESULT +WINAPI +SHOpenFolderAndSelectItems(PCIDLIST_ABSOLUTE pidlFolder, + UINT cidl, + PCUITEMID_CHILD_ARRAY *apidl, + DWORD dwFlags) +{ + FIXME("SHOpenFolderAndSelectItems() stub\n"); + return E_NOTIMPL; +}
15 years, 10 months
1
0
0
0
[cwittich] 39260: sync netapi32 with wine 1.1.14
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Feb 1 01:57:15 2009 New Revision: 39260 URL:
http://svn.reactos.org/svn/reactos?rev=39260&view=rev
Log: sync netapi32 with wine 1.1.14 Modified: trunk/reactos/dll/win32/netapi32/nbt.c Modified: trunk/reactos/dll/win32/netapi32/nbt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/nbt.c?r…
============================================================================== --- trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] Sun Feb 1 01:57:15 2009 @@ -103,10 +103,8 @@ #define MIN_CACHE_TIMEOUT 60000 #define CACHE_TIMEOUT 360000 -#define MAX_NBT_NAME_SZ (NCBNAMSZ * 2 + MAX_DOMAIN_NAME_LEN + 2) -#define SIMPLE_NAME_QUERY_PKT_SIZE 26 + MAX_NBT_NAME_SZ - -#define DEFAULT_NBT_SESSIONS 16 +#define MAX_NBT_NAME_SZ 255 +#define SIMPLE_NAME_QUERY_PKT_SIZE 16 + MAX_NBT_NAME_SZ #define NBNS_TYPE_NB 0x0020 #define NBNS_TYPE_NBSTAT 0x0021 @@ -156,7 +154,7 @@ static DWORD gWINSQueryTimeout; static DWORD gWINSServers[MAX_WINS_SERVERS]; static int gNumWINSServers; -static char gScopeID[MAX_DOMAIN_NAME_LEN]; +static char gScopeID[MAX_SCOPE_ID_LEN]; static DWORD gCacheTimeout; static struct NBNameCache *gNameCache; @@ -1493,7 +1491,7 @@ (LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT && dword <= MAX_QUERY_TIMEOUT) gWINSQueryTimeout = dword; - size = MAX_DOMAIN_NAME_LEN - 1; + size = sizeof(gScopeID) - 1; if (RegQueryValueExW(hKey, ScopeIDW, NULL, NULL, (LPBYTE)gScopeID + 1, &size) == ERROR_SUCCESS) { @@ -1501,11 +1499,11 @@ NetBTNameEncode */ char *ptr, *lenPtr; - for (ptr = gScopeID + 1; *ptr && - ptr - gScopeID < MAX_DOMAIN_NAME_LEN; ) - { - for (lenPtr = ptr - 1, *lenPtr = 0; *ptr && *ptr != '.' && - ptr - gScopeID < MAX_DOMAIN_NAME_LEN; ptr++) + for (ptr = gScopeID + 1; ptr - gScopeID < sizeof(gScopeID) && *ptr; ) + { + for (lenPtr = ptr - 1, *lenPtr = 0; + ptr - gScopeID < sizeof(gScopeID) && *ptr && *ptr != '.'; + ptr++) *lenPtr += 1; ptr++; }
15 years, 10 months
1
0
0
0
[dgorbachev] 39259: Sync Czech file with English file. Radek Liska, bug #4105.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Feb 1 00:33:48 2009 New Revision: 39259 URL:
http://svn.reactos.org/svn/reactos?rev=39259&view=rev
Log: Sync Czech file with English file. Radek Liska, bug #4105. Modified: trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc Modified: trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lang/cs…
============================================================================== --- trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netshell/lang/cs-CZ.rc [iso-8859-1] Sun Feb 1 00:33:48 2009 @@ -1,22 +1,22 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 228 +IDD_NETPROPERTIES DIALOGEX DISCARDABLE 0, 0, 246, 246 STYLE DS_SHELLFONT | WS_CHILD | WS_CAPTION CAPTION "Obecné nastavení" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 LTEXT "Pøipojit prostøednictvím:", -1, 9,9,217,8 - EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_DISABLED | WS_BORDER | WS_TABSTOP + EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Nastavit", IDC_CONFIGURE, 189, 38, 50, 14 LTEXT "Vybrané komponenty jsou pouívány tímto pøipojením:", -1, 9, 59, 217, 8 - LISTBOX IDC_COMPONENTSLIST, 9, 71, 230, 55, LBS_NOTIFY | WS_VSCROLL | WS_BORDER | LBS_NOINTEGRALHEIGHT PUSHBUTTON "&Instalovat", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Odstranit", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Vlastnosti", IDC_PROPERTIES, 174, 130, 65, 14 GROUPBOX "Popis", -1, 9, 153, 230, 46, BS_GROUPBOX LTEXT "Tak tady bude popis komponenty...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP - CHECKBOX "Po pøipojení zobrazit ikonu na hlavním panelu", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP + CHECKBOX "Po pøipojení zobrazit ikonu na hlavním panelu", IDC_SHOWTASKBAR, 9, 206, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP + CHECKBOX "Upozornit, kdy bude pøipojení omezené nebo pøeruené", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 12, BS_AUTOCHECKBOX | WS_TABSTOP END IDD_STATUS DIALOGEX DISCARDABLE 0, 0, 200, 280 @@ -42,7 +42,7 @@ LTEXT "Bytù:", -1, 17, 115, 32, 8 RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 - PUSHBUTTON "&Vlastnosti", IDC_PROPERTIES, 10, 150, 50, 14 + PUSHBUTTON "&Vlastnosti", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 PUSHBUTTON "&Zakázat", IDC_ENDISABLE, 66, 150, 50, 14 RTEXT "",IDC_STATUS,83,20,98,8 RTEXT "",IDC_DURATION,83,34,98,8
15 years, 10 months
1
0
0
0
[cwittich] 39258: sync some LsaQueryDomainInformationPolicy stuff with wine 1.1.14 fixes all advapi32 lsa winetests fixes all netapi32 wksta winetests
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Feb 1 00:14:29 2009 New Revision: 39258 URL:
http://svn.reactos.org/svn/reactos?rev=39258&view=rev
Log: sync some LsaQueryDomainInformationPolicy stuff with wine 1.1.14 fixes all advapi32 lsa winetests fixes all netapi32 wksta winetests Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/lsa…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] Sun Feb 1 00:14:29 2009 @@ -10,12 +10,63 @@ * 20030202 KJK compressed stubs * */ - #include <advapi32.h> #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(advapi); +/* imported from wine 1.1.14 */ +static void* ADVAPI_GetDomainName(unsigned sz, unsigned ofs) +{ + HKEY key; + LONG ret; + BYTE* ptr = NULL; + UNICODE_STRING* ustr; + + static const WCHAR wVNETSUP[] = { + 'S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'S','e','r','v','i','c','e','s','\\', + 'V','x','D','\\','V','N','E','T','S','U','P','\0'}; + + ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, wVNETSUP, 0, KEY_READ, &key); + if (ret == ERROR_SUCCESS) + { + DWORD size = 0; + static const WCHAR wg[] = { 'W','o','r','k','g','r','o','u','p',0 }; + + ret = RegQueryValueExW(key, wg, NULL, NULL, NULL, &size); + if (ret == ERROR_MORE_DATA || ret == ERROR_SUCCESS) + { + ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sz + size); + if (!ptr) return NULL; + ustr = (UNICODE_STRING*)(ptr + ofs); + ustr->MaximumLength = size; + ustr->Buffer = (WCHAR*)(ptr + sz); + ret = RegQueryValueExW(key, wg, NULL, NULL, (LPBYTE)ustr->Buffer, &size); + if (ret != ERROR_SUCCESS) + { + HeapFree(GetProcessHeap(), 0, ptr); + ptr = NULL; + } + else ustr->Length = size - sizeof(WCHAR); + } + RegCloseKey(key); + } + if (!ptr) + { + static const WCHAR wDomain[] = {'D','O','M','A','I','N','\0'}; + ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sz + sizeof(wDomain)); + if (!ptr) return NULL; + ustr = (UNICODE_STRING*)(ptr + ofs); + ustr->MaximumLength = sizeof(wDomain); + ustr->Buffer = (WCHAR*)(ptr + sz); + ustr->Length = sizeof(wDomain) - sizeof(WCHAR); + memcpy(ustr->Buffer, wDomain, sizeof(wDomain)); + } + return ptr; +} handle_t __RPC_USER PLSAPR_SERVER_NAME_bind(PLSAPR_SERVER_NAME pszSystemName) @@ -477,56 +528,60 @@ } break; case PolicyPrimaryDomainInformation: /* 3 */ + { + /* Only the domain name is valid for the local computer. + * All other fields are zero. + */ + PPOLICY_PRIMARY_DOMAIN_INFO pinfo; + + pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_PRIMARY_DOMAIN_INFO, Name)); + + TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer)); + + *Buffer = pinfo; + } case PolicyAccountDomainInformation: /* 5 */ { struct di { - POLICY_PRIMARY_DOMAIN_INFO ppdi; + POLICY_ACCOUNT_DOMAIN_INFO info; SID sid; + DWORD padding[3]; + WCHAR domain[MAX_COMPUTERNAME_LENGTH + 1]; }; SID_IDENTIFIER_AUTHORITY localSidAuthority = {SECURITY_NT_AUTHORITY}; + DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1; struct di * xdi = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*xdi)); - HKEY key; - BOOL useDefault = TRUE; - LONG ret; - - if ((ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, - "System\\CurrentControlSet\\Services\\VxD\\VNETSUP", 0, - KEY_READ, &key)) == ERROR_SUCCESS) - { - DWORD size = 0; - WCHAR wg[] = { 'W','o','r','k','g','r','o','u','p',0 }; - - ret = RegQueryValueExW(key, wg, NULL, NULL, NULL, &size); - if (ret == ERROR_MORE_DATA || ret == ERROR_SUCCESS) - { - xdi->ppdi.Name.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, size); - if ((ret = RegQueryValueExW(key, wg, NULL, NULL, - (LPBYTE)xdi->ppdi.Name.Buffer, &size)) == ERROR_SUCCESS) - { - xdi->ppdi.Name.Length = (USHORT)size; - useDefault = FALSE; - } - else - { - RtlFreeHeap(RtlGetProcessHeap(), 0, xdi->ppdi.Name.Buffer); - xdi->ppdi.Name.Buffer = NULL; - } - } - RegCloseKey(key); - } - if (useDefault) - RtlCreateUnicodeStringFromAsciiz(&(xdi->ppdi.Name), "DOMAIN"); - TRACE("setting domain to \n"); - - xdi->ppdi.Sid = &(xdi->sid); + + xdi->info.DomainName.MaximumLength = dwSize * sizeof(WCHAR); + xdi->info.DomainName.Buffer = xdi->domain; + if (GetComputerNameW(xdi->info.DomainName.Buffer, &dwSize)) + xdi->info.DomainName.Length = dwSize * sizeof(WCHAR); + + TRACE("setting name to %s\n", debugstr_w(xdi->info.DomainName.Buffer)); + + xdi->info.DomainSid = &xdi->sid; xdi->sid.Revision = SID_REVISION; xdi->sid.SubAuthorityCount = 1; xdi->sid.IdentifierAuthority = localSidAuthority; xdi->sid.SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID; + *Buffer = xdi; + } + break; + case PolicyDnsDomainInformation: /* 12 (0xc) */ + { + /* Only the domain name is valid for the local computer. + * All other fields are zero. + */ + PPOLICY_DNS_DOMAIN_INFO pinfo; + + pinfo = ADVAPI_GetDomainName(sizeof(*pinfo), offsetof(POLICY_DNS_DOMAIN_INFO, Name)); + + TRACE("setting domain to %s\n", debugstr_w(pinfo->Name.Buffer)); + + *Buffer = pinfo; } break; case PolicyAuditLogInformation: @@ -537,7 +592,6 @@ case PolicyModificationInformation: case PolicyAuditFullSetInformation: case PolicyAuditFullQueryInformation: - case PolicyDnsDomainInformation: case PolicyEfsInformation: { FIXME("category not implemented\n");
15 years, 10 months
1
0
0
0
[cwittich] 39257: SystemName == NULL is valid for LsaOpenPolicy
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 31 23:51:07 2009 New Revision: 39257 URL:
http://svn.reactos.org/svn/reactos?rev=39257&view=rev
Log: SystemName == NULL is valid for LsaOpenPolicy Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/lsa…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] Sat Jan 31 23:51:07 2009 @@ -388,14 +388,14 @@ NTSTATUS Status; TRACE("LsaOpenPolicy (%s,%p,0x%08x,%p)\n", - SystemName?debugstr_w(SystemName->Buffer):"(null)", + SystemName ? debugstr_w(SystemName->Buffer) : "(null)", ObjectAttributes, DesiredAccess, PolicyHandle); RpcTryExcept { *PolicyHandle = NULL; - Status = LsarOpenPolicy(SystemName->Buffer, + Status = LsarOpenPolicy(SystemName ? SystemName->Buffer : NULL, (PLSAPR_OBJECT_ATTRIBUTES)ObjectAttributes, DesiredAccess, PolicyHandle);
15 years, 10 months
1
0
0
0
[cwittich] 39256: sync wintrust_winetest with wine 1.1.14
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 31 23:43:40 2009 New Revision: 39256 URL:
http://svn.reactos.org/svn/reactos?rev=39256&view=rev
Log: sync wintrust_winetest with wine 1.1.14 Modified: trunk/rostests/winetests/wintrust/crypt.c Modified: trunk/rostests/winetests/wintrust/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wintrust/crypt.…
============================================================================== --- trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] (original) +++ trunk/rostests/winetests/wintrust/crypt.c [iso-8859-1] Sat Jan 31 23:43:40 2009 @@ -32,6 +32,10 @@ static CHAR catroot[MAX_PATH]; static CHAR catroot2[MAX_PATH]; +static const WCHAR hashmeW[] = {'h','a','s','h','m','e',0}; +static const WCHAR attr1W[] = {'a','t','t','r','1',0}; +static const WCHAR attr2W[] = {'a','t','t','r','2',0}; + /* * Minimalistic catalog file. To reconstruct, save text below as winetest.cdf, * convert to DOS line endings and run 'makecat /cat winetest.cdf' @@ -49,6 +53,18 @@ [CatalogFiles] hashme=.\winetest.cdf */ + +static const CHAR test_cdf[] = + "[CatalogHeader]\r\n" + "Name=winetest.cat\r\n" + "ResultDir=.\\\r\n" + "PublicVersion=0x00000001\r\n" + "EncodingType=\r\n" + "CATATTR1=0x10010001:attr1:value1\r\n" + "CATATTR2=0x10010001:attr2:value2\r\n" + "\r\n" + "[CatalogFiles]\r\n" + "hashme=.\\winetest.cdf\r\n"; static const BYTE test_catalog[] = { 0x30, 0x82, 0x01, 0xbc, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, @@ -89,6 +105,13 @@ static BOOL (WINAPI * pCryptCATAdminReleaseCatalogContext)(HCATADMIN, HCATINFO, DWORD); static HANDLE (WINAPI * pCryptCATOpen)(LPWSTR, DWORD, HCRYPTPROV, DWORD, DWORD); static BOOL (WINAPI * pCryptCATCatalogInfoFromContext)(HCATINFO, CATALOG_INFO *, DWORD); +static BOOL (WINAPI * pCryptCATCDFClose)(CRYPTCATCDF *); +static CRYPTCATATTRIBUTE * (WINAPI * pCryptCATCDFEnumCatAttributes)(CRYPTCATCDF *, CRYPTCATATTRIBUTE *, + PFN_CDF_PARSE_ERROR_CALLBACK); +static LPWSTR (WINAPI * pCryptCATCDFEnumMembersByCDFTagEx)(CRYPTCATCDF *, LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK, + CRYPTCATMEMBER **, BOOL, LPVOID); +static CRYPTCATCDF * (WINAPI * pCryptCATCDFOpen)(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK); +static CRYPTCATATTRIBUTE * (WINAPI * pCryptCATEnumerateCatAttr)(HANDLE, CRYPTCATATTRIBUTE *); static CRYPTCATMEMBER * (WINAPI * pCryptCATEnumerateMember)(HANDLE, CRYPTCATMEMBER *); static CRYPTCATATTRIBUTE * (WINAPI * pCryptCATEnumerateAttr)(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *); static BOOL (WINAPI * pCryptCATClose)(HANDLE); @@ -111,6 +134,11 @@ WINTRUST_GET_PROC(CryptCATAdminReleaseCatalogContext) WINTRUST_GET_PROC(CryptCATOpen) WINTRUST_GET_PROC(CryptCATCatalogInfoFromContext) + WINTRUST_GET_PROC(CryptCATCDFClose) + WINTRUST_GET_PROC(CryptCATCDFEnumCatAttributes) + WINTRUST_GET_PROC(CryptCATCDFEnumMembersByCDFTagEx) + WINTRUST_GET_PROC(CryptCATCDFOpen) + WINTRUST_GET_PROC(CryptCATEnumerateCatAttr) WINTRUST_GET_PROC(CryptCATEnumerateMember) WINTRUST_GET_PROC(CryptCATEnumerateAttr) WINTRUST_GET_PROC(CryptCATClose) @@ -347,6 +375,64 @@ DeleteFileA(temp); } +static DWORD error_area; +static DWORD local_error; + +static void WINAPI cdf_callback(DWORD area, DWORD error, WCHAR* line) +{ + ok(error_area != -2, "Didn't expect cdf_callback() to be called (%08x, %08x)\n", + area, error); + + error_area = area; + local_error = error; +} + +static void test_CryptCATCDF_params(void) +{ + static WCHAR nonexistent[] = {'d','e','a','d','b','e','e','f','.','c','d','f',0}; + CRYPTCATCDF *catcdf; + BOOL ret; + + if (!pCryptCATCDFOpen) + { + win_skip("CryptCATCDFOpen is not available\n"); + return; + } + + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(NULL, NULL); + ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(NULL, cdf_callback); + ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + + /* File doesn't exist */ + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(nonexistent, cdf_callback); + ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n"); + todo_wine + ok(GetLastError() == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = pCryptCATCDFClose(NULL); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + + catcdf = NULL; + SetLastError(0xdeadbeef); + ret = pCryptCATCDFClose(catcdf); + ok(!ret, "Expected failure\n"); + todo_wine + ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); +} + +/* FIXME: Once Wine can create catalog files we should use the created catalog file in this test */ static void test_CryptCATAdminAddRemoveCatalog(void) { static WCHAR basenameW[] = {'w','i','n','e','t','e','s','t','.','c','a','t',0}; @@ -436,6 +522,11 @@ memset(catfileW, 0, sizeof(catfileW)); MultiByteToWideChar(0, 0, p, -1, catfileW, MAX_PATH); + /* Set the file attributes so we can check what happens with them during the 'copy' */ + attrs = FILE_ATTRIBUTE_READONLY; + ret = SetFileAttributesA(tmpfile, attrs); + ok(ret, "SetFileAttributesA failed : %u\n", GetLastError()); + /* winetest.cat will be created */ hcatinfo = pCryptCATAdminAddCatalog(hcatadmin, tmpfileW, basenameW, 0); ok(hcatinfo != NULL, "CryptCATAdminAddCatalog failed %u\n", GetLastError()); @@ -444,6 +535,10 @@ lstrcatA(catfilepath, "\\{DEADBEEF-DEAD-BEEF-DEAD-BEEFDEADBEEF}\\winetest.cat"); attrs = GetFileAttributes(catfilepath); ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected %s to exist\n", catfilepath); + todo_wine + ok(attrs == FILE_ATTRIBUTE_SYSTEM || + attrs == (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | FILE_ATTRIBUTE_SYSTEM), /* Vista */ + "File has wrong attributes : %08x\n", attrs); info.cbStruct = sizeof(info); info.wszCatalogFile[0] = 0; @@ -477,12 +572,14 @@ ret = pCryptCATAdminReleaseContext(hcatadmin, 0); ok(ret, "CryptCATAdminReleaseContext failed %u\n", GetLastError()); + /* Set the attributes so we can delete the file */ + attrs = FILE_ATTRIBUTE_NORMAL; + ret = SetFileAttributesA(tmpfile, attrs); DeleteFileA(tmpfile); } -static void test_catalog_properties(void) +static void test_catalog_properties(CHAR *catfile, int attributes, int members) { - static const WCHAR hashmeW[] = {'h','a','s','h','m','e',0}; static const GUID subject = {0xde351a42,0x8e59,0x11d0,{0x8c,0x47,0x00,0xc0,0x4f,0xc2,0x95,0xee}}; HANDLE hcat; @@ -490,54 +587,492 @@ CRYPTCATATTRIBUTE *attr; char catalog[MAX_PATH]; WCHAR catalogW[MAX_PATH]; - DWORD written; + DWORD attrs; + BOOL ret; + int attrcount = 0, membercount = 0; + + /* FIXME: Wine can't create catalog files out of catalog definition files yet. Remove this piece + * once wine is fixed + */ + attrs = GetFileAttributesA(catfile); + if (attrs == INVALID_FILE_ATTRIBUTES) + { + HANDLE file; + DWORD written; + + trace("Creating the catalog file\n"); + if (!GetTempFileNameA(CURR_DIR, "cat", 0, catalog)) return; + file = CreateFileA(catalog, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError()); + WriteFile(file, test_catalog, sizeof(test_catalog), &written, NULL); + CloseHandle(file); + + attributes = 2; + members = 1; + MultiByteToWideChar(CP_ACP, 0, catalog, -1, catalogW, MAX_PATH); + } + else + { + MultiByteToWideChar(CP_ACP, 0, catfile, -1, catalogW, MAX_PATH); + catalog[0] = 0; + } + + hcat = pCryptCATOpen(NULL, 0, 0, 0, 0); + ok(hcat == INVALID_HANDLE_VALUE, "CryptCATOpen succeeded\n"); + + hcat = pCryptCATOpen(catalogW, 0, 0, 0, 0); + if (hcat == INVALID_HANDLE_VALUE && members == 0) + { + win_skip("CryptCATOpen on W2K can't handle catalog files with no members\n"); + return; + } + ok(hcat != INVALID_HANDLE_VALUE, "CryptCATOpen failed %u\n", GetLastError()); + + m = pCryptCATEnumerateMember(NULL, NULL); + ok(m == NULL, "CryptCATEnumerateMember succeeded\n"); + + m = NULL; + while ((m = pCryptCATEnumerateMember(hcat, m))) + { + ok(m->cbStruct == sizeof(CRYPTCATMEMBER), "unexpected size %u\n", m->cbStruct); + todo_wine ok(!lstrcmpW(m->pwszReferenceTag, hashmeW), "unexpected tag\n"); + ok(!memcmp(&m->gSubjectType, &subject, sizeof(subject)), "guid differs\n"); + ok(!m->fdwMemberFlags, "got %x expected 0\n", m->fdwMemberFlags); + ok(m->dwCertVersion == 0x200, "got %x expected 0x200\n", m->dwCertVersion); + ok(!m->dwReserved, "got %x expected 0\n", m->dwReserved); + ok(m->hReserved == NULL, "got %p expected NULL\n", m->hReserved); + + attr = pCryptCATEnumerateAttr(hcat, m, NULL); + ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); + + membercount++; + } + ok(membercount == members, "Expected %d members, got %d\n", members, membercount); + + attr = pCryptCATEnumerateAttr(NULL, NULL, NULL); + ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); + + attr = pCryptCATEnumerateAttr(hcat, NULL, NULL); + ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); + + attr = NULL; + while ((attr = pCryptCATEnumerateCatAttr(hcat, attr))) + { + ok(!lstrcmpW(attr->pwszReferenceTag, attr1W) || + !lstrcmpW(attr->pwszReferenceTag, attr2W), + "Expected 'attr1' or 'attr2'\n"); + + attrcount++; + } + todo_wine + ok(attrcount == attributes, "Expected %d catalog attributes, got %d\n", attributes, attrcount); + + ret = pCryptCATClose(hcat); + ok(ret, "CryptCATClose failed\n"); + if (catalog[0]) DeleteFileA( catalog ); +} + +static void test_create_catalog_file(void) +{ + static CHAR catfileA[] = "winetest.cat"; + static CHAR cdffileA[] = "winetest.cdf"; + static WCHAR cdffileW[] = {'w','i','n','e','t','e','s','t','.','c','d','f',0}; + CRYPTCATCDF *catcdf; + CRYPTCATATTRIBUTE *catattr; + CRYPTCATMEMBER *catmember; + WCHAR *catmembertag; + DWORD written, attrs; HANDLE file; BOOL ret; - - if (!GetTempFileNameA(CURR_DIR, "cat", 0, catalog)) return; - file = CreateFileA(catalog, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + int attrcount, membercount; + + if (!pCryptCATCDFOpen) + { + win_skip("CryptCATCDFOpen is not available\n"); + return; + } + + /* Create the cdf file */ + file = CreateFileA(cdffileA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError()); - WriteFile(file, test_catalog, sizeof(test_catalog), &written, NULL); + WriteFile(file, test_cdf, sizeof(test_cdf) - 1, &written, NULL); CloseHandle(file); - hcat = pCryptCATOpen(NULL, 0, 0, 0, 0); - ok(hcat == INVALID_HANDLE_VALUE, "CryptCATOpen succeeded\n"); - - MultiByteToWideChar(CP_ACP, 0, catalog, -1, catalogW, MAX_PATH); - - hcat = pCryptCATOpen(catalogW, 0, 0, 0, 0); - ok(hcat != INVALID_HANDLE_VALUE, "CryptCATOpen failed %u\n", GetLastError()); - - m = pCryptCATEnumerateMember(NULL, NULL); - ok(m == NULL, "CryptCATEnumerateMember succeeded\n"); - - m = pCryptCATEnumerateMember(hcat, NULL); - ok(m != NULL, "CryptCATEnumerateMember failed %u\n", GetLastError()); - - ok(m->cbStruct == sizeof(CRYPTCATMEMBER), "unexpected size %u\n", m->cbStruct); - todo_wine ok(!lstrcmpW(m->pwszReferenceTag, hashmeW), "unexpected tag\n"); - ok(!memcmp(&m->gSubjectType, &subject, sizeof(subject)), "guid differs\n"); - ok(!m->fdwMemberFlags, "got %x expected 0\n", m->fdwMemberFlags); - ok(m->dwCertVersion == 0x200, "got %x expected 0x200\n", m->dwCertVersion); - ok(!m->dwReserved, "got %x expected 0\n", m->dwReserved); - ok(m->hReserved == NULL, "got %p expected NULL\n", m->hReserved); - - attr = pCryptCATEnumerateAttr(NULL, NULL, NULL); - ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); - - attr = pCryptCATEnumerateAttr(hcat, NULL, NULL); - ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); - - attr = pCryptCATEnumerateAttr(hcat, m, NULL); - ok(attr == NULL, "CryptCATEnumerateAttr succeeded\n"); - - m = pCryptCATEnumerateMember(hcat, m); - ok(m == NULL, "CryptCATEnumerateMember succeeded\n"); - - ret = pCryptCATClose(hcat); - ok(ret, "CryptCATClose failed\n"); - - DeleteFileA(catalog); + /* Don't enumerate attributes and members */ + trace("No attribs and members\n"); + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, NULL); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + + ret = pCryptCATCDFClose(catcdf); + todo_wine + { + ok(ret, "Expected success\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + + attrs = GetFileAttributesA(catfileA); + todo_wine + ok(attrs != INVALID_FILE_ATTRIBUTES, "Expected the catalog file to exist\n"); + + test_catalog_properties(catfileA, 0, 0); + DeleteFileA(catfileA); + + /* Only enumerate the attributes */ + trace("Only attributes\n"); + attrcount = membercount = 0; + catcdf = pCryptCATCDFOpen(cdffileW, NULL); + + catattr = NULL; + while ((catattr = pCryptCATCDFEnumCatAttributes(catcdf, catattr, NULL))) + { + ok(!lstrcmpW(catattr->pwszReferenceTag, attr1W) || + !lstrcmpW(catattr->pwszReferenceTag, attr2W), + "Expected 'attr1' or 'attr2'\n"); + + attrcount++; + } + todo_wine + ok(attrcount == 2, "Expected 2 attributes, got %d\n", attrcount); + + pCryptCATCDFClose(catcdf); + /* Eventhough the resulting catalogfile shows the attributes, they will not be enumerated */ + test_catalog_properties(catfileA, 0, 0); + DeleteFileA(catfileA); + + /* Only enumerate the members */ + trace("Only members\n"); + attrcount = membercount = 0; + catcdf = pCryptCATCDFOpen(cdffileW, NULL); + + catmember = NULL; + catmembertag = NULL; + while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, NULL, &catmember, FALSE, NULL))) + { + ok(!lstrcmpW(catmembertag, hashmeW), "Expected 'hashme'\n"); + membercount++; + } + todo_wine + ok(membercount == 1, "Expected 1 member, got %d\n", membercount); + + pCryptCATCDFClose(catcdf); + test_catalog_properties(catfileA, 0, 1); + DeleteFileA(catfileA); + + /* Enumerate members and attributes */ + trace("Attributes and members\n"); + attrcount = membercount = 0; + catcdf = pCryptCATCDFOpen(cdffileW, NULL); + + catattr = NULL; + while ((catattr = pCryptCATCDFEnumCatAttributes(catcdf, catattr, NULL))) + attrcount++; + todo_wine + ok(attrcount == 2, "Expected 2 attributes, got %d\n", attrcount); + + catmember = NULL; + catmembertag = NULL; + while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, NULL, &catmember, FALSE, NULL))) + membercount++; + todo_wine + ok(membercount == 1, "Expected 1 member, got %d\n", membercount); + + pCryptCATCDFClose(catcdf); + test_catalog_properties(catfileA, 2, 1); + DeleteFileA(catfileA); + + DeleteFileA(cdffileA); +} + +static void create_cdf_file(const CHAR *filename, const CHAR *contents) +{ + HANDLE file; + DWORD written; + + file = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + ok(file != INVALID_HANDLE_VALUE, "CreateFileA failed %u\n", GetLastError()); + WriteFile(file, contents, lstrlenA(contents), &written, NULL); + CloseHandle(file); +} + +#define CHECK_EXPECT(a, b) \ + do { \ + ok(a == error_area, "Expected %08x, got %08x\n", a, error_area); \ + ok(b == local_error, "Expected %08x, got %08x\n", b, local_error); \ + } while (0) + +/* Clear the variables (can't use 0) */ +#define CLEAR_EXPECT \ + error_area = local_error = -1 + +/* Set both variables so the callback routine can check if a call to it was unexpected */ +#define SET_UNEXPECTED \ + error_area = local_error = -2 + +static void test_cdf_parsing(void) +{ + static CHAR catfileA[] = "tempfile.cat"; + static CHAR cdffileA[] = "tempfile.cdf"; + static WCHAR cdffileW[] = {'t','e','m','p','f','i','l','e','.','c','d','f',0}; + CHAR cdf_contents[4096]; + CRYPTCATCDF *catcdf; + CRYPTCATATTRIBUTE *catattr; + CRYPTCATMEMBER *catmember; + WCHAR *catmembertag; + + if (!pCryptCATCDFOpen) + { + win_skip("CryptCATCDFOpen is not available\n"); + return; + } + + /* Empty file */ + DeleteFileA(cdffileA); + create_cdf_file(cdffileA, ""); + + CLEAR_EXPECT; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + CHECK_EXPECT(CRYPTCAT_E_AREA_HEADER, CRYPTCAT_E_CDF_TAGNOTFOUND); + ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n"); + todo_wine + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + DeleteFileA(cdffileA); + ok(!DeleteFileA(catfileA), "Didn't expect a catalog file to be created\n"); + + /* Just the header */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n"); + todo_wine + ok(GetLastError() == ERROR_SHARING_VIOLATION, "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + DeleteFileA(cdffileA); + + /* Header and member only */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "[CatalogFiles]\r\n"); + lstrcatA(cdf_contents, "hashme=.\\tempfile.cdf\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n"); + todo_wine + ok(GetLastError() == ERROR_SHARING_VIOLATION, "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + DeleteFileA(cdffileA); + ok(!DeleteFileA(catfileA), "Didn't expect a catalog file to be created\n"); + + /* Header and Name (no value) */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + ok(catcdf == NULL, "CryptCATCDFOpen succeeded\n"); + todo_wine + ok(GetLastError() == ERROR_SHARING_VIOLATION, "Expected ERROR_SHARING_VIOLATION, got %d\n", GetLastError()); + DeleteFileA(cdffileA); + ok(!DeleteFileA(catfileA), "Didn't expect a catalog file to be created\n"); + + /* Header and Name */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=tempfile.cat\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + pCryptCATCDFClose(catcdf); + DeleteFileA(cdffileA); + todo_wine + ok(DeleteFileA(catfileA), "Expected a catalog file to be created\n"); + + /* Header and non-existing member */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=tempfile.cat\r\n"); + lstrcatA(cdf_contents, "[CatalogFiles]\r\n"); + lstrcatA(cdf_contents, "hashme=.\\deadbeef.cdf\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + /* Loop through the members */ + CLEAR_EXPECT; + catmember = NULL; + catmembertag = NULL; + while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, cdf_callback, &catmember, FALSE, NULL))) ; + todo_wine + CHECK_EXPECT(CRYPTCAT_E_AREA_MEMBER, CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND); + pCryptCATCDFClose(catcdf); + DeleteFileA(cdffileA); + todo_wine + ok(DeleteFileA(catfileA), "Expected a catalog file to be created\n"); + + /* Header, correct member but no explicit newline */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=tempfile.cat\r\n"); + lstrcatA(cdf_contents, "[CatalogFiles]\r\n"); + lstrcatA(cdf_contents, "hashme=.\\tempfile.cdf\r"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + /* Loop through the members */ + CLEAR_EXPECT; + catmember = NULL; + catmembertag = NULL; + while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, cdf_callback, &catmember, FALSE, NULL))) ; + todo_wine + CHECK_EXPECT(CRYPTCAT_E_AREA_MEMBER, CRYPTCAT_E_CDF_MEMBER_FILE_PATH); + pCryptCATCDFClose(catcdf); + DeleteFileA(cdffileA); + todo_wine + ok(DeleteFileA(catfileA), "Expected a catalog file to be created\n"); + + /* Header and 2 duplicate members */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=tempfile.cat\r\n"); + lstrcatA(cdf_contents, "[CatalogFiles]\r\n"); + lstrcatA(cdf_contents, "hashme=.\\tempfile.cdf\r\n"); + lstrcatA(cdf_contents, "hashme=.\\tempfile.cdf\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + /* Loop through the members */ + SET_UNEXPECTED; + catmember = NULL; + catmembertag = NULL; + while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, cdf_callback, &catmember, FALSE, NULL))) ; + pCryptCATCDFClose(catcdf); + test_catalog_properties(catfileA, 0, 1); + DeleteFileA(cdffileA); + todo_wine + ok(DeleteFileA(catfileA), "Expected a catalog file to be created\n"); + + /* Wrong attribute */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=tempfile.cat\r\n"); + lstrcatA(cdf_contents, "CATATTR1=0x10010001:attr1\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + /* Loop through the attributes */ + CLEAR_EXPECT; + catattr = NULL; + while ((catattr = pCryptCATCDFEnumCatAttributes(catcdf, catattr, cdf_callback))) ; + todo_wine + CHECK_EXPECT(CRYPTCAT_E_AREA_ATTRIBUTE, CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES); + pCryptCATCDFClose(catcdf); + DeleteFileA(cdffileA); + todo_wine + ok(DeleteFileA(catfileA), "Expected a catalog file to be created\n"); + + /* Two identical attributes */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=tempfile.cat\r\n"); + lstrcatA(cdf_contents, "CATATTR1=0x10010001:attr1:value1\r\n"); + lstrcatA(cdf_contents, "CATATTR1=0x10010001:attr1:value1\r\n"); + lstrcatA(cdf_contents, "[CatalogFiles]\r\n"); + lstrcatA(cdf_contents, "hashme=.\\tempfile.cdf\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + /* Loop through the members */ + SET_UNEXPECTED; + catmember = NULL; + catmembertag = NULL; + while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, cdf_callback, &catmember, FALSE, NULL))) ; + /* Loop through the attributes */ + SET_UNEXPECTED; + catattr = NULL; + while ((catattr = pCryptCATCDFEnumCatAttributes(catcdf, catattr, cdf_callback))) ; + pCryptCATCDFClose(catcdf); + test_catalog_properties(catfileA, 1, 1); + DeleteFileA(cdffileA); + todo_wine + ok(DeleteFileA(catfileA), "Expected a catalog file to be created\n"); + + /* Two different attribute values with the same tag */ + lstrcpyA(cdf_contents, "[CatalogHeader]\r\n"); + lstrcatA(cdf_contents, "Name=tempfile.cat\r\n"); + lstrcatA(cdf_contents, "CATATTR1=0x10010001:attr1:value1\r\n"); + lstrcatA(cdf_contents, "CATATTR1=0x10010001:attr2:value2\r\n"); + lstrcatA(cdf_contents, "[CatalogFiles]\r\n"); + lstrcatA(cdf_contents, "hashme=.\\tempfile.cdf\r\n"); + create_cdf_file(cdffileA, cdf_contents); + + SET_UNEXPECTED; + SetLastError(0xdeadbeef); + catcdf = pCryptCATCDFOpen(cdffileW, cdf_callback); + todo_wine + { + ok(catcdf != NULL, "CryptCATCDFOpen failed\n"); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); + } + /* Loop through the members */ + SET_UNEXPECTED; + catmember = NULL; + catmembertag = NULL; + while ((catmembertag = pCryptCATCDFEnumMembersByCDFTagEx(catcdf, catmembertag, cdf_callback, &catmember, FALSE, NULL))) ; + /* Loop through the attributes */ + SET_UNEXPECTED; + catattr = NULL; + while ((catattr = pCryptCATCDFEnumCatAttributes(catcdf, catattr, cdf_callback))) ; + pCryptCATCDFClose(catcdf); + test_catalog_properties(catfileA, 1, 1); + DeleteFileA(cdffileA); + todo_wine + ok(DeleteFileA(catfileA), "Expected a catalog file to be created\n"); } START_TEST(crypt) @@ -567,6 +1102,11 @@ test_context(); test_calchash(); + /* Parameter checking only */ + test_CryptCATCDF_params(); + /* Test the parsing of a cdf file */ + test_cdf_parsing(); + /* Create a catalogfile out of our own catalog definition file */ + test_create_catalog_file(); test_CryptCATAdminAddRemoveCatalog(); - test_catalog_properties(); }
15 years, 10 months
1
0
0
0
[cwittich] 39255: sync wintrust and mscat32 with wine 1.1.14
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 31 23:42:03 2009 New Revision: 39255 URL:
http://svn.reactos.org/svn/reactos?rev=39255&view=rev
Log: sync wintrust and mscat32 with wine 1.1.14 Modified: trunk/reactos/dll/win32/mscat32/mscat32.spec trunk/reactos/dll/win32/wintrust/asn.c trunk/reactos/dll/win32/wintrust/crypt.c trunk/reactos/dll/win32/wintrust/softpub.c trunk/reactos/dll/win32/wintrust/wintrust.spec trunk/reactos/dll/win32/wintrust/wintrust_main.c trunk/reactos/include/psdk/mscat.h Modified: trunk/reactos/dll/win32/mscat32/mscat32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mscat32/mscat32.…
============================================================================== --- trunk/reactos/dll/win32/mscat32/mscat32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/mscat32/mscat32.spec [iso-8859-1] Sat Jan 31 23:42:03 2009 @@ -5,30 +5,30 @@ @ stdcall CryptCATAdminEnumCatalogFromHash(long ptr long long ptr) wintrust.CryptCATAdminEnumCatalogFromHash @ stdcall CryptCATAdminReleaseCatalogContext(long long long) wintrust.CryptCATAdminReleaseCatalogContext @ stdcall CryptCATAdminReleaseContext(long long) wintrust.CryptCATAdminReleaseContext -@ stub CryptCATCDFClose +@ stdcall CryptCATCDFClose(ptr) wintrust.CryptCATCDFClose @ stub CryptCATCDFEnumAttributes -@ stub CryptCATCDFEnumAttributesWithCDFTag -@ stub CryptCATCDFEnumCatAttributes +@ stdcall CryptCATCDFEnumAttributesWithCDFTag(ptr wstr ptr ptr ptr) wintrust.CryptCATCDFEnumAttributesWithCDFTag +@ stdcall CryptCATCDFEnumCatAttributes(ptr ptr ptr) wintrust.CryptCATCDFEnumCatAttributes @ stub CryptCATCDFEnumMembers -@ stub CryptCATCDFEnumMembersByCDFTag -@ stub CryptCATCDFOpen -@ stub CryptCATCatalogInfoFromContext +@ stdcall CryptCATCDFEnumMembersByCDFTag(ptr wstr ptr ptr long) wintrust.CryptCATCDFEnumMembersByCDFTag +@ stdcall CryptCATCDFOpen(wstr ptr) wintrust.CryptCATCDFOpen +@ stdcall CryptCATCatalogInfoFromContext(ptr ptr long) wintrust.CryptCATCatalogInfoFromContext @ stdcall CryptCATClose(long) wintrust.CryptCATClose -@ stub CryptCATEnumerateAttr -@ stub CryptCATEnumerateCatAttr +@ stdcall CryptCATEnumerateAttr(ptr ptr ptr) wintrust.CryptCATEnumerateAttr +@ stdcall CryptCATEnumerateCatAttr(ptr ptr) wintrust.CryptCATEnumerateCatAttr @ stdcall CryptCATEnumerateMember(long ptr) wintrust.CryptCATEnumerateMember -@ stub CryptCATGetAttrInfo -@ stub CryptCATGetCatAttrInfo -@ stub CryptCATGetMemberInfo -@ stub CryptCATHandleFromStore +@ stdcall CryptCATGetAttrInfo(ptr ptr wstr) wintrust.CryptCATGetAttrInfo +@ stdcall CryptCATGetCatAttrInfo(ptr wstr) wintrust.CryptCATGetCatAttrInfo +@ stdcall CryptCATGetMemberInfo(ptr wstr) wintrust.CryptCATGetMemberInfo +@ stdcall CryptCATHandleFromStore(ptr) wintrust.CryptCATHandleFromStore @ stdcall CryptCATOpen(wstr long long long long) wintrust.CryptCATOpen -@ stub CryptCATPersistStore -@ stub CryptCATPutAttrInfo -@ stub CryptCATPutCatAttrInfo -@ stub CryptCATPutMemberInfo -@ stub CryptCATStoreFromHandle +@ stdcall CryptCATPersistStore(ptr) wintrust.CryptCATPersistStore +@ stdcall CryptCATPutAttrInfo(ptr ptr wstr long long ptr) wintrust.CryptCATPutAttrInfo +@ stdcall CryptCATPutCatAttrInfo(ptr wstr long long ptr) wintrust.CryptCATPutCatAttrInfo +@ stdcall CryptCATPutMemberInfo(ptr wstr wstr ptr long long ptr) wintrust.CryptCATPutMemberInfo +@ stdcall CryptCATStoreFromHandle(ptr) wintrust.CryptCATStoreFromHandle @ stdcall -private DllRegisterServer() wintrust.mscat32DllRegisterServer @ stdcall -private DllUnregisterServer() wintrust.mscat32DllUnregisterServer -@ stub IsCatalogFile +@ stdcall IsCatalogFile(ptr wstr) wintrust.IsCatalogFile @ stub MsCatConstructHashTag @ stub MsCatFreeHashTag Modified: trunk/reactos/dll/win32/wintrust/asn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/asn.c?r…
============================================================================== --- trunk/reactos/dll/win32/wintrust/asn.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/asn.c [iso-8859-1] Sat Jan 31 23:42:03 2009 @@ -100,7 +100,7 @@ DWORD *pcbEncoded) { BOOL ret = TRUE; - const CRYPT_DATA_BLOB *blob = (const CRYPT_DATA_BLOB *)pvStructInfo; + const CRYPT_DATA_BLOB *blob = pvStructInfo; DWORD bytesNeeded, lenBytes; TRACE("(%d, %p), %p, %d\n", blob->cbData, blob->pbData, pbEncoded, @@ -140,7 +140,7 @@ __TRY { - const SPC_LINK *link = (const SPC_LINK *)pvStructInfo; + const SPC_LINK *link = pvStructInfo; DWORD bytesNeeded, lenBytes; switch (link->dwLinkChoice) @@ -352,7 +352,7 @@ __TRY { - const CRYPT_BIT_BLOB *blob = (const CRYPT_BIT_BLOB *)pvStructInfo; + const CRYPT_BIT_BLOB *blob = pvStructInfo; DWORD bytesNeeded, lenBytes, dataBytes; BYTE unusedBits; @@ -426,8 +426,7 @@ DWORD *pcbEncoded) { BOOL ret; - const struct AsnConstructedItem *item = - (const struct AsnConstructedItem *)pvStructInfo; + const struct AsnConstructedItem *item = pvStructInfo; DWORD len; if ((ret = item->encodeFunc(dwCertEncodingType, lpszStructType, @@ -473,8 +472,7 @@ LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, DWORD *pcbEncoded) { - const SPC_PE_IMAGE_DATA *imageData = - (const SPC_PE_IMAGE_DATA *)pvStructInfo; + const SPC_PE_IMAGE_DATA *imageData = pvStructInfo; BOOL ret = FALSE; TRACE("(0x%08x, %s, %p, %p, %p)\n", dwCertEncodingType, @@ -519,7 +517,7 @@ LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, DWORD *pcbEncoded) { - LPCSTR pszObjId = (LPCSTR)pvStructInfo; + LPCSTR pszObjId = pvStructInfo; DWORD bytesNeeded = 0, lenBytes; BOOL ret = TRUE; int firstPos = 0; @@ -637,7 +635,7 @@ LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, DWORD *pcbEncoded) { - const CRYPT_DER_BLOB *blob = (const CRYPT_DER_BLOB *)pvStructInfo; + const CRYPT_DER_BLOB *blob = pvStructInfo; BOOL ret = TRUE; if (!pbEncoded) @@ -661,8 +659,7 @@ DWORD dwCertEncodingType, LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, DWORD *pcbEncoded) { - const CRYPT_ALGORITHM_IDENTIFIER *algo = - (const CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo; + const CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo; static const BYTE asn1Null[] = { ASN_NULL, 0 }; static const CRYPT_DATA_BLOB nullBlob = { sizeof(asn1Null), (LPBYTE)asn1Null }; @@ -685,8 +682,7 @@ LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, DWORD *pcbEncoded) { - const CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue = - (const CRYPT_ATTRIBUTE_TYPE_VALUE *)pvStructInfo; + const CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue = pvStructInfo; struct AsnEncodeSequenceItem items[] = { { &typeValue->pszObjId, CRYPT_AsnEncodeOid, 0 }, { &typeValue->Value, CRYPT_CopyEncodedBlob, 0 }, @@ -706,7 +702,7 @@ LPCSTR lpszStructType, const void *pvStructInfo, BYTE *pbEncoded, DWORD *pcbEncoded) { - const struct SPCDigest *digest = (const struct SPCDigest *)pvStructInfo; + const struct SPCDigest *digest = pvStructInfo; struct AsnEncodeSequenceItem items[] = { { &digest->DigestAlgorithm, CRYPT_AsnEncodeAlgorithmIdWithNullParams, 0 }, { &digest->Digest, CRYPT_CopyEncodedBlob, 0 }, @@ -727,8 +723,7 @@ __TRY { - const SPC_INDIRECT_DATA_CONTENT *data = - (const SPC_INDIRECT_DATA_CONTENT *)pvStructInfo; + const SPC_INDIRECT_DATA_CONTENT *data = pvStructInfo; struct AsnEncodeSequenceItem items[] = { { &data->Data, CRYPT_AsnEncodeAttributeTypeValue, 0 }, { &data->DigestAlgorithm, CRYPT_AsnEncodeSPCDigest, 0 }, @@ -750,7 +745,7 @@ DWORD *pcbEncoded) { BOOL ret = TRUE; - LPCWSTR str = (LPCWSTR)pvStructInfo; + LPCWSTR str = pvStructInfo; DWORD bytesNeeded, lenBytes, strLen; if (str) @@ -895,8 +890,7 @@ DWORD significantBytes, lenBytes, bytesNeeded; BYTE padByte = 0; BOOL pad = FALSE; - const CRYPT_INTEGER_BLOB *blob = - (const CRYPT_INTEGER_BLOB *)pvStructInfo; + const CRYPT_INTEGER_BLOB *blob = pvStructInfo; significantBytes = blob->cbData; if (significantBytes) @@ -996,7 +990,7 @@ __TRY { - const CAT_MEMBERINFO *info = (const CAT_MEMBERINFO *)pvStructInfo; + const CAT_MEMBERINFO *info = pvStructInfo; struct AsnEncodeSequenceItem items[] = { { info->pwszSubjGuid, CRYPT_AsnEncodeBMPString, 0 }, { &info->dwCertVersion, CRYPT_AsnEncodeInt, 0 }, @@ -1024,7 +1018,7 @@ __TRY { - const CAT_NAMEVALUE *value = (const CAT_NAMEVALUE *)pvStructInfo; + const CAT_NAMEVALUE *value = pvStructInfo; struct AsnEncodeSequenceItem items[] = { { value->pwszTag, CRYPT_AsnEncodeBMPString, 0 }, { &value->fdwFlags, CRYPT_AsnEncodeInt, 0 }, @@ -1215,7 +1209,7 @@ CRYPT_DATA_BLOB *blob; BYTE lenBytes = GET_LEN_BYTES(pbEncoded[1]); - blob = (CRYPT_DATA_BLOB *)pvStructInfo; + blob = pvStructInfo; blob->cbData = dataLen; if (dwFlags & CRYPT_DECODE_NOCOPY_FLAG) blob->pbData = (BYTE *)pbEncoded + 1 + lenBytes; @@ -1260,7 +1254,7 @@ } else { - PSPC_LINK link = (PSPC_LINK)pvStructInfo; + PSPC_LINK link = pvStructInfo; DWORD i; link->dwLinkChoice = SPC_URL_LINK_CHOICE; @@ -1309,7 +1303,7 @@ } else { - PSPC_LINK link = (PSPC_LINK)pvStructInfo; + PSPC_LINK link = pvStructInfo; link->dwLinkChoice = SPC_MONIKER_LINK_CHOICE; /* pwszFile pointer was set by caller, copy it @@ -1347,7 +1341,7 @@ } else { - PSPC_LINK link = (PSPC_LINK)pvStructInfo; + PSPC_LINK link = pvStructInfo; DWORD i; const BYTE *ptr = pbEncoded + 2 + lenBytes + realLenBytes; @@ -1372,7 +1366,7 @@ } else { - PSPC_LINK link = (PSPC_LINK)pvStructInfo; + PSPC_LINK link = pvStructInfo; link->dwLinkChoice = SPC_FILE_LINK_CHOICE; link->u.pwszFile[0] = '\0'; @@ -1415,7 +1409,7 @@ } else { - SPC_LINK *link = (SPC_LINK *)pvStructInfo; + SPC_LINK *link = pvStructInfo; link->u.pwszFile = (LPWSTR)((BYTE *)pvStructInfo + sizeof(SPC_LINK)); @@ -1655,7 +1649,7 @@ *pcbStructInfo = bytesNeeded; if (startingPointer) - nextData = (BYTE *)startingPointer; + nextData = startingPointer; else nextData = (BYTE *)pvStructInfo + structSize; memset(pvStructInfo, 0, structSize); @@ -1706,7 +1700,7 @@ { CRYPT_BIT_BLOB *blob; - blob = (CRYPT_BIT_BLOB *)pvStructInfo; + blob = pvStructInfo; blob->cbData = dataLen - 1; blob->cUnusedBits = *(pbEncoded + 1 + GET_LEN_BYTES(pbEncoded[1])); @@ -1750,7 +1744,7 @@ { BYTE lenBytes = GET_LEN_BYTES(pbEncoded[1]); DWORD size; - SPC_LINK **pLink = (SPC_LINK **)pvStructInfo; + SPC_LINK **pLink = pvStructInfo; ret = CRYPT_AsnDecodeSPCLinkInternal(dwCertEncodingType, lpszStructType, pbEncoded + 1 + lenBytes, dataLen, dwFlags, NULL, &size); @@ -1959,7 +1953,7 @@ } else { - PCRYPT_OBJID_BLOB blob = (PCRYPT_OBJID_BLOB)pvStructInfo; + PCRYPT_OBJID_BLOB blob = pvStructInfo; *pcbStructInfo = bytesNeeded; blob->cbData = cbEncoded; @@ -1978,8 +1972,7 @@ LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo) { - CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue = - (CRYPT_ATTRIBUTE_TYPE_VALUE *)pvStructInfo; + CRYPT_ATTRIBUTE_TYPE_VALUE *typeValue = pvStructInfo; struct AsnDecodeSequenceItem items[] = { { ASN_OBJECTIDENTIFIER, offsetof(CRYPT_ATTRIBUTE_TYPE_VALUE, pszObjId), CRYPT_AsnDecodeOid, sizeof(LPSTR), FALSE, TRUE, @@ -2002,8 +1995,7 @@ LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo) { - CRYPT_ALGORITHM_IDENTIFIER *algo = - (CRYPT_ALGORITHM_IDENTIFIER *)pvStructInfo; + CRYPT_ALGORITHM_IDENTIFIER *algo = pvStructInfo; BOOL ret = TRUE; struct AsnDecodeSequenceItem items[] = { { ASN_OBJECTIDENTIFIER, offsetof(CRYPT_ALGORITHM_IDENTIFIER, pszObjId), @@ -2032,8 +2024,7 @@ LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo) { - struct SPCDigest *digest = - (struct SPCDigest *)pvStructInfo; + struct SPCDigest *digest = pvStructInfo; struct AsnDecodeSequenceItem items[] = { { ASN_SEQUENCEOF, offsetof(struct SPCDigest, DigestAlgorithm), CRYPT_AsnDecodeAlgorithmId, sizeof(CRYPT_ALGORITHM_IDENTIFIER), @@ -2156,7 +2147,7 @@ } else { - CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)pvStructInfo; + CRYPT_INTEGER_BLOB *blob = pvStructInfo; *pcbStructInfo = bytesNeeded; blob->cbData = dataLen; Modified: trunk/reactos/dll/win32/wintrust/crypt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/crypt.c…
============================================================================== --- trunk/reactos/dll/win32/wintrust/crypt.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/crypt.c [iso-8859-1] Sat Jan 31 23:42:03 2009 @@ -188,6 +188,8 @@ HeapFree(GetProcessHeap(), 0, target); return NULL; } + SetFileAttributesW(target, FILE_ATTRIBUTE_SYSTEM); + if (!(ci = HeapAlloc(GetProcessHeap(), 0, sizeof(*ci)))) { HeapFree(GetProcessHeap(), 0, target); @@ -959,6 +961,54 @@ FIXME("(%p %p %p) stub\n", pSubjectInfo, pcbIndirectData, pIndirectData); return FALSE; +} + + +/*********************************************************************** + * CryptCATCDFClose (WINTRUST.@) + */ +BOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *pCDF) +{ + FIXME("(%p) stub\n", pCDF); + + return FALSE; +} + +/*********************************************************************** + * CryptCATCDFEnumCatAttributes (WINTRUST.@) + */ +CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *pCDF, + CRYPTCATATTRIBUTE *pPrevAttr, + PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError) +{ + FIXME("(%p %p %p) stub\n", pCDF, pPrevAttr, pfnParseError); + + return NULL; +} + +/*********************************************************************** + * CryptCATCDFEnumMembersByCDFTagEx (WINTRUST.@) + */ +LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *pCDF, LPWSTR pwszPrevCDFTag, + PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError, + CRYPTCATMEMBER **ppMember, BOOL fContinueOnError, + LPVOID pvReserved) +{ + FIXME("(%p %s %p %p %d %p) stub\n", pCDF, debugstr_w(pwszPrevCDFTag), pfnParseError, + ppMember, fContinueOnError, pvReserved); + + return NULL; +} + +/*********************************************************************** + * CryptCATCDFOpen (WINTRUST.@) + */ +CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR pwszFilePath, + PFN_CDF_PARSE_ERROR_CALLBACK pfnParseError) +{ + FIXME("(%s %p) stub\n", debugstr_w(pwszFilePath), pfnParseError); + + return NULL; } static BOOL WINTRUST_GetSignedMsgFromPEFile(SIP_SUBJECTINFO *pSubjectInfo, Modified: trunk/reactos/dll/win32/wintrust/softpub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/softpub…
============================================================================== --- trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/softpub.c [iso-8859-1] Sat Jan 31 23:42:03 2009 @@ -795,7 +795,7 @@ { BOOL ret; WTD_GENERIC_CHAIN_POLICY_DATA *policyData = - (WTD_GENERIC_CHAIN_POLICY_DATA *)data->pWintrustData->pPolicyCallbackData; + data->pWintrustData->pPolicyCallbackData; TRACE("(%p)\n", data); @@ -961,7 +961,7 @@ { HRESULT err = NO_ERROR; /* not a typo, MS confused the types */ WTD_GENERIC_CHAIN_POLICY_DATA *policyData = - (WTD_GENERIC_CHAIN_POLICY_DATA *)data->pWintrustData->pPolicyCallbackData; + data->pWintrustData->pPolicyCallbackData; TRACE("(%p)\n", data); Modified: trunk/reactos/dll/win32/wintrust/wintrust.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
============================================================================== --- trunk/reactos/dll/win32/wintrust/wintrust.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/wintrust.spec [iso-8859-1] Sat Jan 31 23:42:03 2009 @@ -9,14 +9,14 @@ @ stdcall CryptCATAdminReleaseContext(long long) @ stdcall CryptCATAdminRemoveCatalog(ptr wstr long) @ stdcall CryptCATAdminResolveCatalogPath(ptr wstr ptr long) -@ stub CryptCATCDFClose +@ stdcall CryptCATCDFClose(ptr) @ stub CryptCATCDFEnumAttributes @ stub CryptCATCDFEnumAttributesWithCDFTag -@ stub CryptCATCDFEnumCatAttributes +@ stdcall CryptCATCDFEnumCatAttributes(ptr ptr ptr) @ stub CryptCATCDFEnumMembers @ stub CryptCATCDFEnumMembersByCDFTag -@ stub CryptCATCDFEnumMembersByCDFTagEx -@ stub CryptCATCDFOpen +@ stdcall CryptCATCDFEnumMembersByCDFTagEx(ptr wstr ptr ptr long ptr) +@ stdcall CryptCATCDFOpen(wstr ptr) @ stdcall CryptCATCatalogInfoFromContext(ptr ptr long) @ stdcall CryptCATClose(long) @ stdcall CryptCATEnumerateAttr(ptr ptr ptr) Modified: trunk/reactos/dll/win32/wintrust/wintrust_main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wintrust/wintrus…
============================================================================== --- trunk/reactos/dll/win32/wintrust/wintrust_main.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wintrust/wintrust_main.c [iso-8859-1] Sat Jan 31 23:42:03 2009 @@ -184,7 +184,7 @@ goto error; } - data->hWVTStateData = (HANDLE)provData; + data->hWVTStateData = provData; provData->pWintrustData = data; if (hwnd == INVALID_HANDLE_VALUE) provData->hWndParent = GetDesktopWindow(); @@ -215,7 +215,7 @@ WINTRUST_DATA *data) { DWORD err = ERROR_SUCCESS; - CRYPT_PROVIDER_DATA *provData = (CRYPT_PROVIDER_DATA *)data->hWVTStateData; + CRYPT_PROVIDER_DATA *provData = data->hWVTStateData; TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(actionID), data); @@ -254,8 +254,7 @@ /* Undocumented: the published software action is passed a path, * and pSIPClientData points to a WIN_TRUST_SUBJECT_FILE. */ - LPWIN_TRUST_SUBJECT_FILE subjectFile = - (LPWIN_TRUST_SUBJECT_FILE)data->pSIPClientData; + LPWIN_TRUST_SUBJECT_FILE subjectFile = data->pSIPClientData; WINTRUST_FILE_INFO fileInfo = { sizeof(fileInfo), 0 }; TRACE("subjectFile->hFile: %p\n", subjectFile->hFile); @@ -377,7 +376,7 @@ /* Not sure why, but native skips the policy check */ provData->psPfns->pfnCertCheckPolicy = NULL; - data->hWVTStateData = (HANDLE)provData; + data->hWVTStateData = provData; provData->pWintrustData = data; if (hwnd == INVALID_HANDLE_VALUE) provData->hWndParent = GetDesktopWindow(); @@ -584,7 +583,7 @@ static const GUID generic_chain_verify = WINTRUST_ACTION_GENERIC_CHAIN_VERIFY; static const GUID cert_action_verify = CERT_CERTIFICATE_ACTION_VERIFY; LONG err = ERROR_SUCCESS; - WINTRUST_DATA *actionData = (WINTRUST_DATA *)ActionData; + WINTRUST_DATA *actionData = ActionData; TRACE("(%p, %s, %p)\n", hwnd, debugstr_guid(ActionID), ActionData); dump_wintrust_data(ActionData); @@ -709,7 +708,7 @@ CRYPT_PROVIDER_DATA * WINAPI WTHelperProvDataFromStateData(HANDLE hStateData) { TRACE("%p\n", hStateData); - return (CRYPT_PROVIDER_DATA *)hStateData; + return hStateData; } /*********************************************************************** @@ -738,7 +737,7 @@ static BOOL WINAPI WINTRUST_enumUsages(PCCRYPT_OID_INFO pInfo, void *pvArg) { - PCCRYPT_OID_INFO **usages = (PCCRYPT_OID_INFO **)pvArg; + PCCRYPT_OID_INFO **usages = pvArg; DWORD cUsages; BOOL ret; @@ -756,7 +755,7 @@ */ for (cUsages = 0, ptr = *usages; *ptr; ptr++, cUsages++) ; - *usages = WINTRUST_ReAlloc((CRYPT_OID_INFO *)*usages, + *usages = WINTRUST_ReAlloc(*usages, (cUsages + 2) * sizeof(PCCRYPT_OID_INFO)); } if (*usages) @@ -809,7 +808,7 @@ } else if (action == 2) { - WINTRUST_Free((CRYPT_OID_INFO *)*usages); + WINTRUST_Free(*usages); *usages = NULL; ret = TRUE; } Modified: trunk/reactos/include/psdk/mscat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mscat.h?rev=3…
============================================================================== --- trunk/reactos/include/psdk/mscat.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/mscat.h [iso-8859-1] Sat Jan 31 23:42:03 2009 @@ -28,16 +28,46 @@ extern "C" { #endif +#define CRYPTCAT_OPEN_CREATENEW 0x00000001 +#define CRYPTCAT_OPEN_ALWAYS 0x00000002 +#define CRYPTCAT_OPEN_EXISTING 0x00000004 +#define CRYPTCAT_OPEN_EXCLUDE_PAGE_HASHES 0x00010000 +#define CRYPTCAT_OPEN_INCLUDE_PAGE_HASHES 0x00020000 +#define CRYPTCAT_OPEN_VERIFYSIGHASH 0x10000000 +#define CRYPTCAT_OPEN_NO_CONTENT_HCRYPTMSG 0x20000000 +#define CRYPTCAT_OPEN_SORTED 0x40000000 +#define CRYPTCAT_OPEN_FLAGS_MASK 0xffff0000 -#define CRYPTCAT_OPEN_CREATENEW 1 -#define CRYPTCAT_OPEN_ALWAYS 2 -#define CRYPTCAT_OPEN_EXISTING 4 +#define CRYPTCAT_E_AREA_HEADER 0x00000000 +#define CRYPTCAT_E_AREA_MEMBER 0x00010000 +#define CRYPTCAT_E_AREA_ATTRIBUTE 0x00020000 +#define CRYPTCAT_E_CDF_UNSUPPORTED 0x00000001 +#define CRYPTCAT_E_CDF_DUPLICATE 0x00000002 +#define CRYPTCAT_E_CDF_TAGNOTFOUND 0x00000004 +#define CRYPTCAT_E_CDF_MEMBER_FILE_PATH 0x00010001 +#define CRYPTCAT_E_CDF_MEMBER_INDIRECTDATA 0x00010002 +#define CRYPTCAT_E_CDF_MEMBER_FILENOTFOUND 0x00010004 + +#define CRYPTCAT_E_CDF_BAD_GUID_CONV 0x00020001 +#define CRYPTCAT_E_CDF_ATTR_TOOFEWVALUES 0x00020002 +#define CRYPTCAT_E_CDF_ATTR_TYPECOMBO 0x00020004 #include <pshpack8.h> -typedef struct CRYPTCATMEMBER_ { +typedef struct CRYPTCATATTRIBUTE_ +{ + DWORD cbStruct; + LPWSTR pwszReferenceTag; + DWORD dwAttrTypeAndAction; + DWORD cbValue; + BYTE *pbValue; + DWORD dwReserved; +} CRYPTCATATTRIBUTE; + +typedef struct CRYPTCATMEMBER_ +{ DWORD cbStruct; LPWSTR pwszReferenceTag; LPWSTR pwszFileName; @@ -51,24 +81,26 @@ CRYPT_ATTR_BLOB sEncodedMemberInfo; } CRYPTCATMEMBER; -typedef struct CRYPTCATATTRIBUTE_ -{ - DWORD cbStruct; - LPWSTR pwszReferenceTag; - DWORD dwAttrTypeAndAction; - DWORD cbValue; - BYTE *pbValue; - DWORD dwReserved; -}CRYPTCATATTRIBUTE; - -typedef struct CATALOG_INFO_ +typedef struct CATALOG_INFO_ { DWORD cbStruct; WCHAR wszCatalogFile[MAX_PATH]; } CATALOG_INFO; +typedef struct CRYPTCATCDF_ +{ + DWORD cbStruct; + HANDLE hFile; + DWORD dwCurFilePos; + DWORD dwLastMemberOffset; + BOOL fEOF; + LPWSTR pwszResultDir; + HANDLE hCATStore; +} CRYPTCATCDF; #include <poppack.h> + +typedef void (WINAPI *PFN_CDF_PARSE_ERROR_CALLBACK)(DWORD, DWORD, WCHAR *); BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN*,const GUID*,DWORD); HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN,PWSTR,PWSTR,DWORD); @@ -77,13 +109,23 @@ BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN,HCATINFO,DWORD); BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN,DWORD); BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN,LPCWSTR,DWORD); -BOOL WINAPI CryptCATClose(HANDLE); -BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO,CATALOG_INFO*,DWORD); - -CRYPTCATMEMBER* WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER*); +BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN, WCHAR *, CATALOG_INFO *, DWORD); +BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO, CATALOG_INFO *, DWORD); +BOOL WINAPI CryptCATCDFClose(CRYPTCATCDF *); +CRYPTCATATTRIBUTE * WINAPI CryptCATCDFEnumCatAttributes(CRYPTCATCDF *, CRYPTCATATTRIBUTE *, + PFN_CDF_PARSE_ERROR_CALLBACK); +LPWSTR WINAPI CryptCATCDFEnumMembersByCDFTagEx(CRYPTCATCDF *, LPWSTR, + PFN_CDF_PARSE_ERROR_CALLBACK, + CRYPTCATMEMBER **, BOOL, LPVOID); +CRYPTCATCDF * WINAPI CryptCATCDFOpen(LPWSTR, PFN_CDF_PARSE_ERROR_CALLBACK); +BOOL WINAPI CryptCATClose(HANDLE); +CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateAttr(HANDLE, CRYPTCATMEMBER *, CRYPTCATATTRIBUTE *); +CRYPTCATATTRIBUTE * WINAPI CryptCATEnumerateCatAttr(HANDLE, CRYPTCATATTRIBUTE *); +CRYPTCATMEMBER * WINAPI CryptCATEnumerateMember(HANDLE,CRYPTCATMEMBER *); +CRYPTCATATTRIBUTE * WINAPI CryptCATGetAttrInfo(HANDLE, CRYPTCATMEMBER *, LPWSTR); +CRYPTCATATTRIBUTE * WINAPI CryptCATGetCatAttrInfo(HANDLE, LPWSTR); +CRYPTCATMEMBER * WINAPI CryptCATGetMemberInfo(HANDLE, LPWSTR); HANDLE WINAPI CryptCATOpen(LPWSTR,DWORD,HCRYPTPROV,DWORD,DWORD); -CRYPTCATATTRIBUTE* WINAPI CryptCATEnumerateAttr(HANDLE hCatalog, CRYPTCATMEMBER*,CRYPTCATATTRIBUTE*); -CRYPTCATATTRIBUTE* WINAPI CryptCATEnumerateCatAttr(HANDLE,CRYPTCATATTRIBUTE*); #ifdef __cplusplus }
15 years, 10 months
1
0
0
0
[cwittich] 39254: don't set LastError as we fake success
by cwittich@svn.reactos.org
Author: cwittich Date: Sat Jan 31 23:39:56 2009 New Revision: 39254 URL:
http://svn.reactos.org/svn/reactos?rev=39254&view=rev
Log: don't set LastError as we fake success Modified: trunk/reactos/dll/win32/advapi32/sec/sec.c Modified: trunk/reactos/dll/win32/advapi32/sec/sec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/sec…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/sec.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/sec.c [iso-8859-1] Sat Jan 31 23:39:56 2009 @@ -541,7 +541,6 @@ BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved) { FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return TRUE; } @@ -578,7 +577,6 @@ EncryptFileW(LPCWSTR lpFileName) { FIXME("%s() not implemented!\n", __FUNCTION__); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return TRUE; }
15 years, 10 months
1
0
0
0
← Newer
1
...
53
54
55
56
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
Results per page:
10
25
50
100
200