[ros-diffs] [sginsberg] 38232: - Make advapi32 Winetest do a basic check instead of assuming that the routine won't fail

sginsberg at svn.reactos.org sginsberg at svn.reactos.org
Sun Dec 21 17:29:23 CET 2008


Author: sginsberg
Date: Sun Dec 21 10:29:23 2008
New Revision: 38232

URL: http://svn.reactos.org/svn/reactos?rev=38232&view=rev
Log:
- Make advapi32 Winetest do a basic check instead of assuming that the routine won't fail

Modified:
    trunk/rostests/winetests/advapi32/roshack.diff
    trunk/rostests/winetests/advapi32/security.c

Modified: trunk/rostests/winetests/advapi32/roshack.diff
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/roshack.diff?rev=38232&r1=38231&r2=38232&view=diff
==============================================================================
--- trunk/rostests/winetests/advapi32/roshack.diff [iso-8859-1] (original)
+++ trunk/rostests/winetests/advapi32/roshack.diff [iso-8859-1] Sun Dec 21 10:29:23 2008
@@ -3,21 +3,46 @@
 --- security.c	(revision 37998)
 +++ security.c	(working copy)
 @@ -2665,13 +2665,17 @@
-         return;
-     }
- 
-+    /* ReactOS Hack: ros' Security Descriptor string parsing sucks */
-+    skip("ROS-HACK: Skipping 'test_PrivateObjectSecurity' -- ros' SID string parsing sucks\n");
-+    return;
-+
-     ok(pConvertStringSecurityDescriptorToSecurityDescriptorA(
-         "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)"
-         "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)",
--        SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n");
-+        SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n"); // FIXME: ConvertStringSecurityDescriptorToSecurityDescriptor fails and 'sec' isn't set
- 
-     test_SetSecurityDescriptorControl(sec);
- 
+         return;
+     }
+ 
++    /* ReactOS Hack: ros' Security Descriptor string parsing sucks */
++    skip("ROS-HACK: Skipping 'test_PrivateObjectSecurity' -- ros' SID string parsing sucks\n");
++    return;
++
+     ok(pConvertStringSecurityDescriptorToSecurityDescriptorA(
+         "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)"
+         "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)",
+-        SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n");
++        SDDL_REVISION_1, &sec, &dwDescSize), "Creating descriptor failed\n"); // FIXME: ConvertStringSecurityDescriptorToSecurityDescriptor fails and 'sec' isn't set
+ 
+     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);
+ }
+ 

Modified: trunk/rostests/winetests/advapi32/security.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/security.c?rev=38232&r1=38231&r2=38232&view=diff
==============================================================================
--- trunk/rostests/winetests/advapi32/security.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/advapi32/security.c [iso-8859-1] Sun Dec 21 10:29:23 2008
@@ -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,7 +2848,11 @@
     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);
 }



More information about the Ros-diffs mailing list