[PATCH] sechost: Support decimal access rights in ConvertStringSecurityDescriptorToSecurityDescriptor.

Dmitry Timoshkov dmitry at baikal.ru
Thu Jun 9 06:47:28 CDT 2022


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/advapi32/tests/security.c | 1 +
 dlls/sechost/security.c        | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index ed91ccc39d3..1a874de75c4 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -4240,6 +4240,7 @@ static void test_ConvertStringSecurityDescriptor(void)
         { "D:(D;;GA;;;WD )",                SDDL_REVISION_1, TRUE },
         /* test ACE string access rights */
         { "D:(A;;GA;;;WD)",                  SDDL_REVISION_1, TRUE },
+        { "D:(A;;1;;;WD)",                   SDDL_REVISION_1, TRUE },
         { "D:(A;;GRGWGX;;;WD)",              SDDL_REVISION_1, TRUE },
         { "D:(A;;RCSDWDWO;;;WD)",            SDDL_REVISION_1, TRUE },
         { "D:(A;;RPWPCCDCLCSWLODTCR;;;WD)",  SDDL_REVISION_1, TRUE },
diff --git a/dlls/sechost/security.c b/dlls/sechost/security.c
index 6916b3ad662..f6fcffd9cfc 100644
--- a/dlls/sechost/security.c
+++ b/dlls/sechost/security.c
@@ -903,6 +903,9 @@ static DWORD parse_ace_right( const WCHAR **string_ptr )
     if (string[0] == '0' && string[1] == 'x')
         return wcstoul( string, (WCHAR **)string_ptr, 16 );
 
+    if (iswdigit( string[0] ))
+        return wcstoul( string, (WCHAR **)string_ptr, 10 );
+
     for (i = 0; i < ARRAY_SIZE(ace_rights); ++i)
     {
         if (!wcsncmp( string, ace_rights[i].str, 2 ))
-- 
2.36.1




More information about the wine-devel mailing list