Andrey Turkin : user32: GetUserObjectSecurity should return a valid security descriptor.

Alexandre Julliard julliard at winehq.org
Sun Jan 4 09:09:10 CST 2009


Module: wine
Branch: master
Commit: 405ced0969ad0d346bf03e510777c4773f1cf89c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=405ced0969ad0d346bf03e510777c4773f1cf89c

Author: Andrey Turkin <andrey.turkin at gmail.com>
Date:   Sat Jan  3 18:35:18 2009 +0300

user32: GetUserObjectSecurity should return a valid security descriptor.

---

 dlls/user32/winstation.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/winstation.c b/dlls/user32/winstation.c
index 9b89376..c6c52b7 100644
--- a/dlls/user32/winstation.c
+++ b/dlls/user32/winstation.c
@@ -628,7 +628,14 @@ BOOL WINAPI GetUserObjectSecurity( HANDLE handle, PSECURITY_INFORMATION info,
                                    PSECURITY_DESCRIPTOR sid, DWORD len, LPDWORD needed )
 {
     FIXME( "(%p %p %p len=%d %p),stub!\n", handle, info, sid, len, needed );
-    return TRUE;
+    if (needed)
+        *needed = sizeof(SECURITY_DESCRIPTOR);
+    if (len < sizeof(SECURITY_DESCRIPTOR))
+    {
+        SetLastError( ERROR_INSUFFICIENT_BUFFER );
+        return FALSE;
+    }
+    return InitializeSecurityDescriptor(sid, SECURITY_DESCRIPTOR_REVISION);
 }
 
 /***********************************************************************




More information about the wine-cvs mailing list