diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index fb36e382570..67fdf8d9a24 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -33,6 +33,8 @@ #include "accctrl.h" #include "sddl.h" +#include "aclapi.h" + #include "wine/debug.h" #include "wine/unicode.h" @@ -2181,9 +2183,27 @@ DWORD WINAPI GetNamedSecurityInfoA(LPSTR pObjectName, PSID* ppsidOwner, PSID* ppsidGroup, PACL* ppDacl, PACL* ppSacl, PSECURITY_DESCRIPTOR* ppSecurityDescriptor) { - FIXME("%s %d %ld %p %p %p %p %p\n", pObjectName, ObjectType, SecurityInfo, + DWORD len; + LPWSTR wstr = NULL; + DWORD r; + + TRACE("%s %d %ld %p %p %p %p %p\n", pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor); - return ERROR_CALL_NOT_IMPLEMENTED; + + if( pObjectName ) + { + len = MultiByteToWideChar( CP_ACP, 0, pObjectName, -1, NULL, 0 ); + wstr = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR)); + MultiByteToWideChar( CP_ACP, 0, pObjectName, -1, wstr, len ); + } + + r = GetNamedSecurityInfoW( wstr, ObjectType, SecurityInfo, ppsidOwner, + ppsidGroup, ppDacl, ppSacl, ppSecurityDescriptor ); + + if( wstr ) + HeapFree( GetProcessHeap(), 0, wstr ); + + return r; } /******************************************************************************