advapi32/tests: Make tests run again on win95.
This commit is contained in:
parent
1e33bdcfbd
commit
4e8b83dcde
@ -55,6 +55,9 @@ static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorA)(LPCS
|
|||||||
PSECURITY_DESCRIPTOR*, PULONG );
|
PSECURITY_DESCRIPTOR*, PULONG );
|
||||||
typedef BOOL (WINAPI *fnGetFileSecurityA)(LPCSTR, SECURITY_INFORMATION,
|
typedef BOOL (WINAPI *fnGetFileSecurityA)(LPCSTR, SECURITY_INFORMATION,
|
||||||
PSECURITY_DESCRIPTOR, DWORD, LPDWORD);
|
PSECURITY_DESCRIPTOR, DWORD, LPDWORD);
|
||||||
|
static DWORD (WINAPI *pGetNamedSecurityInfoA)(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION,
|
||||||
|
PSID*, PSID*, PACL*, PACL*,
|
||||||
|
PSECURITY_DESCRIPTOR*);
|
||||||
typedef DWORD (WINAPI *fnRtlAdjustPrivilege)(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
|
typedef DWORD (WINAPI *fnRtlAdjustPrivilege)(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN);
|
||||||
typedef BOOL (WINAPI *fnCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*);
|
typedef BOOL (WINAPI *fnCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*);
|
||||||
typedef BOOL (WINAPI *fnDuplicateTokenEx)(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,
|
typedef BOOL (WINAPI *fnDuplicateTokenEx)(HANDLE,DWORD,LPSECURITY_ATTRIBUTES,
|
||||||
@ -65,6 +68,7 @@ typedef NTSTATUS (WINAPI *fnLsaClose)(LSA_HANDLE);
|
|||||||
typedef NTSTATUS (WINAPI *fnLsaFreeMemory)(PVOID);
|
typedef NTSTATUS (WINAPI *fnLsaFreeMemory)(PVOID);
|
||||||
typedef NTSTATUS (WINAPI *fnLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
|
typedef NTSTATUS (WINAPI *fnLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE);
|
||||||
static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
|
static NTSTATUS (WINAPI *pNtQueryObject)(HANDLE,OBJECT_INFORMATION_CLASS,PVOID,ULONG,PULONG);
|
||||||
|
static DWORD (WINAPI *pSetEntriesInAclW)(ULONG, PEXPLICIT_ACCESSW, PACL, PACL*);
|
||||||
|
|
||||||
static HMODULE hmod;
|
static HMODULE hmod;
|
||||||
static int myARGC;
|
static int myARGC;
|
||||||
@ -102,6 +106,8 @@ static void init(void)
|
|||||||
hmod = GetModuleHandle("advapi32.dll");
|
hmod = GetModuleHandle("advapi32.dll");
|
||||||
pConvertStringSecurityDescriptorToSecurityDescriptorA =
|
pConvertStringSecurityDescriptorToSecurityDescriptorA =
|
||||||
(void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" );
|
(void *)GetProcAddress(hmod, "ConvertStringSecurityDescriptorToSecurityDescriptorA" );
|
||||||
|
pGetNamedSecurityInfoA = (void *)GetProcAddress(hmod, "GetNamedSecurityInfoA");
|
||||||
|
pSetEntriesInAclW = (void *)GetProcAddress(hmod, "SetEntriesInAclW");
|
||||||
|
|
||||||
myARGC = winetest_get_mainargs( &myARGV );
|
myARGC = winetest_get_mainargs( &myARGV );
|
||||||
}
|
}
|
||||||
@ -1714,7 +1720,13 @@ static void test_SetEntriesInAcl(void)
|
|||||||
ACL *acl = (ACL*)0xdeadbeef;
|
ACL *acl = (ACL*)0xdeadbeef;
|
||||||
DWORD res;
|
DWORD res;
|
||||||
|
|
||||||
res = SetEntriesInAclW(0, NULL, NULL, &acl);
|
if (!pSetEntriesInAclW)
|
||||||
|
{
|
||||||
|
skip("SetEntriesInAclW is not available\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
res = pSetEntriesInAclW(0, NULL, NULL, &acl);
|
||||||
if(res == ERROR_CALL_NOT_IMPLEMENTED)
|
if(res == ERROR_CALL_NOT_IMPLEMENTED)
|
||||||
{
|
{
|
||||||
skip("SetEntriesInAclW is not implemented\n");
|
skip("SetEntriesInAclW is not implemented\n");
|
||||||
@ -1737,11 +1749,17 @@ static void test_GetNamedSecurityInfoA(void)
|
|||||||
BOOL ret;
|
BOOL ret;
|
||||||
CHAR windows_dir[MAX_PATH];
|
CHAR windows_dir[MAX_PATH];
|
||||||
|
|
||||||
|
if (!pGetNamedSecurityInfoA)
|
||||||
|
{
|
||||||
|
skip("GetNamedSecurityInfoA is not available\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ret = GetWindowsDirectoryA(windows_dir, MAX_PATH);
|
ret = GetWindowsDirectoryA(windows_dir, MAX_PATH);
|
||||||
ok(ret, "GetWindowsDirectory failed with error %d\n", GetLastError());
|
ok(ret, "GetWindowsDirectory failed with error %d\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
error = GetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,
|
error = pGetNamedSecurityInfoA(windows_dir, SE_FILE_OBJECT,
|
||||||
OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION,
|
OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION,
|
||||||
NULL, NULL, NULL, NULL, &pSecDesc);
|
NULL, NULL, NULL, NULL, &pSecDesc);
|
||||||
if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
|
if (error != ERROR_SUCCESS && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user