Francois Gouget : ntdll/tests: The case-sensitivity tests don't need write access.

Alexandre Julliard julliard at winehq.org
Mon Dec 14 15:51:18 CST 2020


Module: wine
Branch: master
Commit: 84907a9eb149363782cf05037759c52e1b34ef2a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=84907a9eb149363782cf05037759c52e1b34ef2a

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Dec 14 16:06:16 2020 +0100

ntdll/tests: The case-sensitivity tests don't need write access.

This fixes the tests when missing elevated privileges.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/reg.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c
index 24832312460..9335d9cc927 100644
--- a/dlls/ntdll/tests/reg.c
+++ b/dlls/ntdll/tests/reg.c
@@ -614,6 +614,7 @@ static void test_NtCreateKey(void)
     pRtlFreeUnicodeString( &str );
 
     /* the REGISTRY part is case-sensitive unless OBJ_CASE_INSENSITIVE is specified */
+    am = GENERIC_READ;
     attr.Attributes = 0;
     pRtlCreateUnicodeStringFromAsciiz( &str, "\\Registry\\Machine\\Software\\Classes" );
     status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
@@ -624,14 +625,14 @@ static void test_NtCreateKey(void)
 
     pRtlCreateUnicodeStringFromAsciiz( &str, "\\REGISTRY\\Machine\\Software\\Classes" );
     status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
-    ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
+    ok( status == STATUS_SUCCESS,
         "NtCreateKey failed: 0x%08x\n", status );
     if (!status) pNtClose( subkey );
     pRtlFreeUnicodeString( &str );
 
     pRtlCreateUnicodeStringFromAsciiz( &str, "\\REGISTRY\\MACHINE\\SOFTWARE\\CLASSES" );
     status = pNtCreateKey( &subkey, am, &attr, 0, 0, 0, 0 );
-    ok( status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED,
+    ok( status == STATUS_SUCCESS,
         "NtCreateKey failed: 0x%08x\n", status );
     if (!status) pNtClose( subkey );
     pRtlFreeUnicodeString( &str );




More information about the wine-cvs mailing list