Author: ekohl
Date: Sun Feb 7 14:51:25 2010
New Revision: 45484
URL:
http://svn.reactos.org/svn/reactos?rev=45484&view=rev
Log:
Implement LsaEnumerateAccountRights.
Modified:
trunk/reactos/dll/win32/advapi32/sec/lsa.c
trunk/reactos/dll/win32/lsasrv/lsarpc.c
Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/lsa…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] Sun Feb 7 14:51:25 2010
@@ -217,7 +217,7 @@
}
/*
- * @unimplemented
+ * @implemented
*/
NTSTATUS
WINAPI
@@ -227,10 +227,35 @@
PLSA_UNICODE_STRING *UserRights,
PULONG CountOfRights)
{
- FIXME("(%p,%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights,
CountOfRights);
- *UserRights = 0;
- *CountOfRights = 0;
- return STATUS_OBJECT_NAME_NOT_FOUND;
+ LSAPR_USER_RIGHT_SET UserRightsSet;
+ NTSTATUS Status;
+
+ TRACE("(%p,%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights,
CountOfRights);
+
+ UserRightsSet.Entries = 0;
+ UserRightsSet.UserRights = NULL;
+
+ RpcTryExcept
+ {
+ Status = LsarEnmuerateAccountRights((LSAPR_HANDLE)PolicyHandle,
+ AccountSid,
+ &UserRightsSet);
+
+ *CountOfRights = UserRightsSet.Entries;
+ *UserRights = (PUNICODE_STRING)UserRightsSet.UserRights;
+ }
+ RpcExcept(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = I_RpcMapWin32Status(RpcExceptionCode());
+
+ if (UserRightsSet.UserRights != NULL)
+ {
+ MIDL_user_free(UserRightsSet.UserRights);
+ }
+ }
+ RpcEndExcept;
+
+ return Status;
}
/*
@@ -288,7 +313,8 @@
/*
* @implemented
*/
-NTSTATUS WINAPI
+NTSTATUS
+WINAPI
LsaFreeMemory(PVOID Buffer)
{
TRACE("(%p)\n", Buffer);
Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsarpc.c?…
==============================================================================
--- trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] Sun Feb 7 14:51:25 2010
@@ -560,8 +560,14 @@
PRPC_SID AccountSid,
PLSAPR_USER_RIGHT_SET UserRights)
{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+ FIXME("(%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights);
+
+ if (!LsapValidateDbHandle(PolicyHandle))
+ return STATUS_INVALID_HANDLE;
+
+ UserRights->Entries = 0;
+ UserRights->UserRights = NULL;
+ return STATUS_OBJECT_NAME_NOT_FOUND;
}