mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:25:44 +00:00
- Make advapi32 Winetest do a basic check instead of assuming that the routine won't fail
svn path=/trunk/; revision=38232
This commit is contained in:
parent
41556963b7
commit
66bbcfb1cc
2 changed files with 49 additions and 19 deletions
|
@ -21,3 +21,28 @@ Index: security.c
|
||||||
|
|
||||||
test_SetSecurityDescriptorControl(sec);
|
test_SetSecurityDescriptorControl(sec);
|
||||||
|
|
||||||
|
===================================================================
|
||||||
|
--- security.c (revision 38229)
|
||||||
|
+++ security.c (working copy)
|
||||||
|
@@ -2840,6 +2840,7 @@
|
||||||
|
|
||||||
|
/* If we don't ask for the security descriptor, Windows will still give us
|
||||||
|
the other stuff, leaving us no way to free it. */
|
||||||
|
+ dacl = NULL;
|
||||||
|
ret = pGetSecurityInfo(obj, SE_FILE_OBJECT,
|
||||||
|
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
|
||||||
|
&owner, &group, &dacl, NULL, NULL);
|
||||||
|
@@ -2847,8 +2848,12 @@
|
||||||
|
ok(owner != NULL, "GetSecurityInfo\n");
|
||||||
|
ok(group != NULL, "GetSecurityInfo\n");
|
||||||
|
ok(dacl != NULL, "GetSecurityInfo\n");
|
||||||
|
- ok(IsValidAcl(dacl), "GetSecurityInfo\n");
|
||||||
|
|
||||||
|
+ if (dacl != NULL)
|
||||||
|
+ {
|
||||||
|
+ ok(IsValidAcl(dacl), "GetSecurityInfo\n");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
CloseHandle(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -2840,6 +2840,7 @@ static void test_GetSecurityInfo(void)
|
||||||
|
|
||||||
/* If we don't ask for the security descriptor, Windows will still give us
|
/* If we don't ask for the security descriptor, Windows will still give us
|
||||||
the other stuff, leaving us no way to free it. */
|
the other stuff, leaving us no way to free it. */
|
||||||
|
dacl = NULL;
|
||||||
ret = pGetSecurityInfo(obj, SE_FILE_OBJECT,
|
ret = pGetSecurityInfo(obj, SE_FILE_OBJECT,
|
||||||
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
|
OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
|
||||||
&owner, &group, &dacl, NULL, NULL);
|
&owner, &group, &dacl, NULL, NULL);
|
||||||
|
@ -2847,7 +2848,11 @@ static void test_GetSecurityInfo(void)
|
||||||
ok(owner != NULL, "GetSecurityInfo\n");
|
ok(owner != NULL, "GetSecurityInfo\n");
|
||||||
ok(group != NULL, "GetSecurityInfo\n");
|
ok(group != NULL, "GetSecurityInfo\n");
|
||||||
ok(dacl != NULL, "GetSecurityInfo\n");
|
ok(dacl != NULL, "GetSecurityInfo\n");
|
||||||
|
|
||||||
|
if (dacl != NULL)
|
||||||
|
{
|
||||||
ok(IsValidAcl(dacl), "GetSecurityInfo\n");
|
ok(IsValidAcl(dacl), "GetSecurityInfo\n");
|
||||||
|
}
|
||||||
|
|
||||||
CloseHandle(obj);
|
CloseHandle(obj);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue