Wine-devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 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
January 2020
- 75 participants
- 595 discussions
09 Jan '20
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
All of these functions are linked directly in the same or other modules.
dlls/advapi32/tests/security.c | 360 +++++++++++++--------------------
dlls/advapi32/tests/service.c | 13 +-
2 files changed, 147 insertions(+), 226 deletions(-)
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index d52afb8c82..48389bf42b 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -80,17 +80,11 @@ static VOID (WINAPI *pBuildTrusteeWithObjectsAndSidA)( PTRUSTEEA pTrustee,
GUID* pInheritedObjectGuid,
PSID pSid );
static LPSTR (WINAPI *pGetTrusteeNameA)( PTRUSTEEA pTrustee );
-static BOOL (WINAPI *pMakeSelfRelativeSD)( PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR, LPDWORD );
-static BOOL (WINAPI *pConvertStringSidToSidA)( LPCSTR str, PSID pSid );
static BOOL (WINAPI *pCheckTokenMembership)(HANDLE, PSID, PBOOL);
-static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorA)(LPCSTR, DWORD,
- PSECURITY_DESCRIPTOR*, PULONG );
static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorW)(LPCWSTR, DWORD,
PSECURITY_DESCRIPTOR*, PULONG );
static BOOL (WINAPI *pConvertSecurityDescriptorToStringSecurityDescriptorA)(PSECURITY_DESCRIPTOR, DWORD,
SECURITY_INFORMATION, LPSTR *, PULONG );
-static BOOL (WINAPI *pGetFileSecurityA)(LPCSTR, SECURITY_INFORMATION,
- PSECURITY_DESCRIPTOR, DWORD, LPDWORD);
static BOOL (WINAPI *pSetFileSecurityA)(LPCSTR, SECURITY_INFORMATION,
PSECURITY_DESCRIPTOR);
static DWORD (WINAPI *pGetNamedSecurityInfoA)(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION,
@@ -98,33 +92,21 @@ static DWORD (WINAPI *pGetNamedSecurityInfoA)(LPSTR, SE_OBJECT_TYPE, SECURITY_IN
PSECURITY_DESCRIPTOR*);
static DWORD (WINAPI *pSetNamedSecurityInfoA)(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION,
PSID, PSID, PACL, PACL);
-static PDWORD (WINAPI *pGetSidSubAuthority)(PSID, DWORD);
-static PUCHAR (WINAPI *pGetSidSubAuthorityCount)(PSID);
-static BOOL (WINAPI *pIsValidSid)(PSID);
static DWORD (WINAPI *pRtlAdjustPrivilege)(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
static BOOL (WINAPI *pCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*);
static BOOL (WINAPI *pDuplicateTokenEx)(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,
SECURITY_IMPERSONATION_LEVEL,TOKEN_TYPE,PHANDLE);
-static NTSTATUS (WINAPI *pLsaQueryInformationPolicy)(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*);
-static NTSTATUS (WINAPI *pLsaClose)(LSA_HANDLE);
-static NTSTATUS (WINAPI *pLsaFreeMemory)(PVOID);
-static NTSTATUS (WINAPI *pLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
static DWORD (WINAPI *pSetEntriesInAclW)(ULONG, PEXPLICIT_ACCESSW, PACL, PACL*);
-static DWORD (WINAPI *pSetEntriesInAclA)(ULONG, PEXPLICIT_ACCESSA, PACL, PACL*);
static BOOL (WINAPI *pSetSecurityDescriptorControl)(PSECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR_CONTROL,
SECURITY_DESCRIPTOR_CONTROL);
-static DWORD (WINAPI *pGetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
- PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*);
static DWORD (WINAPI *pSetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
PSID, PSID, PACL, PACL);
static NTSTATUS (WINAPI *pNtAccessCheck)(PSECURITY_DESCRIPTOR, HANDLE, ACCESS_MASK, PGENERIC_MAPPING,
PPRIVILEGE_SET, PULONG, PULONG, NTSTATUS*);
static BOOL (WINAPI *pCreateRestrictedToken)(HANDLE, DWORD, DWORD, PSID_AND_ATTRIBUTES, DWORD,
PLUID_AND_ATTRIBUTES, DWORD, PSID_AND_ATTRIBUTES, PHANDLE);
-static BOOL (WINAPI *pGetAclInformation)(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
-static BOOL (WINAPI *pGetAce)(PACL,DWORD,LPVOID*);
static NTSTATUS (WINAPI *pNtSetSecurityObject)(HANDLE,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR);
static NTSTATUS (WINAPI *pNtCreateFile)(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BLOCK,PLARGE_INTEGER,ULONG,ULONG,ULONG,ULONG,PVOID,ULONG);
static BOOL (WINAPI *pRtlDosPathNameToNtPathName_U)(LPCWSTR,PUNICODE_STRING,PWSTR*,CURDIR*);
@@ -184,30 +166,18 @@ static void init(void)
pAddAuditAccessAceEx = (void *)GetProcAddress(hmod, "AddAuditAccessAceEx");
pAddMandatoryAce = (void *)GetProcAddress(hmod, "AddMandatoryAce");
pCheckTokenMembership = (void *)GetProcAddress(hmod, "CheckTokenMembership");
- pConvertStringSecurityDescriptorToSecurityDescriptorA =
- (void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" );
pConvertStringSecurityDescriptorToSecurityDescriptorW =
(void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorW" );
pConvertSecurityDescriptorToStringSecurityDescriptorA =
(void *)GetProcAddress(hmod, "ConvertSecurityDescriptorToStringSecurityDescriptorA" );
- pGetFileSecurityA = (void *)GetProcAddress(hmod, "GetFileSecurityA" );
pSetFileSecurityA = (void *)GetProcAddress(hmod, "SetFileSecurityA" );
pCreateWellKnownSid = (void *)GetProcAddress( hmod, "CreateWellKnownSid" );
pGetNamedSecurityInfoA = (void *)GetProcAddress(hmod, "GetNamedSecurityInfoA");
pSetNamedSecurityInfoA = (void *)GetProcAddress(hmod, "SetNamedSecurityInfoA");
- pGetSidSubAuthority = (void *)GetProcAddress(hmod, "GetSidSubAuthority");
- pGetSidSubAuthorityCount = (void *)GetProcAddress(hmod, "GetSidSubAuthorityCount");
- pIsValidSid = (void *)GetProcAddress(hmod, "IsValidSid");
- pMakeSelfRelativeSD = (void *)GetProcAddress(hmod, "MakeSelfRelativeSD");
pSetEntriesInAclW = (void *)GetProcAddress(hmod, "SetEntriesInAclW");
- pSetEntriesInAclA = (void *)GetProcAddress(hmod, "SetEntriesInAclA");
pSetSecurityDescriptorControl = (void *)GetProcAddress(hmod, "SetSecurityDescriptorControl");
- pGetSecurityInfo = (void *)GetProcAddress(hmod, "GetSecurityInfo");
pSetSecurityInfo = (void *)GetProcAddress(hmod, "SetSecurityInfo");
pCreateRestrictedToken = (void *)GetProcAddress(hmod, "CreateRestrictedToken");
- pConvertStringSidToSidA = (void *)GetProcAddress(hmod, "ConvertStringSidToSidA");
- pGetAclInformation = (void *)GetProcAddress(hmod, "GetAclInformation");
- pGetAce = (void *)GetProcAddress(hmod, "GetAce");
pGetWindowsAccountDomainSid = (void *)GetProcAddress(hmod, "GetWindowsAccountDomainSid");
pEqualDomainSid = (void *)GetProcAddress(hmod, "EqualDomainSid");
pGetSidIdentifierAuthority = (void *)GetProcAddress(hmod, "GetSidIdentifierAuthority");
@@ -348,13 +318,7 @@ static void test_sid(void)
BOOL r, ret;
LPSTR str = NULL;
- if( !pConvertStringSidToSidA )
- {
- win_skip("ConvertSidToStringSidA or ConvertStringSidToSidA not available\n");
- return;
- }
-
- r = pConvertStringSidToSidA( NULL, NULL );
+ r = ConvertStringSidToSidA( NULL, NULL );
ok( !r, "expected failure with NULL parameters\n" );
if( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED )
return;
@@ -362,24 +326,24 @@ static void test_sid(void)
"expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n",
GetLastError() );
- r = pConvertStringSidToSidA( refs[0].refStr, NULL );
+ r = ConvertStringSidToSidA( refs[0].refStr, NULL );
ok( !r && GetLastError() == ERROR_INVALID_PARAMETER,
"expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n",
GetLastError() );
- r = pConvertStringSidToSidA( NULL, &str );
+ r = ConvertStringSidToSidA( NULL, &psid );
ok( !r && GetLastError() == ERROR_INVALID_PARAMETER,
"expected GetLastError() is ERROR_INVALID_PARAMETER, got %d\n",
GetLastError() );
- r = pConvertStringSidToSidA( noSubAuthStr, &psid );
+ r = ConvertStringSidToSidA( noSubAuthStr, &psid );
ok( !r,
"expected failure with no sub authorities\n" );
ok( GetLastError() == ERROR_INVALID_SID,
"expected GetLastError() is ERROR_INVALID_SID, got %d\n",
GetLastError() );
- ok(pConvertStringSidToSidA("S-1-5-21-93476-23408-4576", &psid), "ConvertStringSidToSidA failed\n");
+ ok(ConvertStringSidToSidA("S-1-5-21-93476-23408-4576", &psid), "ConvertStringSidToSidA failed\n");
pisid = psid;
ok(pisid->SubAuthorityCount == 4, "Invalid sub authority count - expected 4, got %d\n", pisid->SubAuthorityCount);
ok(pisid->SubAuthority[0] == 21, "Invalid subauthority 0 - expected 21, got %d\n", pisid->SubAuthority[0]);
@@ -403,7 +367,7 @@ static void test_sid(void)
if( psid )
FreeSid( psid );
- r = pConvertStringSidToSidA( refs[i].refStr, &psid );
+ r = ConvertStringSidToSidA( refs[i].refStr, &psid );
ok( r, "failed to parse sid string\n" );
pisid = psid;
ok( pisid &&
@@ -832,11 +796,6 @@ static void test_FileSecurity(void)
| GROUP_SECURITY_INFORMATION
| DACL_SECURITY_INFORMATION;
- if (!pGetFileSecurityA) {
- win_skip ("GetFileSecurity is not available\n");
- return;
- }
-
if (!pSetFileSecurityA) {
win_skip ("SetFileSecurity is not available\n");
return;
@@ -866,7 +825,7 @@ static void test_FileSecurity(void)
/* Get size needed */
retSize = 0;
SetLastError(0xdeadbeef);
- rc = pGetFileSecurityA (file, request, NULL, 0, &retSize);
+ rc = GetFileSecurityA (file, request, NULL, 0, &retSize);
if (!rc && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)) {
win_skip("GetFileSecurityA is not implemented\n");
goto cleanup;
@@ -883,7 +842,7 @@ static void test_FileSecurity(void)
/* Get security descriptor for real */
retSize = -1;
SetLastError(0xdeadbeef);
- rc = pGetFileSecurityA (file, request, sd, sdSize, &retSize);
+ rc = GetFileSecurityA (file, request, sd, sdSize, &retSize);
ok (rc, "GetFileSecurityA "
"was not expected to fail '%s': %d\n", file, GetLastError());
ok (retSize == sdSize ||
@@ -903,7 +862,7 @@ static void test_FileSecurity(void)
/* Get size needed */
retSize = 0;
SetLastError(0xdeadbeef);
- rc = pGetFileSecurityA (path, request, NULL, 0, &retSize);
+ rc = GetFileSecurityA (path, request, NULL, 0, &retSize);
ok (!rc, "GetFileSecurityA "
"was expected to fail for '%s'\n", path);
ok (GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetFileSecurityA "
@@ -916,7 +875,7 @@ static void test_FileSecurity(void)
/* Get security descriptor for real */
retSize = -1;
SetLastError(0xdeadbeef);
- rc = pGetFileSecurityA (path, request, sd, sdSize, &retSize);
+ rc = GetFileSecurityA (path, request, sd, sdSize, &retSize);
ok (rc, "GetFileSecurityA "
"was not expected to fail '%s': %d\n", path, GetLastError());
ok (retSize == sdSize ||
@@ -933,7 +892,7 @@ static void test_FileSecurity(void)
/* Old test */
strcpy (wintmpdir, "\\Should not exist");
SetLastError(0xdeadbeef);
- rc = pGetFileSecurityA (wintmpdir, OWNER_SECURITY_INFORMATION, NULL, 0, &sdSize);
+ rc = GetFileSecurityA (wintmpdir, OWNER_SECURITY_INFORMATION, NULL, 0, &sdSize);
ok (!rc, "GetFileSecurityA should fail for not existing directories/files\n");
ok (GetLastError() == ERROR_FILE_NOT_FOUND,
"last error ERROR_FILE_NOT_FOUND expected, got %d\n", GetLastError());
@@ -2191,6 +2150,7 @@ static void test_LookupAccountSid(void)
DWORD acc_sizeA, dom_sizeA, user_sizeA;
DWORD real_acc_sizeA, real_dom_sizeA;
WCHAR accountW[MAX_PATH], domainW[MAX_PATH];
+ LSA_OBJECT_ATTRIBUTES object_attributes;
DWORD acc_sizeW, dom_sizeW;
DWORD real_acc_sizeW, real_dom_sizeW;
PSID pUsersSid = NULL;
@@ -2202,6 +2162,8 @@ static void test_LookupAccountSid(void)
int i;
HANDLE hToken;
PTOKEN_USER ptiUser = NULL;
+ LSA_HANDLE handle;
+ NTSTATUS status;
/* native windows crashes if account size, domain size, or name use is NULL */
@@ -2415,79 +2377,67 @@ static void test_LookupAccountSid(void)
}
}
- pLsaQueryInformationPolicy = (void *)GetProcAddress( hmod, "LsaQueryInformationPolicy");
- pLsaOpenPolicy = (void *)GetProcAddress( hmod, "LsaOpenPolicy");
- pLsaFreeMemory = (void *)GetProcAddress( hmod, "LsaFreeMemory");
- pLsaClose = (void *)GetProcAddress( hmod, "LsaClose");
+ ZeroMemory(&object_attributes, sizeof(object_attributes));
+ object_attributes.Length = sizeof(object_attributes);
- if (pLsaQueryInformationPolicy && pLsaOpenPolicy && pLsaFreeMemory && pLsaClose)
- {
- NTSTATUS status;
- LSA_HANDLE handle;
- LSA_OBJECT_ATTRIBUTES object_attributes;
-
- ZeroMemory(&object_attributes, sizeof(object_attributes));
- object_attributes.Length = sizeof(object_attributes);
-
- status = pLsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle);
- ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
- "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status);
-
- /* try a more restricted access mask if necessary */
- if (status == STATUS_ACCESS_DENIED) {
- trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n");
- status = pLsaOpenPolicy( NULL, &object_attributes, POLICY_VIEW_LOCAL_INFORMATION, &handle);
- ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status);
- }
+ status = LsaOpenPolicy( NULL, &object_attributes, POLICY_ALL_ACCESS, &handle);
+ ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
+ "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status);
+
+ /* try a more restricted access mask if necessary */
+ if (status == STATUS_ACCESS_DENIED) {
+ trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n");
+ status = LsaOpenPolicy( NULL, &object_attributes, POLICY_VIEW_LOCAL_INFORMATION, &handle);
+ ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status);
+ }
+ if (status == STATUS_SUCCESS)
+ {
+ PPOLICY_ACCOUNT_DOMAIN_INFO info;
+ status = LsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (PVOID*)&info);
+ ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08x\n", status);
if (status == STATUS_SUCCESS)
{
- PPOLICY_ACCOUNT_DOMAIN_INFO info;
- status = pLsaQueryInformationPolicy(handle, PolicyAccountDomainInformation, (PVOID*)&info);
- ok(status == STATUS_SUCCESS, "LsaQueryInformationPolicy() failed, returned 0x%08x\n", status);
- if (status == STATUS_SUCCESS)
+ ok(info->DomainSid!=0, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) missing SID\n");
+ if (info->DomainSid)
{
- ok(info->DomainSid!=0, "LsaQueryInformationPolicy(PolicyAccountDomainInformation) missing SID\n");
- if (info->DomainSid)
- {
- int count = *GetSidSubAuthorityCount(info->DomainSid);
- CopySid(GetSidLengthRequired(count), &max_sid, info->DomainSid);
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_ADMIN;
- max_sid.sid.SubAuthorityCount = count + 1;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_GUEST;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_ADMINS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_USERS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_GUESTS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_COMPUTERS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_CONTROLLERS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_CERT_ADMINS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_SCHEMA_ADMINS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_ENTERPRISE_ADMINS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_POLICY_ADMINS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = DOMAIN_ALIAS_RID_RAS_SERVERS;
- test_sid_str((PSID)&max_sid.sid);
- max_sid.sid.SubAuthority[count] = 1000; /* first user account */
- test_sid_str((PSID)&max_sid.sid);
- }
-
- pLsaFreeMemory((LPVOID)info);
+ int count = *GetSidSubAuthorityCount(info->DomainSid);
+ CopySid(GetSidLengthRequired(count), &max_sid, info->DomainSid);
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_ADMIN;
+ max_sid.sid.SubAuthorityCount = count + 1;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_USER_RID_GUEST;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_ADMINS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_USERS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_GUESTS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_COMPUTERS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_CONTROLLERS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_CERT_ADMINS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_SCHEMA_ADMINS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_ENTERPRISE_ADMINS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_GROUP_RID_POLICY_ADMINS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = DOMAIN_ALIAS_RID_RAS_SERVERS;
+ test_sid_str((PSID)&max_sid.sid);
+ max_sid.sid.SubAuthority[count] = 1000; /* first user account */
+ test_sid_str((PSID)&max_sid.sid);
}
- status = pLsaClose(handle);
- ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status);
+ LsaFreeMemory(info);
}
+
+ status = LsaClose(handle);
+ ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status);
}
}
}
@@ -2847,7 +2797,7 @@ static void test_security_descriptor(void)
expect_eq(isDefault, FALSE, BOOL, "%d");
}
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA(
"O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)"
"(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)"
"(AU;NPSA;0x12019f;;;SU)", SDDL_REVISION_1, (void **)&sd_rel, NULL);
@@ -3449,14 +3399,8 @@ static void test_SetEntriesInAclA(void)
static const CHAR szEveryone[] = {'E','v','e','r','y','o','n','e',0};
static const CHAR szCurrentUser[] = { 'C','U','R','R','E','N','T','_','U','S','E','R','\0'};
- if (!pSetEntriesInAclA)
- {
- win_skip("SetEntriesInAclA is not available\n");
- return;
- }
-
NewAcl = (PACL)0xdeadbeef;
- res = pSetEntriesInAclA(0, NULL, NULL, &NewAcl);
+ res = SetEntriesInAclA(0, NULL, NULL, &NewAcl);
if(res == ERROR_CALL_NOT_IMPLEMENTED)
{
win_skip("SetEntriesInAclA is not implemented\n");
@@ -3496,7 +3440,7 @@ static void test_SetEntriesInAclA(void)
ExplicitAccess.Trustee.ptstrName = EveryoneSid;
ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
ExplicitAccess.Trustee.pMultipleTrustee = NULL;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
@@ -3504,7 +3448,7 @@ static void test_SetEntriesInAclA(void)
ExplicitAccess.Trustee.TrusteeType = TRUSTEE_IS_UNKNOWN;
ExplicitAccess.Trustee.pMultipleTrustee = NULL;
ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
@@ -3517,13 +3461,13 @@ static void test_SetEntriesInAclA(void)
{
ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME;
ExplicitAccess.Trustee.ptstrName = (LPSTR)szEveryone;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_BAD_FORM;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_INVALID_PARAMETER ||
broken(res == ERROR_NOT_SUPPORTED), /* NT4 */
"SetEntriesInAclA failed: %u\n", res);
@@ -3533,7 +3477,7 @@ static void test_SetEntriesInAclA(void)
ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME;
ExplicitAccess.Trustee.MultipleTrusteeOperation = TRUSTEE_IS_IMPERSONATE;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_INVALID_PARAMETER ||
broken(res == ERROR_NOT_SUPPORTED), /* NT4 */
"SetEntriesInAclA failed: %u\n", res);
@@ -3543,7 +3487,7 @@ static void test_SetEntriesInAclA(void)
ExplicitAccess.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE;
ExplicitAccess.grfAccessMode = SET_ACCESS;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
@@ -3551,7 +3495,7 @@ static void test_SetEntriesInAclA(void)
ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_NAME;
ExplicitAccess.Trustee.ptstrName = (LPSTR)szCurrentUser;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
@@ -3559,7 +3503,7 @@ static void test_SetEntriesInAclA(void)
ExplicitAccess.grfAccessMode = REVOKE_ACCESS;
ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID;
ExplicitAccess.Trustee.ptstrName = UsersSid;
- res = pSetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
+ res = SetEntriesInAclA(1, &ExplicitAccess, OldAcl, &NewAcl);
ok(res == ERROR_SUCCESS, "SetEntriesInAclA failed: %u\n", res);
ok(NewAcl != NULL, "returned acl was NULL\n");
LocalFree(NewAcl);
@@ -3595,7 +3539,7 @@ static void test_inherited_dacl(PACL dacl, PSID admin_sid, PSID user_sid, DWORD
ACCESS_ALLOWED_ACE *ace;
BOOL bret;
- bret = pGetAclInformation(dacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(dacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok_(__FILE__, line)(bret, "GetAclInformation failed\n");
todo_wine_if (todo_count)
@@ -3605,7 +3549,7 @@ static void test_inherited_dacl(PACL dacl, PSID admin_sid, PSID user_sid, DWORD
if (acl_size.AceCount > 0)
{
- bret = pGetAce(dacl, 0, (VOID **)&ace);
+ bret = GetAce(dacl, 0, (VOID **)&ace);
ok_(__FILE__, line)(bret, "Failed to get Current User ACE\n");
bret = EqualSid(&ace->SidStart, user_sid);
@@ -3623,7 +3567,7 @@ static void test_inherited_dacl(PACL dacl, PSID admin_sid, PSID user_sid, DWORD
}
if (acl_size.AceCount > 1)
{
- bret = pGetAce(dacl, 1, (VOID **)&ace);
+ bret = GetAce(dacl, 1, (VOID **)&ace);
ok_(__FILE__, line)(bret, "Failed to get Administators Group ACE\n");
bret = EqualSid(&ace->SidStart, admin_sid);
@@ -3662,7 +3606,7 @@ static void test_CreateDirectoryA(void)
DWORD error;
PACL pDacl;
- if (!pGetSecurityInfo || !pGetNamedSecurityInfoA || !pCreateWellKnownSid)
+ if (!pGetNamedSecurityInfoA || !pCreateWellKnownSid)
{
win_skip("Required functions are not available\n");
return;
@@ -3762,11 +3706,10 @@ static void test_CreateDirectoryA(void)
ok(hTemp != INVALID_HANDLE_VALUE, "CreateFile error %u\n", GetLastError());
HeapFree(GetProcessHeap(), 0, pDacl);
- error = pGetSecurityInfo(hTemp, SE_FILE_OBJECT,
- OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
- (PSID *)&owner, NULL, &pDacl, NULL, &pSD);
+ error = GetSecurityInfo(hTemp, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
+ (PSID *)&owner, NULL, &pDacl, NULL, &pSD);
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
todo_wine
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
@@ -3780,7 +3723,7 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
if (error == ERROR_SUCCESS)
{
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
todo_wine
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
@@ -3842,11 +3785,10 @@ static void test_CreateDirectoryA(void)
pRtlFreeUnicodeString(&tmpfileW);
HeapFree(GetProcessHeap(), 0, pDacl);
- error = pGetSecurityInfo(hTemp, SE_FILE_OBJECT,
- OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
- (PSID *)&owner, NULL, &pDacl, NULL, &pSD);
+ error = GetSecurityInfo(hTemp, SE_FILE_OBJECT, OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
+ (PSID *)&owner, NULL, &pDacl, NULL, &pSD);
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
todo_wine
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
@@ -3860,7 +3802,7 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
if (error == ERROR_SUCCESS)
{
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
todo_wine
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
@@ -4035,11 +3977,11 @@ static void test_GetNamedSecurityInfoA(void)
}
ok(!error, "GetNamedSecurityInfo failed with error %d\n", error);
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
if (acl_size.AceCount > 0)
{
- bret = pGetAce(pDacl, 0, (VOID **)&ace);
+ bret = GetAce(pDacl, 0, (VOID **)&ace);
ok(bret, "Failed to get Current User ACE.\n");
bret = EqualSid(&ace->SidStart, user_sid);
todo_wine ok(bret, "Current User ACE (%s) != Current User SID (%s).\n",
@@ -4051,7 +3993,7 @@ static void test_GetNamedSecurityInfoA(void)
}
if (acl_size.AceCount > 1)
{
- bret = pGetAce(pDacl, 1, (VOID **)&ace);
+ bret = GetAce(pDacl, 1, (VOID **)&ace);
ok(bret, "Failed to get Administators Group ACE.\n");
bret = EqualSid(&ace->SidStart, admin_sid);
todo_wine ok(bret || broken(!bret) /* win2k */,
@@ -4077,11 +4019,11 @@ static void test_GetNamedSecurityInfoA(void)
NULL, NULL, &pDacl, NULL, &pSD);
ok(!error, "GetNamedSecurityInfo failed with error %d\n", error);
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
if (acl_size.AceCount > 0)
{
- bret = pGetAce(pDacl, 0, (VOID **)&ace);
+ bret = GetAce(pDacl, 0, (VOID **)&ace);
ok(bret, "Failed to get ACE.\n");
todo_wine ok(((ACE_HEADER *)ace)->AceFlags & INHERITED_ACE,
"ACE has unexpected flags: 0x%x\n", ((ACE_HEADER *)ace)->AceFlags);
@@ -4217,12 +4159,12 @@ static void test_GetNamedSecurityInfoA(void)
ok(bret, "GetSecurityDescriptorDacl failed with error %d\n", GetLastError());
ok(dacl_present, "DACL should be present\n");
ok(pDacl && IsValidAcl(pDacl), "GetSecurityDescriptorDacl returned invalid DACL.\n");
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
ok(acl_size.AceCount != 0, "GetAclInformation returned no ACLs\n");
for (i=0; i<acl_size.AceCount; i++)
{
- bret = pGetAce(pDacl, i, (VOID **)&ace);
+ bret = GetAce(pDacl, i, (VOID **)&ace);
ok(bret, "Failed to get ACE %d.\n", i);
bret = EqualSid(&ace->SidStart, users_sid);
if (bret) users_ace_id = i;
@@ -4233,7 +4175,7 @@ static void test_GetNamedSecurityInfoA(void)
"Builtin Users ACE not found.\n");
if (users_ace_id != -1)
{
- bret = pGetAce(pDacl, users_ace_id, (VOID **)&ace);
+ bret = GetAce(pDacl, users_ace_id, (VOID **)&ace);
ok(bret, "Failed to get Builtin Users ACE.\n");
flags = ((ACE_HEADER *)ace)->AceFlags;
ok(flags == (INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE)
@@ -4250,7 +4192,7 @@ static void test_GetNamedSecurityInfoA(void)
ok(admins_ace_id != -1, "Builtin Admins ACE not found.\n");
if (admins_ace_id != -1)
{
- bret = pGetAce(pDacl, admins_ace_id, (VOID **)&ace);
+ bret = GetAce(pDacl, admins_ace_id, (VOID **)&ace);
ok(bret, "Failed to get Builtin Admins ACE.\n");
flags = ((ACE_HEADER *)ace)->AceFlags;
ok(flags == 0x0
@@ -4320,18 +4262,12 @@ static void test_ConvertStringSecurityDescriptor(void)
{ "D:(D;;GA;;;Nonexistent account)", SDDL_REVISION_1, FALSE, ERROR_INVALID_ACL, ERROR_INVALID_SID } /* W2K */
};
- if (!pConvertStringSecurityDescriptorToSecurityDescriptorA)
- {
- win_skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n");
- return;
- }
-
for (i = 0; i < ARRAY_SIZE(cssd); i++)
{
DWORD GLE;
SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA(
cssd[i].sidstring, cssd[i].revision, &pSD, NULL);
GLE = GetLastError();
ok(ret == cssd[i].ret, "(%02u) Expected %s (%d)\n", i, cssd[i].ret ? "success" : "failure", GLE);
@@ -4345,7 +4281,7 @@ static void test_ConvertStringSecurityDescriptor(void)
/* test behaviour with NULL parameters */
SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA(
NULL, 0xdeadbeef, &pSD, NULL);
todo_wine
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
@@ -4360,14 +4296,14 @@ static void test_ConvertStringSecurityDescriptor(void)
GetLastError());
SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA(
"D:(A;;ROB;;;WD)", 0xdeadbeef, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
GetLastError());
SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA(
"D:(A;;ROB;;;WD)", SDDL_REVISION_1, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
"ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_PARAMETER instead of %d\n",
@@ -4381,7 +4317,7 @@ static void test_ConvertStringSecurityDescriptor(void)
LocalFree(pSD);
SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA(
"D:P(A;;GRGW;;;BA)(A;;GRGW;;;S-1-5-21-0-0-0-1000)S:(ML;;NWNR;;;S-1-16-12288)", SDDL_REVISION_1, &pSD, NULL);
ok(ret || broken(!ret && GetLastError() == ERROR_INVALID_DATATYPE) /* win2k */,
"ConvertStringSecurityDescriptorToSecurityDescriptor failed with error %u\n", GetLastError());
@@ -4390,7 +4326,7 @@ static void test_ConvertStringSecurityDescriptor(void)
/* empty DACL */
size = 0;
SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA("D:", SDDL_REVISION_1, &pSD, &size);
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA("D:", SDDL_REVISION_1, &pSD, &size);
ok(ret, "unexpected error %u\n", GetLastError());
ok(size == sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sizeof(ACL), "got %u\n", size);
acl = (ACL *)((char *)pSD + sizeof(SECURITY_DESCRIPTOR_RELATIVE));
@@ -4404,7 +4340,7 @@ static void test_ConvertStringSecurityDescriptor(void)
/* empty SACL */
size = 0;
SetLastError(0xdeadbeef);
- ret = pConvertStringSecurityDescriptorToSecurityDescriptorA("S:", SDDL_REVISION_1, &pSD, &size);
+ ret = ConvertStringSecurityDescriptorToSecurityDescriptorA("S:", SDDL_REVISION_1, &pSD, &size);
ok(ret, "unexpected error %u\n", GetLastError());
ok(size == sizeof(SECURITY_DESCRIPTOR_RELATIVE) + sizeof(ACL), "got %u\n", size);
acl = (ACL *)((char *)pSD + sizeof(SECURITY_DESCRIPTOR_RELATIVE));
@@ -4470,7 +4406,7 @@ static void test_ConvertSecurityDescriptorToString(void)
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
CHECK_RESULT_AND_FREE("O:SY");
- pConvertStringSidToSidA("S-1-5-21-93476-23408-4576", &psid);
+ ConvertStringSidToSidA("S-1-5-21-93476-23408-4576", &psid);
SetSecurityDescriptorGroup(&desc, psid, TRUE);
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576");
@@ -4488,7 +4424,7 @@ static void test_ConvertSecurityDescriptorToString(void)
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:");
- pConvertStringSidToSidA("S-1-5-6", &psid2);
+ ConvertStringSidToSidA("S-1-5-6", &psid2);
pAddAccessAllowedAceEx(pacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE, 0xf0000000, psid2);
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)");
@@ -4630,13 +4566,7 @@ static void test_PrivateObjectSecurity(void)
PSECURITY_DESCRIPTOR buf;
BOOL ret;
- if (!pConvertStringSecurityDescriptorToSecurityDescriptorA)
- {
- win_skip("ConvertStringSecurityDescriptorToSecurityDescriptor is not available\n");
- return;
- }
-
- ok(pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ok(ConvertStringSecurityDescriptorToSecurityDescriptorA(
"O:SY"
"G:S-1-5-21-93476-23408-4576"
"D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)"
@@ -4648,7 +4578,7 @@ static void test_PrivateObjectSecurity(void)
LocalFree(sec);
- ok(pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ok(ConvertStringSecurityDescriptorToSecurityDescriptorA(
"O:SY"
"G:S-1-5-21-93476-23408-4576",
SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n");
@@ -4657,7 +4587,7 @@ static void test_PrivateObjectSecurity(void)
LocalFree(sec);
- ok(pConvertStringSecurityDescriptorToSecurityDescriptorA(
+ ok(ConvertStringSecurityDescriptorToSecurityDescriptorA(
"O:SY"
"G:S-1-5-21-93476-23408-4576"
"D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"
@@ -4786,7 +4716,7 @@ static void test_GetSecurityInfo(void)
BYTE flags;
DWORD ret;
- if (!pGetSecurityInfo || !pSetSecurityInfo)
+ if (!pSetSecurityInfo)
{
win_skip("[Get|Set]SecurityInfo is not available\n");
return;
@@ -4816,7 +4746,7 @@ static void test_GetSecurityInfo(void)
return;
}
- ret = pGetSecurityInfo(obj, SE_FILE_OBJECT,
+ ret = GetSecurityInfo(obj, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
&owner, &group, &pDacl, NULL, &pSD);
if (ret == ERROR_CALL_NOT_IMPLEMENTED)
@@ -4845,7 +4775,7 @@ static void test_GetSecurityInfo(void)
/* If we don't ask for the security descriptor, Windows will still give us
the other stuff, leaving us no way to free it. */
- ret = pGetSecurityInfo(obj, SE_FILE_OBJECT,
+ ret = GetSecurityInfo(obj, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
&owner, &group, &pDacl, NULL, NULL);
ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret);
@@ -4872,15 +4802,15 @@ static void test_GetSecurityInfo(void)
ret = pSetSecurityInfo(obj, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION,
NULL, NULL, pDacl, NULL);
ok(ret == ERROR_SUCCESS, "SetSecurityInfo returned %d\n", ret);
- ret = pGetSecurityInfo(obj, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION,
+ ret = GetSecurityInfo(obj, SE_FILE_OBJECT, DACL_SECURITY_INFORMATION,
NULL, NULL, &pDacl, NULL, &pSD);
ok(ret == ERROR_SUCCESS, "GetSecurityInfo returned %d\n", ret);
ok(pDacl && IsValidAcl(pDacl), "GetSecurityInfo returned invalid DACL.\n");
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
if (acl_size.AceCount > 0)
{
- bret = pGetAce(pDacl, 0, (VOID **)&ace);
+ bret = GetAce(pDacl, 0, (VOID **)&ace);
ok(bret, "Failed to get Current User ACE.\n");
bret = EqualSid(&ace->SidStart, user_sid);
todo_wine ok(bret, "Current User ACE (%s) != Current User SID (%s).\n",
@@ -4892,7 +4822,7 @@ static void test_GetSecurityInfo(void)
}
if (acl_size.AceCount > 1)
{
- bret = pGetAce(pDacl, 1, (VOID **)&ace);
+ bret = GetAce(pDacl, 1, (VOID **)&ace);
ok(bret, "Failed to get Administators Group ACE.\n");
bret = EqualSid(&ace->SidStart, admin_sid);
todo_wine ok(bret, "Administators Group ACE (%s) != Administators Group SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid));
@@ -4918,7 +4848,7 @@ static void test_GetSecurityInfo(void)
FreeSid(domain_sid);
/* Test querying the ownership of a process */
- ret = pGetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT,
+ ret = GetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT,
OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION,
NULL, NULL, NULL, NULL, &pSD);
ok(!ret, "GetNamedSecurityInfo failed with error %d\n", ret);
@@ -4936,7 +4866,7 @@ static void test_GetSecurityInfo(void)
LocalFree(pSD);
/* Test querying the DACL of a process */
- ret = pGetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION,
+ ret = GetSecurityInfo(GetCurrentProcess(), SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION,
NULL, NULL, NULL, NULL, &pSD);
ok(!ret, "GetSecurityInfo failed with error %d\n", ret);
@@ -4944,12 +4874,12 @@ static void test_GetSecurityInfo(void)
ok(bret, "GetSecurityDescriptorDacl failed with error %d\n", GetLastError());
ok(dacl_present, "DACL should be present\n");
ok(pDacl && IsValidAcl(pDacl), "GetSecurityDescriptorDacl returned invalid DACL.\n");
- bret = pGetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
ok(acl_size.AceCount != 0, "GetAclInformation returned no ACLs\n");
for (i=0; i<acl_size.AceCount; i++)
{
- bret = pGetAce(pDacl, i, (VOID **)&ace);
+ bret = GetAce(pDacl, i, (VOID **)&ace);
ok(bret, "Failed to get ACE %d.\n", i);
bret = EqualSid(&ace->SidStart, domain_users_sid);
if (bret) domain_users_ace_id = i;
@@ -4960,7 +4890,7 @@ static void test_GetSecurityInfo(void)
"Domain Users ACE not found.\n");
if (domain_users_ace_id != -1)
{
- bret = pGetAce(pDacl, domain_users_ace_id, (VOID **)&ace);
+ bret = GetAce(pDacl, domain_users_ace_id, (VOID **)&ace);
ok(bret, "Failed to get Domain Users ACE.\n");
flags = ((ACE_HEADER *)ace)->AceFlags;
ok(flags == (INHERIT_ONLY_ACE|CONTAINER_INHERIT_ACE),
@@ -4973,7 +4903,7 @@ static void test_GetSecurityInfo(void)
"Builtin Admins ACE not found.\n");
if (admins_ace_id != -1)
{
- bret = pGetAce(pDacl, admins_ace_id, (VOID **)&ace);
+ bret = GetAce(pDacl, admins_ace_id, (VOID **)&ace);
ok(bret, "Failed to get Builtin Admins ACE.\n");
flags = ((ACE_HEADER *)ace)->AceFlags;
ok(flags == 0x0, "Builtin Admins ACE has unexpected flags (0x%x != 0x0)\n", flags);
@@ -4987,26 +4917,21 @@ static void test_GetSidSubAuthority(void)
{
PSID psid = NULL;
- if (!pGetSidSubAuthority || !pConvertStringSidToSidA || !pIsValidSid || !pGetSidSubAuthorityCount)
- {
- win_skip("Some functions not available\n");
- return;
- }
/* Note: on windows passing in an invalid index like -1, lets GetSidSubAuthority return 0x05000000 but
still GetLastError returns ERROR_SUCCESS then. We don't test these unlikely cornercases here for now */
- ok(pConvertStringSidToSidA("S-1-5-21-93476-23408-4576",&psid),"ConvertStringSidToSidA failed\n");
- ok(pIsValidSid(psid),"Sid is not valid\n");
+ ok(ConvertStringSidToSidA("S-1-5-21-93476-23408-4576",&psid),"ConvertStringSidToSidA failed\n");
+ ok(IsValidSid(psid),"Sid is not valid\n");
SetLastError(0xbebecaca);
- ok(*pGetSidSubAuthorityCount(psid) == 4,"GetSidSubAuthorityCount gave %d expected 4\n",*pGetSidSubAuthorityCount(psid));
+ ok(*GetSidSubAuthorityCount(psid) == 4,"GetSidSubAuthorityCount gave %d expected 4\n", *GetSidSubAuthorityCount(psid));
ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError());
SetLastError(0xbebecaca);
- ok(*pGetSidSubAuthority(psid,0) == 21,"GetSidSubAuthority gave %d expected 21\n",*pGetSidSubAuthority(psid,0));
+ ok(*GetSidSubAuthority(psid,0) == 21,"GetSidSubAuthority gave %d expected 21\n", *GetSidSubAuthority(psid,0));
ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError());
SetLastError(0xbebecaca);
- ok(*pGetSidSubAuthority(psid,1) == 93476,"GetSidSubAuthority gave %d expected 93476\n",*pGetSidSubAuthority(psid,1));
+ ok(*GetSidSubAuthority(psid,1) == 93476,"GetSidSubAuthority gave %d expected 93476\n", *GetSidSubAuthority(psid,1));
ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError());
SetLastError(0xbebecaca);
- ok(pGetSidSubAuthority(psid,4) != NULL,"Expected out of bounds GetSidSubAuthority to return a non-NULL pointer\n");
+ ok(GetSidSubAuthority(psid,4) != NULL,"Expected out of bounds GetSidSubAuthority to return a non-NULL pointer\n");
ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError());
LocalFree(psid);
}
@@ -6372,7 +6297,7 @@ static void test_default_dacl_owner_sid(void)
index = 0;
found = FALSE;
- while (pGetAce( dacl, index++, (void **)&ace ))
+ while (GetAce( dacl, index++, (void **)&ace ))
{
if (EqualSid( &ace->SidStart, owner )) found = TRUE;
}
@@ -6533,7 +6458,7 @@ static void test_AddMandatoryAce(void)
index = 0;
found = FALSE;
- while (pGetAce(acl, index++, (void **)&ace))
+ while (GetAce(acl, index++, (void **)&ace))
{
if (ace->Header.AceType != SYSTEM_MANDATORY_LABEL_ACE_TYPE) continue;
ok(ace->Header.AceFlags == 0, "Expected flags 0, got %x\n", ace->Header.AceFlags);
@@ -6566,11 +6491,11 @@ static void test_AddMandatoryAce(void)
ok(present, "SACL not present\n");
ok(sacl != (void *)0xdeadbeef, "SACL not set\n");
ok(!defaulted, "SACL defaulted\n");
- ret = pGetAclInformation(sacl, &acl_size_info, sizeof(acl_size_info), AclSizeInformation);
+ ret = GetAclInformation(sacl, &acl_size_info, sizeof(acl_size_info), AclSizeInformation);
ok(ret, "GetAclInformation failed with error %u\n", GetLastError());
ok(acl_size_info.AceCount == 1, "SACL contains an unexpected ACE count %u\n", acl_size_info.AceCount);
- ret = pGetAce(sacl, 0, (void **)&ace);
+ ret = GetAce(sacl, 0, (void **)&ace);
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok (ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE, "Unexpected ACE type %#x\n", ace->Header.AceType);
ok(!ace->Header.AceFlags, "Unexpected ACE flags %#x\n", ace->Header.AceFlags);
@@ -6605,7 +6530,7 @@ static void test_AddMandatoryAce(void)
index = 0;
found = found2 = FALSE;
- while (pGetAce(sacl, index++, (void **)&ace))
+ while (GetAce(sacl, index++, (void **)&ace))
{
if (ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE)
{
@@ -7082,7 +7007,7 @@ static void test_token_label(void)
ok(!defaulted, "SACL defaulted\n");
ok(sacl->AceCount == 1, "SACL contains an unexpected ACE count %u\n", sacl->AceCount);
- ret = pGetAce(sacl, 0, (void **)&ace);
+ ret = GetAce(sacl, 0, (void **)&ace);
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(ace->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
@@ -7123,8 +7048,7 @@ static void test_token_security_descriptor(void)
STARTUPINFOA startup;
PSID psid;
- if (!pDuplicateTokenEx || !pConvertStringSidToSidA || !pAddAccessAllowedAceEx || !pGetAce
- || !pSetEntriesInAclW)
+ if (!pDuplicateTokenEx || !pAddAccessAllowedAceEx || !pSetEntriesInAclW)
{
win_skip("Some functions not available\n");
return;
@@ -7141,7 +7065,7 @@ static void test_token_security_descriptor(void)
ret = InitializeAcl(acl, 256, ACL_REVISION);
ok(ret, "InitializeAcl failed with error %u\n", GetLastError());
- ret = pConvertStringSidToSidA("S-1-5-6", &psid);
+ ret = ConvertStringSidToSidA("S-1-5-6", &psid);
ok(ret, "ConvertStringSidToSidA failed with error %u\n", GetLastError());
ret = pAddAccessAllowedAceEx(acl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE, GENERIC_ALL, psid);
@@ -7175,7 +7099,7 @@ static void test_token_security_descriptor(void)
ok(acl2->AceCount == 1, "Expected 1 ACE, got %d\n", acl2->AceCount);
ok(!defaulted, "acl2 defaulted\n");
- ret = pGetAce(acl2, 0, (void **)&ace);
+ ret = GetAce(acl2, 0, (void **)&ace);
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "Unexpected ACE type %#x\n", ace->Header.AceType);
ok(EqualSid(&ace->SidStart, psid), "Expected access allowed ACE\n");
@@ -7212,7 +7136,7 @@ static void test_token_security_descriptor(void)
index = 0;
found = FALSE;
- while (pGetAce(acl2, index++, (void **)&ace))
+ while (GetAce(acl2, index++, (void **)&ace))
{
if (ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE && EqualSid(&ace->SidStart, psid))
found = TRUE;
@@ -7320,7 +7244,7 @@ static void test_child_token_sd(void)
PSID psid;
ACL *acl;
- ret = pConvertStringSidToSidA("S-1-5-6", &psid);
+ ret = ConvertStringSidToSidA("S-1-5-6", &psid);
ok(ret, "ConvertStringSidToSidA failed with error %u\n", GetLastError());
ret = OpenProcessToken(GetCurrentProcess(), MAXIMUM_ALLOWED, &token);
@@ -7346,7 +7270,7 @@ static void test_child_token_sd(void)
ok(acl->AceCount, "Expected at least one ACE\n");
for (i = 0; i < acl->AceCount; i++)
{
- ret = pGetAce(acl, i, (void **)&acc_ace);
+ ret = GetAce(acl, i, (void **)&acc_ace);
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(acc_ace->Header.AceType != ACCESS_ALLOWED_ACE_TYPE || !EqualSid(&acc_ace->SidStart, psid),
"ACE inherited from the parent\n");
@@ -7378,7 +7302,7 @@ static void test_child_token_sd(void)
ok(acl && acl != (void *)0xdeadbeef, "Got invalid SACL\n");
ok(!defaulted, "SACL defaulted\n");
ok(acl->AceCount == 1, "Expected exactly one ACE\n");
- ret = pGetAce(acl, 0, (void **)&ace_label);
+ ret = GetAce(acl, 0, (void **)&ace_label);
ok(ret, "GetAce failed with error %u\n", GetLastError());
ok(ace_label->Header.AceType == SYSTEM_MANDATORY_LABEL_ACE_TYPE,
"Unexpected ACE type %#x\n", ace_label->Header.AceType);
diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c
index bd70ecaddf..3872666085 100644
--- a/dlls/advapi32/tests/service.c
+++ b/dlls/advapi32/tests/service.c
@@ -45,8 +45,6 @@ static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD,
static BOOL (WINAPI *pEnumServicesStatusExW)(SC_HANDLE, SC_ENUM_TYPE, DWORD,
DWORD, LPBYTE, DWORD, LPDWORD,
LPDWORD, LPDWORD, LPCWSTR);
-static DWORD (WINAPI *pGetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
- PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*);
static BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
static BOOL (WINAPI *pQueryServiceConfig2W)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD);
static BOOL (WINAPI *pQueryServiceStatusEx)(SC_HANDLE, SC_STATUS_TYPE, LPBYTE,
@@ -63,7 +61,6 @@ static void init_function_pointers(void)
pChangeServiceConfig2W = (void*)GetProcAddress(hadvapi32, "ChangeServiceConfig2W");
pEnumServicesStatusExA= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExA");
pEnumServicesStatusExW= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExW");
- pGetSecurityInfo = (void *)GetProcAddress(hadvapi32, "GetSecurityInfo");
pQueryServiceConfig2A= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2A");
pQueryServiceConfig2W= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2W");
pQueryServiceStatusEx= (void*)GetProcAddress(hadvapi32, "QueryServiceStatusEx");
@@ -1910,7 +1907,7 @@ static void test_sequence(void)
else
{
ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError());
- if ((svc_handle != NULL) && (pGetSecurityInfo != NULL))
+ if (svc_handle != NULL)
{
PSID sidOwner, sidGroup;
PACL dacl, sacl;
@@ -1920,22 +1917,22 @@ static void test_sequence(void)
BOOL bret;
/* Test using GetSecurityInfo to obtain security information */
- retval = pGetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, &sidOwner,
+ retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, &sidOwner,
&sidGroup, &dacl, &sacl, &pSD);
LocalFree(pSD);
ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %d\n", retval);
- retval = pGetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL,
+ retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL,
NULL, NULL, NULL, &pSD);
LocalFree(pSD);
ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %d\n", retval);
if (!is_nt4)
{
- retval = pGetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL,
+ retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL,
NULL, &dacl, NULL, &pSD);
ok(retval == ERROR_SUCCESS, "Expected GetSecurityInfo to succeed: result %d\n", retval);
LocalFree(pSD);
SetLastError(0xdeadbeef);
- retval = pGetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL,
+ retval = GetSecurityInfo(svc_handle, SE_SERVICE, DACL_SECURITY_INFORMATION, NULL,
NULL, NULL, NULL, NULL);
error = GetLastError();
ok(retval == ERROR_INVALID_PARAMETER, "Expected GetSecurityInfo to fail: result %d\n", retval);
--
2.24.1
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/shell32/tests/ebrowser.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c
index 65a9571980..7aefd14b37 100644
--- a/dlls/shell32/tests/ebrowser.c
+++ b/dlls/shell32/tests/ebrowser.c
@@ -35,7 +35,6 @@
static HWND hwnd;
static HRESULT (WINAPI *pSHCreateShellItem)(LPCITEMIDLIST,IShellFolder*,LPCITEMIDLIST,IShellItem**);
-static HRESULT (WINAPI *pSHParseDisplayName)(LPCWSTR,IBindCtx*,LPITEMIDLIST*,SFGAOF,SFGAOF*);
static void init_function_pointers(void)
{
@@ -43,7 +42,6 @@ static void init_function_pointers(void)
hmod = GetModuleHandleA("shell32.dll");
pSHCreateShellItem = (void*)GetProcAddress(hmod, "SHCreateShellItem");
- pSHParseDisplayName = (void*)GetProcAddress(hmod, "SHParseDisplayName");
}
/*********************************************************************
@@ -1295,7 +1293,6 @@ static void test_navigation(void)
static const WCHAR testfolderW[] =
{'w','i','n','e','t','e','s','t','f','o','l','d','e','r','\0'};
- ok(pSHParseDisplayName != NULL, "pSHParseDisplayName unexpectedly missing.\n");
ok(pSHCreateShellItem != NULL, "pSHCreateShellItem unexpectedly missing.\n");
GetCurrentDirectoryW(MAX_PATH, current_path);
@@ -1311,8 +1308,10 @@ static void test_navigation(void)
CreateDirectoryW(child_path, NULL);
- pSHParseDisplayName(current_path, NULL, &pidl_current, 0, NULL);
- pSHParseDisplayName(child_path, NULL, &pidl_child, 0, NULL);
+ hr = SHParseDisplayName(current_path, NULL, &pidl_current, 0, NULL);
+ ok(hr == S_OK, "Failed to parse a path, hr %#x.\n", hr);
+ hr = SHParseDisplayName(child_path, NULL, &pidl_child, 0, NULL);
+ ok(hr == S_OK, "Failed to parse a path, hr %#x.\n", hr);
ebrowser_instantiate(&peb);
ebrowser_initialize(peb);
--
2.24.1
1
0
08 Jan '20
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
---
dlls/wmp/tests/media.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
1
0
Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
---
dlls/gdi32/gdi32.spec | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec
index 4e08e3494c9..2282f05d119 100644
--- a/dlls/gdi32/gdi32.spec
+++ b/dlls/gdi32/gdi32.spec
@@ -1,5 +1,5 @@
# ordinal exports
-100 stdcall @(long long str str str) GDI_CallDevInstall16
+100 stdcall @(ptr long str str str) GDI_CallDevInstall16
101 stdcall @(long str str ptr) GDI_CallExtDeviceModePropSheet16
102 stdcall @(long ptr str str ptr str long) GDI_CallExtDeviceMode16
103 stdcall @(long str ptr ptr) GDI_CallAdvancedSetupDialog16
@@ -48,7 +48,7 @@
@ stdcall CreateDCA(str str str ptr)
@ stdcall CreateDCW(wstr wstr wstr ptr)
@ stdcall CreateDIBPatternBrush(long long)
-@ stdcall CreateDIBPatternBrushPt(long long)
+@ stdcall CreateDIBPatternBrushPt(ptr long)
@ stdcall CreateDIBSection(long ptr long ptr long long)
@ stdcall CreateDIBitmap(long ptr long ptr ptr long)
@ stdcall CreateDiscardableBitmap(long long long)
@@ -251,14 +251,14 @@
@ stdcall GetCharABCWidthsFloatW(long long long ptr)
@ stdcall GetCharABCWidthsI(long long long ptr ptr)
@ stdcall GetCharABCWidthsW(long long long ptr)
-@ stdcall GetCharWidth32A(long long long long)
-@ stdcall GetCharWidth32W(long long long long)
-@ stdcall GetCharWidthA(long long long long) GetCharWidth32A
+@ stdcall GetCharWidth32A(long long long ptr)
+@ stdcall GetCharWidth32W(long long long ptr)
+@ stdcall GetCharWidthA(long long long ptr) GetCharWidth32A
@ stdcall GetCharWidthFloatA(long long long ptr)
@ stdcall GetCharWidthFloatW(long long long ptr)
@ stdcall GetCharWidthI(ptr long long ptr ptr)
@ stdcall GetCharWidthInfo(ptr ptr)
-@ stdcall GetCharWidthW(long long long long) GetCharWidth32W
+@ stdcall GetCharWidthW(long long long ptr) GetCharWidth32W
@ stub GetCharWidthWOW
@ stdcall GetCharacterPlacementA(long str long long ptr long)
@ stdcall GetCharacterPlacementW(long wstr long long ptr long)
--
2.17.1
2
1
08 Jan '20
Windows 1709 changed the algorithm to be far more restrictive. Treat those
results as correct and older versions as broken.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/netapi32/tests/access.c | 378 +++++++++++------------------------
1 file changed, 112 insertions(+), 266 deletions(-)
diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c
index a284b65401d..81f9df8fda4 100644
--- a/dlls/netapi32/tests/access.c
+++ b/dlls/netapi32/tests/access.c
@@ -356,129 +356,43 @@ static void run_localgroupgetinfo_tests(void)
static void test_DavGetHTTPFromUNCPath(void)
{
- static const WCHAR path[] =
- {0};
- static const WCHAR path2[] =
- {'c',':','\\',0};
- static const WCHAR path3[] =
- {'\\','\\','.','\\','c',':',0};
- static const WCHAR path4[] =
- {'\\','\\','.','\\','c',':','\\',0};
- static const WCHAR path5[] =
- {'\\','\\','.','\\','c',':','\\','n','o','s','u','c','h','p','a','t','h',0};
- static const WCHAR path6[] =
- {'\\','\\','n','o','s','u','c','h','s','e','r','v','e','r','\\','c',':','\\',0};
- static const WCHAR path7[] =
- {'\\','.','\\','c',':',0};
- static const WCHAR path8[] =
- {'\\','\\','.','\\','c',':','\\','\\',0};
- static const WCHAR path9[] =
- {'\\','\\','.','@','S','S','L','\\','c',':',0};
- static const WCHAR path10[] =
- {'\\','\\','.','@','s','s','l','\\','c',':',0};
- static const WCHAR path11[] =
- {'\\','\\','.','@','t','l','s','\\','c',':',0};
- static const WCHAR path12[] =
- {'\\','\\','.','@','S','S','L','@','4','4','3','\\','c',':',0};
- static const WCHAR path13[] =
- {'\\','\\','.','@','S','S','L','@','8','0','\\','c',':',0};
- static const WCHAR path14[] =
- {'\\','\\','.','@','8','0','\\','c',':',0};
- static const WCHAR path15[] =
- {'\\','\\','.','@','8','0','8','0','\\','c',':',0};
- static const WCHAR path16[] =
- {'\\','\\','\\','c',':',0};
- static const WCHAR path17[] =
- {'\\','\\',0};
- static const WCHAR path18[] =
- {'/','/','.','/','c',':',0};
- static const WCHAR path19[] =
- {'\\','\\','.','\\','c',':','/',0};
- static const WCHAR path20[] =
- {'\\','\\','.','\\','c',':','\\','\\','\\',0};
- static const WCHAR path21[] =
- {'\\','\\','.','\\','\\','c',':',0};
- static const WCHAR path22[] =
- {'\\','\\','.','\\','c',':','d','i','r',0};
- static const WCHAR path23[] =
- {'\\','\\','.',0};
- static const WCHAR path24[] =
- {'\\','\\','.','\\','d','i','r',0};
- static const WCHAR path25[] =
- {'\\','\\','.','\\','\\',0};
- static const WCHAR path26[] =
- {'\\','\\','.','\\','c',':','d','i','r','/',0};
- static const WCHAR path27[] =
- {'\\','\\','.','/','c',':',0};
- static const WCHAR path28[] =
- {'\\','\\','.','@','8','0','@','S','S','L','\\','c',':',0};
- static const WCHAR result[] =
- {'h','t','t','p',':','/','/','.','/','c',':',0};
- static const WCHAR result2[] =
- {'h','t','t','p',':','/','/','.','/','c',':','/','n','o','s','u','c','h','p','a','t','h',0};
- static const WCHAR result3[] =
- {'h','t','t','p',':','/','/','n','o','s','u','c','h','s','e','r','v','e','r','/','c',':',0};
- static const WCHAR result4[] =
- {'h','t','t','p',':','/','/','.','/','c',':','/',0};
- static const WCHAR result5[] =
- {'h','t','t','p','s',':','/','/','.','/','c',':',0};
- static const WCHAR result6[] =
- {'h','t','t','p','s',':','/','/','.',':','8','0','/','c',':',0};
- static const WCHAR result7[] =
- {'h','t','t','p',':','/','/','.',':','8','0','8','0','/','c',':',0};
- static const WCHAR result8[] =
- {'h','t','t','p',':','/','/','/','c',':',0};
- static const WCHAR result9[] =
- {'h','t','t','p',':','/','/','.','/','c',':','/','/',0};
- static const WCHAR result10[] =
- {'h','t','t','p',':','/','/','.','/','/','c',':',0};
- static const WCHAR result11[] =
- {'h','t','t','p',':','/','/','.','/','c',':','d','i','r',0};
- static const WCHAR result12[] =
- {'h','t','t','p',':','/','/','.',0};
- static const WCHAR result13[] =
- {'h','t','t','p',':','/','/','.','/','d','i','r',0};
- static const WCHAR result14[] =
- {'h','t','t','p',':','/','/','.','/',0};
static const struct
{
const WCHAR *path;
- DWORD size;
- DWORD ret;
+ DWORD ret;
const WCHAR *ret_path;
- DWORD ret_size;
- int todo;
+ DWORD broken_ret; /* < Win10 1709 */
+ BOOL todo;
}
tests[] =
{
- { path, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path2, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path3, MAX_PATH, ERROR_SUCCESS, result, 12 },
- { path4, MAX_PATH, ERROR_SUCCESS, result, 12 },
- { path5, MAX_PATH, ERROR_SUCCESS, result2, 23 },
- { path6, MAX_PATH, ERROR_SUCCESS, result3, 23 },
- { path7, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path8, MAX_PATH, ERROR_SUCCESS, result4, 13 },
- { path9, MAX_PATH, ERROR_SUCCESS, result5, 13 },
- { path10, MAX_PATH, ERROR_SUCCESS, result5, 13 },
- { path11, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path12, MAX_PATH, ERROR_SUCCESS, result5, 13 },
- { path13, MAX_PATH, ERROR_SUCCESS, result6, 16 },
- { path14, MAX_PATH, ERROR_SUCCESS, result, 12 },
- { path15, MAX_PATH, ERROR_SUCCESS, result7, 17 },
- { path16, MAX_PATH, ERROR_SUCCESS, result8, 11 },
- { path17, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path18, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path19, MAX_PATH, ERROR_SUCCESS, result, 12 },
- { path20, MAX_PATH, ERROR_SUCCESS, result9, 14 },
- { path21, MAX_PATH, ERROR_SUCCESS, result10, 13 },
- { path22, MAX_PATH, ERROR_SUCCESS, result11, 15 },
- { path23, MAX_PATH, ERROR_SUCCESS, result12, 9 },
- { path24, MAX_PATH, ERROR_SUCCESS, result13, 13 },
- { path25, MAX_PATH, ERROR_SUCCESS, result14, 10, 1 },
- { path26, MAX_PATH, ERROR_SUCCESS, result11, 15 },
- { path27, MAX_PATH, ERROR_SUCCESS, result, 12 },
- { path28, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
+ {L"", ERROR_BAD_NET_NAME, NULL, ERROR_INVALID_PARAMETER, TRUE},
+ {L"c:\\", ERROR_BAD_NET_NAME, NULL, ERROR_INVALID_PARAMETER, TRUE},
+ {L"\\\\", ERROR_BAD_NET_NAME, NULL, ERROR_INVALID_PARAMETER, TRUE},
+ {L"\\a\\b", ERROR_BAD_NET_NAME, NULL, ERROR_INVALID_PARAMETER, TRUE},
+ {L"\\\\a", ERROR_SUCCESS, L"http://a"},
+ {L"\\\\a\\", ERROR_SUCCESS, L"http://a"},
+ {L"\\\\a\\b", ERROR_SUCCESS, L"http://a/b"},
+ {L"\\\\a\\b\\", ERROR_SUCCESS, L"http://a/b"},
+ {L"\\\\a\\b\\c", ERROR_SUCCESS, L"http://a/b/c"},
+ {L"\\\\a(a)SSL\\b", ERROR_SUCCESS, L"https://a/b"},
+ {L"\\\\a(a)ssl\\b", ERROR_SUCCESS, L"https://a/b"},
+ {L"\\\\a(a)tls\\b", ERROR_INVALID_PARAMETER},
+ {L"\\\\a(a)SSL@443\\b", ERROR_SUCCESS, L"https://a/b"},
+ {L"\\\\a(a)SSL@80\\b", ERROR_SUCCESS, L"https://a:80/b"},
+ {L"\\\\a(a)80@SSL\\b", ERROR_INVALID_PARAMETER},
+ {L"\\\\a(a)80\\b", ERROR_SUCCESS, L"http://a/b"},
+ {L"\\\\a(a)8080\\b", ERROR_SUCCESS, L"http://a:8080/b"},
+ {L"\\\\a\\b/", ERROR_SUCCESS, L"http://a/b"},
+ {L"\\\\a/b", ERROR_SUCCESS, L"http://a/b"},
+ {L"\\\\a.\\b", ERROR_SUCCESS, L"http://a./b"},
+ {L"\\\\.a\\b", ERROR_SUCCESS, L"http://.a/b"},
+ {L"//a/b", ERROR_SUCCESS, L"http://a/b", ERROR_INVALID_PARAMETER, TRUE},
+ {L"\\\\a\\\\", ERROR_BAD_NET_NAME, NULL, ERROR_SUCCESS, TRUE},
+ {L"\\\\\\a\\", ERROR_BAD_NET_NAME, NULL, ERROR_SUCCESS, TRUE},
+ {L"\\\\a\\b\\\\", ERROR_BAD_NET_NAME, NULL, ERROR_SUCCESS, TRUE},
+ {L"\\\\.\\a", ERROR_BAD_NET_NAME, NULL, ERROR_SUCCESS, TRUE},
+ {L"\\\\a\\b:", ERROR_BAD_NET_NAME, NULL, ERROR_SUCCESS, TRUE},
};
WCHAR buf[MAX_PATH];
DWORD i, ret, size;
@@ -489,162 +403,89 @@ static void test_DavGetHTTPFromUNCPath(void)
return;
}
- if (0) { /* crash */
- ret = pDavGetHTTPFromUNCPath( NULL, NULL, NULL );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
- }
+ if (0) /* crashes on Windows */
+ {
+ ret = pDavGetHTTPFromUNCPath(NULL, NULL, NULL);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
- ret = pDavGetHTTPFromUNCPath( path, buf, NULL );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
+ size = 0;
+ ret = pDavGetHTTPFromUNCPath(L"", buf, &size);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
- size = 0;
- ret = pDavGetHTTPFromUNCPath( path, NULL, &size );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
+ ret = pDavGetHTTPFromUNCPath(L"\\\\a\\b", buf, NULL);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
+ }
- if (0) { /* crash */
- buf[0] = 0;
- size = 0;
- ret = pDavGetHTTPFromUNCPath( path, buf, &size );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
+ ret = pDavGetHTTPFromUNCPath(L"", buf, NULL);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
- ret = pDavGetHTTPFromUNCPath( path3, buf, NULL );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
- }
+ size = 0;
+ ret = pDavGetHTTPFromUNCPath(L"", NULL, &size);
+ ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_BAD_NET_NAME /* Win10 1709+ */, "got %u\n", ret);
size = 0;
- ret = pDavGetHTTPFromUNCPath( path3, NULL, &size );
- ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
+ ret = pDavGetHTTPFromUNCPath(L"\\\\a\\b", NULL, &size);
+ ok(ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret);
buf[0] = 0;
size = 0;
- ret = pDavGetHTTPFromUNCPath( path3, buf, &size );
- ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
- ok( size == 12, "got %u\n", size );
+ ret = pDavGetHTTPFromUNCPath(L"\\\\a\\b", buf, &size);
+ ok(ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret);
+ ok(size == 11, "got %u\n", size);
for (i = 0; i < ARRAY_SIZE(tests); i++)
{
buf[0] = 0;
- size = tests[i].size;
+ size = ARRAY_SIZE(buf);
ret = pDavGetHTTPFromUNCPath( tests[i].path, buf, &size );
- if (tests[i].todo)
+ todo_wine_if (tests[i].todo)
+ ok(ret == tests[i].ret || broken(ret == tests[i].broken_ret),
+ "%u: expected %u got %u\n", i, tests[i].ret, ret);
+ if (!ret)
{
- ok( ret == tests[i].ret, "%u: expected %u got %u\n", i, tests[i].ret, ret );
- todo_wine {
if (tests[i].ret_path)
- {
- ok( !lstrcmpW( buf, tests[i].ret_path ), "%u: expected %s got %s\n",
- i, wine_dbgstr_w(tests[i].ret_path), wine_dbgstr_w(buf) );
- }
- ok( size == tests[i].ret_size, "%u: expected %u got %u\n", i, tests[i].ret_size, size );
- }
+ ok(!wcscmp(buf, tests[i].ret_path), "%u: expected %s got %s\n",
+ i, wine_dbgstr_w(tests[i].ret_path), wine_dbgstr_w(buf));
+ ok(size == wcslen(buf) + 1, "%u: expected %u got %u\n", i, wcslen(buf) + 1, size);
}
else
- {
- ok( ret == tests[i].ret, "%u: expected %u got %u\n", i, tests[i].ret, ret );
- if (tests[i].ret_path)
- {
- ok( !lstrcmpW( buf, tests[i].ret_path ), "%u: expected %s got %s\n",
- i, wine_dbgstr_w(tests[i].ret_path), wine_dbgstr_w(buf) );
- }
- ok( size == tests[i].ret_size, "%u: expected %u got %u\n", i, tests[i].ret_size, size );
- }
+ ok(size == ARRAY_SIZE(buf), "%u: wrong size %u\n", i, size);
}
}
+
static void test_DavGetUNCFromHTTPPath(void)
{
- static const WCHAR path[] =
- {0};
- static const WCHAR path2[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r','/','p','a','t','h',0};
- static const WCHAR path3[] =
- {'h','t','t','p','s',':','/','/','h','o','s','t','/','p','a','t','h',0};
- static const WCHAR path4[] =
- {'\\','\\','s','e','r','v','e','r',0};
- static const WCHAR path5[] =
- {'\\','\\','s','e','r','v','e','r','\\','p','a','t','h',0};
- static const WCHAR path6[] =
- {'\\','\\','h','t','t','p',':','/','/','s','e','r','v','e','r','/','p','a','t','h',0};
- static const WCHAR path7[] =
- {'h','t','t','p',':','/','/',0};
- static const WCHAR path8[] =
- {'h','t','t','p',':',0};
- static const WCHAR path9[] =
- {'h','t','t','p',0};
- static const WCHAR path10[] =
- {'h','t','t','p',':','s','e','r','v','e','r',0};
- static const WCHAR path11[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r',':','8','0',0};
- static const WCHAR path12[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r',':','8','1',0};
- static const WCHAR path13[] =
- {'h','t','t','p','s',':','/','/','s','e','r','v','e','r',':','8','0',0};
- static const WCHAR path14[] =
- {'H','T','T','P',':','/','/','s','e','r','v','e','r','/','p','a','t','h',0};
- static const WCHAR path15[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r',':','6','5','5','3','7',0};
- static const WCHAR path16[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r','/','p','a','t','h','/',0};
- static const WCHAR path17[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r','/','p','a','t','h','/','/',0};
- static const WCHAR path18[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r',':','/','p','a','t','h',0};
- static const WCHAR path19[] =
- {'h','t','t','p',':','/','/','s','e','r','v','e','r',0};
- static const WCHAR path20[] =
- {'h','t','t','p','s',':','/','/','s','e','r','v','e','r',':','4','4','3',0};
- static const WCHAR path21[] =
- {'h','t','t','p','s',':','/','/','s','e','r','v','e','r',':','8','0',0};
- static const WCHAR result[] =
- {'\\','\\','s','e','r','v','e','r','\\','D','a','v','W','W','W','R','o','o','t','\\','p','a','t','h',0};
- static const WCHAR result2[] =
- {'\\','\\','h','o','s','t','@','S','S','L','\\','D','a','v','W','W','W','R','o','o','t','\\',
- 'p','a','t','h',0};
- static const WCHAR result3[] =
- {'\\','\\','s','e','r','v','e','r','\\','D','a','v','W','W','W','R','o','o','t',0};
- static const WCHAR result4[] =
- {'\\','\\','s','e','r','v','e','r','@','8','1','\\','D','a','v','W','W','W','R','o','o','t',0};
- static const WCHAR result5[] =
- {'\\','\\','s','e','r','v','e','r','@','S','S','L','@','8','0','\\','D','a','v','W','W','W','R','o','o','t',0};
- static const WCHAR result6[] =
- {'\\','\\','s','e','r','v','e','r','@','6','5','5','3','7','\\','D','a','v','W','W','W','R','o','o','t',0};
- static const WCHAR result7[] =
- {'\\','\\','s','e','r','v','e','r','@','\\','D','a','v','W','W','W','R','o','o','t','\\','p','a','t','h',0};
- static const WCHAR result8[] =
- {'\\','\\','s','e','r','v','e','r','@','S','S','L','\\','D','a','v','W','W','W','R','o','o','t',0};
- static const WCHAR result9[] =
- {'\\','\\','s','e','r','v','e','r','@','S','S','L','@','8','0','\\','D','a','v','W','W','W','R','o','o','t',0};
static const struct
{
const WCHAR *path;
- DWORD size;
- DWORD ret;
+ DWORD ret;
const WCHAR *ret_path;
- DWORD ret_size;
+ DWORD broken_ret; /* < Win10 1709 */
+ BOOL todo;
}
tests[] =
{
- { path, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path2, MAX_PATH, ERROR_SUCCESS, result, 25 },
- { path3, MAX_PATH, ERROR_SUCCESS, result2, 27 },
- { path4, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path5, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path6, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path7, MAX_PATH, ERROR_BAD_NET_NAME, NULL, MAX_PATH },
- { path8, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path9, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path10, MAX_PATH, ERROR_INVALID_PARAMETER, NULL, MAX_PATH },
- { path11, MAX_PATH, ERROR_SUCCESS, result3, 20 },
- { path12, MAX_PATH, ERROR_SUCCESS, result4, 23 },
- { path13, MAX_PATH, ERROR_SUCCESS, result5, 27 },
- { path14, MAX_PATH, ERROR_SUCCESS, result, 25 },
- { path15, MAX_PATH, ERROR_SUCCESS, result6, 26 },
- { path16, MAX_PATH, ERROR_SUCCESS, result, 25 },
- { path17, MAX_PATH, ERROR_BAD_NET_NAME, NULL, MAX_PATH },
- { path18, MAX_PATH, ERROR_SUCCESS, result7, 26 },
- { path19, MAX_PATH, ERROR_SUCCESS, result3, 20 },
- { path20, MAX_PATH, ERROR_SUCCESS, result8, 24 },
- { path21, MAX_PATH, ERROR_SUCCESS, result9, 27 },
+ {L"", ERROR_INVALID_PARAMETER},
+ {L"http://server/path", ERROR_SUCCESS, L"\\\\server\\DavWWWRoot\\path"},
+ {L"https://host/path", ERROR_SUCCESS, L"\\\\host(a)SSL\\DavWWWRoot\\path"},
+ {L"\\\\server", ERROR_INVALID_PARAMETER},
+ {L"\\\\server\\path", ERROR_INVALID_PARAMETER},
+ {L"\\\\http://server/path", ERROR_INVALID_PARAMETER},
+ {L"http://", ERROR_BAD_NETPATH, NULL, ERROR_BAD_NET_NAME, TRUE},
+ {L"http:", ERROR_BAD_NET_NAME, NULL, ERROR_INVALID_PARAMETER, TRUE},
+ {L"http", ERROR_INVALID_PARAMETER},
+ {L"http:server", ERROR_BAD_NET_NAME, NULL, ERROR_INVALID_PARAMETER, TRUE},
+ {L"http://server:80", ERROR_SUCCESS, L"\\\\server\\DavWWWRoot"},
+ {L"http://server:81", ERROR_SUCCESS, L"\\\\server(a)81\\DavWWWRoot"},
+ {L"https://server:80", ERROR_SUCCESS, L"\\\\server(a)SSL@80\\DavWWWRoot"},
+ {L"HTTP://server/path", ERROR_SUCCESS, L"\\\\server\\DavWWWRoot\\path"},
+ {L"http://server:65537", ERROR_BAD_NETPATH, NULL, ERROR_SUCCESS, TRUE},
+ {L"http://server/path/", ERROR_SUCCESS, L"\\\\server\\DavWWWRoot\\path"},
+ {L"http://server/path//", ERROR_SUCCESS, L"\\\\server\\DavWWWRoot\\path", ERROR_BAD_NET_NAME, TRUE},
+ {L"http://server:/path", ERROR_BAD_NETPATH, NULL, ERROR_SUCCESS, TRUE},
+ {L"http://server", ERROR_SUCCESS, L"\\\\server\\DavWWWRoot"},
+ {L"https://server:443", ERROR_SUCCESS, L"\\\\server(a)SSL\\DavWWWRoot"},
};
WCHAR buf[MAX_PATH];
DWORD i, ret, size;
@@ -655,52 +496,57 @@ static void test_DavGetUNCFromHTTPPath(void)
return;
}
- if (0) { /* crash */
- ret = pDavGetUNCFromHTTPPath( NULL, NULL, NULL );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
+ if (0) /* crashes on Windows */
+ {
+ ret = pDavGetUNCFromHTTPPath(NULL, NULL, NULL);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
+
+ ret = pDavGetUNCFromHTTPPath(L"http://server/path", buf, NULL);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
}
- ret = pDavGetUNCFromHTTPPath( path, buf, NULL );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
+
+ ret = pDavGetUNCFromHTTPPath(L"", buf, NULL);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
size = 0;
- ret = pDavGetUNCFromHTTPPath( path, NULL, &size );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
+ ret = pDavGetUNCFromHTTPPath(L"", NULL, &size);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
buf[0] = 0;
size = 0;
- ret = pDavGetUNCFromHTTPPath( path, buf, &size );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
+ ret = pDavGetUNCFromHTTPPath(L"", buf, &size);
+ ok(ret == ERROR_INVALID_PARAMETER, "got %u\n", ret);
- if (0) { /* crash */
- ret = pDavGetUNCFromHTTPPath( path2, buf, NULL );
- ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
- }
size = 0;
- ret = pDavGetUNCFromHTTPPath( path2, NULL, &size );
+ ret = pDavGetUNCFromHTTPPath(L"http://server/path", NULL, &size);
ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
buf[0] = 0;
size = 0;
- ret = pDavGetUNCFromHTTPPath( path2, buf, &size );
- ok( ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret );
- ok( size == 25, "got %u\n", size );
+ ret = pDavGetUNCFromHTTPPath(L"http://server/path", buf, &size);
+ ok(ret == ERROR_INSUFFICIENT_BUFFER, "got %u\n", ret);
+ ok(size == 25, "got %u\n", size);
for (i = 0; i < ARRAY_SIZE(tests); i++)
{
buf[0] = 0;
- size = tests[i].size;
+ size = ARRAY_SIZE(buf);
ret = pDavGetUNCFromHTTPPath( tests[i].path, buf, &size );
- ok( ret == tests[i].ret, "%u: expected %u got %u\n", i, tests[i].ret, ret );
- if (tests[i].ret_path)
+ todo_wine_if (tests[i].todo)
+ ok(ret == tests[i].ret || broken(ret == tests[i].broken_ret),
+ "%u: expected %u got %u\n", i, tests[i].ret, ret);
+ if (!ret)
{
- ok( !lstrcmpW( buf, tests[i].ret_path ), "%u: expected %s got %s\n",
- i, wine_dbgstr_w(tests[i].ret_path), wine_dbgstr_w(buf) );
+ if (tests[i].ret_path)
+ ok(!wcscmp(buf, tests[i].ret_path), "%u: expected %s got %s\n",
+ i, wine_dbgstr_w(tests[i].ret_path), wine_dbgstr_w(buf));
+ ok(size == wcslen(buf) + 1, "%u: expected %u got %u\n", i, wcslen(buf) + 1, size);
}
- ok( size == tests[i].ret_size, "%u: expected %u got %u\n", i, tests[i].ret_size, size );
+ else
+ ok(size == ARRAY_SIZE(buf), "%u: wrong size %u\n", i, size);
}
}
-
START_TEST(access)
{
HMODULE hnetapi32=LoadLibraryA("netapi32.dll");
--
2.24.1
1
2
Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
---
dlls/ole32/ole32.spec | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec
index 5e0e7030b22..eaf0e6b7f40 100644
--- a/dlls/ole32/ole32.spec
+++ b/dlls/ole32/ole32.spec
@@ -171,7 +171,7 @@
@ stdcall HWND_UserUnmarshal(ptr ptr ptr)
@ stdcall IIDFromString(wstr ptr)
@ stub I_RemoteMain
-@ stdcall IsAccelerator(long long ptr long)
+@ stdcall IsAccelerator(long long ptr ptr)
@ stdcall IsEqualGUID(ptr ptr)
@ stub IsValidIid
@ stdcall IsValidInterface(ptr)
@@ -222,9 +222,9 @@
@ stdcall OleQueryCreateFromData(ptr)
@ stdcall OleQueryLinkFromData(ptr)
@ stdcall OleRegEnumFormatEtc(ptr long ptr)
-@ stdcall OleRegEnumVerbs(long ptr)
+@ stdcall OleRegEnumVerbs(ptr ptr)
@ stdcall OleRegGetMiscStatus(ptr long ptr)
-@ stdcall OleRegGetUserType(long long ptr)
+@ stdcall OleRegGetUserType(ptr long ptr)
@ stdcall OleRun(ptr)
@ stdcall OleSave(ptr ptr long)
@ stdcall OleSaveToStream(ptr ptr)
@@ -275,7 +275,7 @@
@ stdcall StgOpenPropStg(ptr ptr long long ptr)
@ stdcall StgOpenStorage(wstr ptr long ptr long ptr)
@ stdcall StgOpenStorageEx(wstr long long long ptr ptr ptr ptr)
-@ stdcall StgOpenStorageOnILockBytes(ptr ptr long long long ptr)
+@ stdcall StgOpenStorageOnILockBytes(ptr ptr long ptr long ptr)
@ stdcall StgSetTimes(wstr ptr ptr ptr )
@ stdcall StringFromCLSID(ptr ptr)
@ stdcall StringFromGUID2(ptr ptr long)
@@ -287,7 +287,7 @@
@ stub UtGetDvtd32Info
@ stdcall WdtpInterfacePointer_UserFree(ptr)
@ stdcall WdtpInterfacePointer_UserMarshal(ptr long ptr ptr ptr)
-@ stdcall WdtpInterfacePointer_UserSize(ptr long ptr long ptr)
+@ stdcall WdtpInterfacePointer_UserSize(ptr long long ptr ptr)
@ stdcall WdtpInterfacePointer_UserUnmarshal(ptr ptr ptr ptr)
@ stdcall WriteClassStg(ptr ptr)
@ stdcall WriteClassStm(ptr ptr)
--
2.17.1
2
1
Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
---
dlls/user32/user32.spec | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec
index 0ecceb3adf2..6d24550d19f 100644
--- a/dlls/user32/user32.spec
+++ b/dlls/user32/user32.spec
@@ -10,7 +10,7 @@
@ stdcall AnyPopup()
@ stdcall AppendMenuA(long long long ptr)
@ stdcall AppendMenuW(long long long ptr)
-@ stdcall AreDpiAwarenessContextsEqual(long long)
+@ stdcall AreDpiAwarenessContextsEqual(ptr ptr)
@ stdcall ArrangeIconicWindows(long)
@ stdcall AttachThreadInput(long long long)
@ stdcall BeginDeferWindowPos(long)
@@ -220,8 +220,8 @@
@ stdcall EnumDesktopsW(ptr ptr long)
@ stub EnumDisplayDeviceModesA
@ stub EnumDisplayDeviceModesW
-@ stdcall EnumDisplayDevicesA(ptr long ptr long)
-@ stdcall EnumDisplayDevicesW(ptr long ptr long)
+@ stdcall EnumDisplayDevicesA(str long ptr long)
+@ stdcall EnumDisplayDevicesW(wstr long ptr long)
@ stdcall EnumDisplayMonitors(long ptr ptr long)
@ stdcall EnumDisplaySettingsA(str long ptr)
@ stdcall EnumDisplaySettingsExA(str long ptr long)
@@ -256,7 +256,7 @@
@ stdcall GetAppCompatFlags2(long)
@ stdcall GetAsyncKeyState(long)
@ stdcall GetAutoRotationState(ptr)
-@ stdcall GetAwarenessFromDpiAwarenessContext(long)
+@ stdcall GetAwarenessFromDpiAwarenessContext(ptr)
@ stdcall GetCapture()
@ stdcall GetCaretBlinkTime()
@ stdcall GetCaretPos(ptr)
@@ -444,7 +444,7 @@
@ stdcall InsertMenuItemA(long long long ptr)
@ stdcall InsertMenuItemW(long long long ptr)
@ stdcall InsertMenuW(long long long long ptr)
-@ stdcall InternalGetWindowText(long long long)
+@ stdcall InternalGetWindowText(long ptr long)
@ stdcall IntersectRect(ptr ptr ptr)
@ stdcall InvalidateRect(long ptr long)
@ stdcall InvalidateRgn(long long long)
@@ -472,7 +472,7 @@
@ stdcall IsRectEmpty(ptr)
# @ stub IsServerSideWindow
@ stdcall IsTouchWindow(long ptr)
-@ stdcall IsValidDpiAwarenessContext(long)
+@ stdcall IsValidDpiAwarenessContext(ptr)
@ stdcall IsWinEventHookInstalled(long)
@ stdcall IsWindow(long)
@ stdcall IsWindowEnabled(long)
@@ -687,7 +687,7 @@
@ stdcall SetPhysicalCursorPos(long long)
@ stdcall SetProcessDPIAware()
@ stdcall SetProcessDefaultLayout(long)
-@ stdcall SetProcessDpiAwarenessContext(long)
+@ stdcall SetProcessDpiAwarenessContext(ptr)
@ stdcall SetProcessDpiAwarenessInternal(long)
@ stdcall SetProcessWindowStation(long)
@ stdcall SetProgmanWindow (long)
--
2.17.1
1
0
Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
---
dlls/winevulkan/winevulkan.spec | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index 57ee94abe26..8cdf387857f 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -161,9 +161,9 @@
@ stdcall -private wine_vkGetBufferMemoryRequirements(ptr int64 ptr)
@ stdcall -private wine_vkGetBufferMemoryRequirements2(ptr ptr ptr)
@ stdcall -private wine_vkGetDescriptorSetLayoutSupport(ptr ptr ptr)
-@ stdcall -private wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long)
+@ stdcall -private wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long ptr)
@ stdcall -private wine_vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr)
-@ stdcall -private wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long)
+@ stdcall -private wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 ptr)
@ stdcall -private wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
@ stdcall -private wine_vkGetDeviceProcAddr(ptr str)
@ stdcall -private wine_vkGetDeviceQueue(ptr long long ptr)
@@ -201,7 +201,7 @@
@ stdcall -private wine_vkGetPhysicalDeviceSparseImageFormatProperties2(ptr ptr ptr ptr)
@ stdcall -private wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr)
@ stdcall -private wine_vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr)
-@ stdcall -private wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long)
+@ stdcall -private wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr ptr)
@ stdcall -private wine_vkGetPhysicalDeviceSurfaceSupportKHR(ptr long int64 ptr)
@ stdcall -private wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(ptr long)
@ stdcall -private wine_vkGetPipelineCacheData(ptr int64 ptr ptr)
--
2.17.1
1
0
08 Jan '20
Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
---
dlls/setupapi/setupapi.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec
index 8c4ebcc1011..3d360288c81 100644
--- a/dlls/setupapi/setupapi.spec
+++ b/dlls/setupapi/setupapi.spec
@@ -537,7 +537,7 @@
@ stdcall SetupSetSourceListA(long ptr long)
@ stdcall SetupSetSourceListW(long ptr long)
@ stdcall SetupTermDefaultQueueCallback(ptr)
-@ stdcall SetupTerminateFileLog(long)
+@ stdcall SetupTerminateFileLog(ptr)
@ stdcall SetupUninstallOEMInfA(str long ptr)
@ stdcall SetupUninstallOEMInfW(wstr long ptr)
@ stub ShouldDeviceBeExcluded
--
2.17.1
1
0
Signed-off-by: André Hentschel <nerv(a)dawncrow.de>
---
dlls/gdiplus/gdiplus.spec | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index ee28b0ea4a3..11866633b38 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -100,7 +100,7 @@
100 stdcall GdipCreateMatrix3I(ptr ptr ptr)
101 stdcall GdipCreateMatrix(ptr)
102 stdcall GdipCreateMetafileFromEmf(ptr long ptr)
-103 stdcall GdipCreateMetafileFromFile(ptr ptr)
+103 stdcall GdipCreateMetafileFromFile(wstr ptr)
104 stdcall GdipCreateMetafileFromStream(ptr ptr)
105 stdcall GdipCreateMetafileFromWmf(ptr long ptr ptr)
106 stdcall GdipCreateMetafileFromWmfFile(wstr ptr ptr)
@@ -506,7 +506,7 @@
506 stdcall GdipSetImageAttributesGamma(ptr long long float)
507 stdcall GdipSetImageAttributesNoOp(ptr long long)
508 stdcall GdipSetImageAttributesOutputChannel(ptr long long long)
-509 stdcall GdipSetImageAttributesOutputChannelColorProfile(ptr long long ptr)
+509 stdcall GdipSetImageAttributesOutputChannelColorProfile(ptr long long wstr)
510 stdcall GdipSetImageAttributesRemapTable(ptr long long long ptr)
511 stdcall GdipSetImageAttributesThreshold(ptr long long float)
512 stdcall GdipSetImageAttributesToIdentity(ptr long)
@@ -624,7 +624,7 @@
624 stdcall GdipImageSetAbort(ptr ptr)
625 stdcall GdipGraphicsSetAbort(ptr ptr)
626 stub GdipDrawImageFX
-627 stdcall GdipConvertToEmfPlus(ptr ptr ptr long ptr ptr)
-628 stdcall GdipConvertToEmfPlusToFile(ptr ptr ptr ptr long ptr ptr)
+627 stdcall GdipConvertToEmfPlus(ptr ptr ptr long wstr ptr)
+628 stdcall GdipConvertToEmfPlusToFile(ptr ptr ptr wstr long wstr ptr)
629 stub GdipConvertToEmfPlusToStream
630 stub GdipPlayTSClientRecord
--
2.17.1
1
0