Author: ekohl
Date: Wed Sep 21 10:49:40 2016
New Revision: 72757
URL:
http://svn.reactos.org/svn/reactos?rev=72757&view=rev
Log:
[LSASRV]
Revert all pointless changes from r72751.
Modified:
trunk/reactos/sdk/lib/lsalib/lsa.c
Modified: trunk/reactos/sdk/lib/lsalib/lsa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/lsalib/lsa.c?rev=7…
==============================================================================
--- trunk/reactos/sdk/lib/lsalib/lsa.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/lsalib/lsa.c [iso-8859-1] Wed Sep 21 10:49:40 2016
@@ -35,8 +35,8 @@
OUT PULONG ReturnBufferLength,
OUT PNTSTATUS ProtocolStatus)
{
- NTSTATUS Status;
LSA_API_MSG ApiMessage;
+ NTSTATUS Status;
DPRINT1("LsaCallAuthenticationPackage()\n");
@@ -77,9 +77,50 @@
*/
NTSTATUS
NTAPI
+LsaDeregisterLogonProcess(IN HANDLE LsaHandle)
+{
+ LSA_API_MSG ApiMessage;
+ NTSTATUS Status;
+
+ DPRINT("LsaDeregisterLogonProcess()\n");
+
+ ApiMessage.ApiNumber = LSASS_REQUEST_DEREGISTER_LOGON_PROCESS;
+ ApiMessage.h.u1.s1.DataLength =
LSA_PORT_DATA_SIZE(ApiMessage.DeregisterLogonProcess);
+ ApiMessage.h.u1.s1.TotalLength = LSA_PORT_MESSAGE_SIZE;
+ ApiMessage.h.u2.ZeroInit = 0;
+
+ Status = ZwRequestWaitReplyPort(LsaHandle,
+ (PPORT_MESSAGE)&ApiMessage,
+ (PPORT_MESSAGE)&ApiMessage);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("ZwRequestWaitReplyPort() failed (Status 0x%08lx)\n", Status);
+ return Status;
+ }
+
+ if (!NT_SUCCESS(ApiMessage.Status))
+ {
+ DPRINT1("ZwRequestWaitReplyPort() failed (ApiMessage.Status
0x%08lx)\n", ApiMessage.Status);
+ return ApiMessage.Status;
+ }
+
+ ZwClose(LsaHandle);
+
+ DPRINT("LsaDeregisterLogonProcess() done (Status 0x%08lx)\n", Status);
+
+ return Status;
+}
+
+
+/*
+ * @implemented
+ */
+NTSTATUS
+NTAPI
LsaFreeReturnBuffer(IN PVOID Buffer)
{
SIZE_T Size = 0;
+
return ZwFreeVirtualMemory(NtCurrentProcess(),
&Buffer,
&Size,
@@ -96,8 +137,8 @@
IN PLSA_STRING PackageName,
OUT PULONG AuthenticationPackage)
{
- NTSTATUS Status;
LSA_API_MSG ApiMessage;
+ NTSTATUS Status;
/* Check the package name length */
if (PackageName->Length > LSASS_MAX_PACKAGE_NAME_LENGTH)
@@ -155,8 +196,8 @@
OUT PQUOTA_LIMITS Quotas,
OUT PNTSTATUS SubStatus)
{
- NTSTATUS Status;
LSA_API_MSG ApiMessage;
+ NTSTATUS Status;
ApiMessage.ApiNumber = LSASS_REQUEST_LOGON_USER;
ApiMessage.h.u1.s1.DataLength = LSA_PORT_DATA_SIZE(ApiMessage.LogonUser);
@@ -301,43 +342,3 @@
return ConnectInfo.Status;
}
-
-
-/*
- * @implemented
- */
-NTSTATUS
-NTAPI
-LsaDeregisterLogonProcess(IN HANDLE LsaHandle)
-{
- NTSTATUS Status;
- LSA_API_MSG ApiMessage;
-
- DPRINT("LsaDeregisterLogonProcess()\n");
-
- ApiMessage.ApiNumber = LSASS_REQUEST_DEREGISTER_LOGON_PROCESS;
- ApiMessage.h.u1.s1.DataLength =
LSA_PORT_DATA_SIZE(ApiMessage.DeregisterLogonProcess);
- ApiMessage.h.u1.s1.TotalLength = LSA_PORT_MESSAGE_SIZE;
- ApiMessage.h.u2.ZeroInit = 0;
-
- Status = ZwRequestWaitReplyPort(LsaHandle,
- (PPORT_MESSAGE)&ApiMessage,
- (PPORT_MESSAGE)&ApiMessage);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("ZwRequestWaitReplyPort() failed (Status 0x%08lx)\n", Status);
- return Status;
- }
-
- if (!NT_SUCCESS(ApiMessage.Status))
- {
- DPRINT1("ZwRequestWaitReplyPort() failed (ApiMessage.Status
0x%08lx)\n", ApiMessage.Status);
- return ApiMessage.Status;
- }
-
- ZwClose(LsaHandle);
-
- DPRINT("LsaDeregisterLogonProcess() done (Status 0x%08lx)\n", Status);
-
- return Status;
-}