ReactOS  0.4.15-dev-3175-g222acf5
lsalpc.c File Reference
#include "precomp.h"
#include <ndk/lpctypes.h>
#include <ndk/lpcfuncs.h>
#include <ndk/mmfuncs.h>
#include <ndk/rtlfuncs.h>
#include <ndk/obfuncs.h>
#include <psdk/ntsecapi.h>
#include <lsass/lsass.h>
#include <wine/debug.h>
Include dependency graph for lsalpc.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (secur32)
 
VOID LsapInitLsaPort (VOID)
 
VOID LsapCloseLsaPort (VOID)
 
NTSTATUS LsapOpenLsaPort (VOID)
 
NTSTATUS NTAPI LsaConnectUntrusted (OUT PHANDLE LsaHandle)
 
NTSTATUS NTAPI LsaEnumerateLogonSessions (PULONG LogonSessionCount, PLUID *LogonSessionList)
 
NTSTATUS NTAPI LsaGetLogonSessionData (PLUID LogonId, PSECURITY_LOGON_SESSION_DATA *ppLogonSessionData)
 
NTSTATUS NTAPI LsaRegisterPolicyChangeNotification (POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass, HANDLE NotificationEventHandle)
 
NTSTATUS NTAPI LsaUnregisterPolicyChangeNotification (POLICY_NOTIFICATION_INFORMATION_CLASS InformationClass, HANDLE NotificationEventHandle)
 

Variables

HANDLE LsaPortHandle
 
HANDLE Secur32Heap
 

Function Documentation

◆ LsaConnectUntrusted()

NTSTATUS NTAPI LsaConnectUntrusted ( OUT PHANDLE  LsaHandle)

Definition at line 112 of file lsalpc.c.

114 {
116  SECURITY_QUALITY_OF_SERVICE SecurityQos;
117  LSA_CONNECTION_INFO ConnectInfo;
118  ULONG ConnectInfoLength = sizeof(ConnectInfo);
120  UNICODE_STRING EventName;
123 
124  TRACE("LsaConnectUntrusted(%p)\n", LsaHandle);
125 
126  // TODO: we may need to impersonate ourselves before, because we are untrusted!
127 
128  /* Wait for the LSA authentication thread */
129  RtlInitUnicodeString(&EventName,
130  L"\\SECURITY\\LSA_AUTHENTICATION_INITIALIZED");
132  &EventName,
134  NULL,
135  NULL);
137  SYNCHRONIZE,
139  if (!NT_SUCCESS(Status))
140  {
141  WARN("NtOpenEvent failed (Status 0x%08lx)\n", Status);
142 
144  SYNCHRONIZE,
147  FALSE);
148  if (!NT_SUCCESS(Status))
149  {
150  WARN("NtCreateEvent failed (Status 0x%08lx)\n", Status);
151  return Status;
152  }
153  }
154 
156  TRUE,
157  NULL);
159  if (!NT_SUCCESS(Status))
160  {
161  ERR("NtWaitForSingleObject failed (Status 0x%08lx)\n", Status);
162  return Status;
163  }
164 
165  /* Connect to the authentication port */
167  L"\\LsaAuthenticationPort");
168 
169  SecurityQos.Length = sizeof(SecurityQos);
172  SecurityQos.EffectiveOnly = TRUE;
173 
174  RtlZeroMemory(&ConnectInfo,
175  ConnectInfoLength);
176 
177  ConnectInfo.CreateContext = TRUE;
178  ConnectInfo.TrustedCaller = FALSE;
179 
181  &PortName,
182  &SecurityQos,
183  NULL,
184  NULL,
185  NULL,
186  &ConnectInfo,
187  &ConnectInfoLength);
188  if (!NT_SUCCESS(Status))
189  {
190  ERR("NtConnectPort failed (Status 0x%08lx)\n", Status);
191  return Status;
192  }
193 
194  if (!NT_SUCCESS(ConnectInfo.Status))
195  {
196  ERR("ConnectInfo.Status: 0x%08lx\n", ConnectInfo.Status);
197  }
198 
199  return ConnectInfo.Status;
200 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define TRUE
Definition: types.h:120
BOOL TrustedCaller
Definition: lsass.h:38
#define WARN(fmt,...)
Definition: debug.h:112
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI NtCreateEvent(OUT PHANDLE EventHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN EVENT_TYPE EventType, IN BOOLEAN InitialState)
Definition: event.c:96
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode
Definition: lsa.idl:66
BOOL CreateContext
Definition: lsass.h:37
NTSTATUS Status
Definition: lsass.h:33
#define FALSE
Definition: types.h:117
HANDLE LsaHandle
Definition: wkssvc.c:41
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI NtConnectPort(OUT PHANDLE PortHandle, IN PUNICODE_STRING PortName, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, IN OUT PPORT_VIEW ClientView OPTIONAL, IN OUT PREMOTE_PORT_VIEW ServerView OPTIONAL, OUT PULONG MaxMessageLength OPTIONAL, IN OUT PVOID ConnectionInformation OPTIONAL, IN OUT PULONG ConnectionInformationLength OPTIONAL)
Definition: connect.c:753
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3398
#define SECURITY_DYNAMIC_TRACKING
Definition: setypes.h:103
static const WCHAR L[]
Definition: oid.c:1250
#define OBJ_PERMANENT
Definition: winternl.h:226
#define SYNCHRONIZE
Definition: nt_native.h:61
NTSTATUS NTAPI NtOpenEvent(OUT PHANDLE EventHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: event.c:181
#define ERR(fmt,...)
Definition: debug.h:110
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
Definition: lsa.idl:65
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
IN PUNICODE_STRING PortName
Definition: conport.c:35
_Out_ PHANDLE EventHandle
Definition: iofuncs.h:857
NTSYSAPI NTSTATUS NTAPI NtWaitForSingleObject(IN HANDLE hObject, IN BOOLEAN bAlertable, IN PLARGE_INTEGER Timeout)

Referenced by NetUserChangePassword().

◆ LsaEnumerateLogonSessions()

NTSTATUS NTAPI LsaEnumerateLogonSessions ( PULONG  LogonSessionCount,
PLUID LogonSessionList 
)

Definition at line 208 of file lsalpc.c.

211 {
212  LSA_API_MSG ApiMessage;
214 
215  TRACE("LsaEnumerateLogonSessions(%p %p)\n", LogonSessionCount, LogonSessionList);
216 
218  if (!NT_SUCCESS(Status))
219  return Status;
220 
222  ApiMessage.h.u1.s1.DataLength = LSA_PORT_DATA_SIZE(ApiMessage.EnumLogonSessions);
223  ApiMessage.h.u1.s1.TotalLength = LSA_PORT_MESSAGE_SIZE;
224  ApiMessage.h.u2.ZeroInit = 0;
225 
227  (PPORT_MESSAGE)&ApiMessage,
228  (PPORT_MESSAGE)&ApiMessage);
229  if (!NT_SUCCESS(Status))
230  {
231  ERR("NtRequestWaitReplyPort() failed (Status 0x%08lx)\n", Status);
232  return Status;
233  }
234 
235  if (!NT_SUCCESS(ApiMessage.Status))
236  {
237  ERR("NtRequestWaitReplyPort() failed (ApiMessage.Status 0x%08lx)\n", ApiMessage.Status);
238  return ApiMessage.Status;
239  }
240 
241  *LogonSessionCount = ApiMessage.EnumLogonSessions.Reply.LogonSessionCount;
242  *LogonSessionList = ApiMessage.EnumLogonSessions.Reply.LogonSessionBuffer;
243 
244  return Status;
245 }
NTSTATUS LsapOpenLsaPort(VOID)
Definition: lsalpc.c:52
NTSTATUS NTAPI NtRequestWaitReplyPort(IN HANDLE PortHandle, IN PPORT_MESSAGE LpcRequest, IN OUT PPORT_MESSAGE LpcReply)
Definition: send.c:695
LONG NTSTATUS
Definition: precomp.h:26
PORT_MESSAGE h
Definition: lsass.h:177
HANDLE LsaPortHandle
Definition: lsalpc.c:26
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
#define LSA_PORT_MESSAGE_SIZE
Definition: lsass.h:200
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
LSA_API_NUMBER ApiNumber
Definition: lsass.h:183
#define ERR(fmt,...)
Definition: debug.h:110
LSA_ENUM_LOGON_SESSIONS_MSG EnumLogonSessions
Definition: lsass.h:191
#define LSA_PORT_DATA_SIZE(c)
Definition: lsass.h:199

◆ LsaGetLogonSessionData()

NTSTATUS NTAPI LsaGetLogonSessionData ( PLUID  LogonId,
PSECURITY_LOGON_SESSION_DATA ppLogonSessionData 
)

Definition at line 253 of file lsalpc.c.

256 {
257  LSA_API_MSG ApiMessage;
258  PSECURITY_LOGON_SESSION_DATA SessionData;
260 
261  TRACE("LsaGetLogonSessionData(%p %p)\n", LogonId, ppLogonSessionData);
262 
264  if (!NT_SUCCESS(Status))
265  return Status;
266 
268  ApiMessage.h.u1.s1.DataLength = LSA_PORT_DATA_SIZE(ApiMessage.GetLogonSessionData);
269  ApiMessage.h.u1.s1.TotalLength = LSA_PORT_MESSAGE_SIZE;
270  ApiMessage.h.u2.ZeroInit = 0;
271 
272  RtlCopyLuid(&ApiMessage.GetLogonSessionData.Request.LogonId,
273  LogonId);
274 
276  (PPORT_MESSAGE)&ApiMessage,
277  (PPORT_MESSAGE)&ApiMessage);
278  if (!NT_SUCCESS(Status))
279  {
280  ERR("NtRequestWaitReplyPort() failed (Status 0x%08lx)\n", Status);
281  return Status;
282  }
283 
284  if (!NT_SUCCESS(ApiMessage.Status))
285  {
286  ERR("NtRequestWaitReplyPort() failed (ApiMessage.Status 0x%08lx)\n", ApiMessage.Status);
287  return ApiMessage.Status;
288  }
289 
290  SessionData = ApiMessage.GetLogonSessionData.Reply.SessionDataBuffer;
291 
292  TRACE("UserName: %p\n", SessionData->UserName.Buffer);
293  if (SessionData->UserName.Buffer != NULL)
294  SessionData->UserName.Buffer = (LPWSTR)((ULONG_PTR)SessionData + (ULONG_PTR)SessionData->UserName.Buffer);
295 
296  TRACE("LogonDomain: %p\n", SessionData->LogonDomain.Buffer);
297  if (SessionData->LogonDomain.Buffer != NULL)
298  SessionData->LogonDomain.Buffer = (LPWSTR)((ULONG_PTR)SessionData + (ULONG_PTR)SessionData->LogonDomain.Buffer);
299 
300  TRACE("AuthenticationPackage: %p\n", SessionData->AuthenticationPackage.Buffer);
301  if (SessionData->AuthenticationPackage.Buffer != NULL)
302  SessionData->AuthenticationPackage.Buffer = (LPWSTR)((ULONG_PTR)SessionData + (ULONG_PTR)SessionData->AuthenticationPackage.Buffer);
303 
304  TRACE("Sid: %p\n", SessionData->Sid);
305  if (SessionData->Sid != NULL)
306  SessionData->Sid = (LPWSTR)((ULONG_PTR)SessionData + (ULONG_PTR)SessionData->Sid);
307 
308  TRACE("LogonServer: %p\n", SessionData->LogonServer.Buffer);
309  if (SessionData->LogonServer.Buffer != NULL)
310  SessionData->LogonServer.Buffer = (LPWSTR)((ULONG_PTR)SessionData + (ULONG_PTR)SessionData->LogonServer.Buffer);
311 
312  TRACE("DnsDomainName: %p\n", SessionData->DnsDomainName.Buffer);
313  if (SessionData->DnsDomainName.Buffer != NULL)
314  SessionData->DnsDomainName.Buffer = (LPWSTR)((ULONG_PTR)SessionData + (ULONG_PTR)SessionData->DnsDomainName.Buffer);
315 
316  TRACE("Upn: %p\n", SessionData->Upn.Buffer);
317  if (SessionData->Upn.Buffer != NULL)
318  SessionData->Upn.Buffer = (LPWSTR)((ULONG_PTR)SessionData + (ULONG_PTR)SessionData->Upn.Buffer);
319 
320  *ppLogonSessionData = SessionData;
321 
322  return Status;
323 }
LSA_GET_LOGON_SESSION_DATA_MSG GetLogonSessionData
Definition: lsass.h:192
NTSTATUS LsapOpenLsaPort(VOID)
Definition: lsalpc.c:52
NTSTATUS NTAPI NtRequestWaitReplyPort(IN HANDLE PortHandle, IN PPORT_MESSAGE LpcRequest, IN OUT PPORT_MESSAGE LpcReply)
Definition: send.c:695
struct _LSA_GET_LOGON_SESSION_DATA_MSG::@3419::@3421 Request
LONG NTSTATUS
Definition: precomp.h:26
PORT_MESSAGE h
Definition: lsass.h:177
uint32_t ULONG_PTR
Definition: typedefs.h:65
HANDLE LsaPortHandle
Definition: lsalpc.c:26
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
#define LSA_PORT_MESSAGE_SIZE
Definition: lsass.h:200
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
LSA_API_NUMBER ApiNumber
Definition: lsass.h:183
LSA_UNICODE_STRING LogonDomain
Definition: ntsecapi.h:307
LSA_UNICODE_STRING DnsDomainName
Definition: ntsecapi.h:314
#define ERR(fmt,...)
Definition: debug.h:110
LSA_UNICODE_STRING LogonServer
Definition: ntsecapi.h:313
#define NULL
Definition: types.h:112
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID LogonId
NTSYSAPI void WINAPI RtlCopyLuid(PLUID, const LUID *)
#define ULONG_PTR
Definition: config.h:101
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LSA_UNICODE_STRING AuthenticationPackage
Definition: ntsecapi.h:308
LSA_UNICODE_STRING Upn
Definition: ntsecapi.h:315
LSA_UNICODE_STRING UserName
Definition: ntsecapi.h:306
#define LSA_PORT_DATA_SIZE(c)
Definition: lsass.h:199

◆ LsapCloseLsaPort()

VOID LsapCloseLsaPort ( VOID  )

Definition at line 41 of file lsalpc.c.

42 {
43  if (LsaPortHandle != NULL)
44  {
47  }
48 }
HANDLE LsaPortHandle
Definition: lsalpc.c:26
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3398
#define NULL
Definition: types.h:112

Referenced by DllMain().

◆ LsapInitLsaPort()

VOID LsapInitLsaPort ( VOID  )

Definition at line 34 of file lsalpc.c.

35 {
37 }
HANDLE LsaPortHandle
Definition: lsalpc.c:26
#define NULL
Definition: types.h:112

Referenced by DllMain().

◆ LsapOpenLsaPort()

NTSTATUS LsapOpenLsaPort ( VOID  )

Definition at line 52 of file lsalpc.c.

53 {
55  SECURITY_QUALITY_OF_SERVICE SecurityQos;
56  LSA_CONNECTION_INFO ConnectInfo;
57  ULONG ConnectInfoLength;
59 
60  TRACE("LsapOpenLsaPort()\n");
61 
62  if (LsaPortHandle != NULL)
63  return STATUS_SUCCESS;
64 
66  L"\\LsaAuthenticationPort");
67 
68  SecurityQos.Length = sizeof(SecurityQos);
71  SecurityQos.EffectiveOnly = TRUE;
72 
73  RtlZeroMemory(&ConnectInfo,
74  sizeof(ConnectInfo));
75 
76  ConnectInfo.CreateContext = FALSE;
77  ConnectInfo.TrustedCaller = TRUE;
78 
79  ConnectInfoLength = sizeof(LSA_CONNECTION_INFO);
81  &PortName,
82  &SecurityQos,
83  NULL,
84  NULL,
85  NULL,
86  &ConnectInfo,
87  &ConnectInfoLength);
88  if (!NT_SUCCESS(Status))
89  {
90  TRACE("NtConnectPort failed (Status 0x%08lx)\n", Status);
91  }
92 
93  return Status;
94 /*
95  if (!NT_SUCCESS(ConnectInfo.Status))
96  {
97  DPRINT1("ConnectInfo.Status: 0x%08lx\n", ConnectInfo.Status);
98  }
99 
100  return ConnectInfo.Status;
101 */
102 }
struct _LSA_CONNECTION_INFO LSA_CONNECTION_INFO
#define TRUE
Definition: types.h:120
BOOL TrustedCaller
Definition: lsass.h:38
LONG NTSTATUS
Definition: precomp.h:26
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode
Definition: lsa.idl:66
BOOL CreateContext
Definition: lsass.h:37
HANDLE LsaPortHandle
Definition: lsalpc.c:26
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
NTSTATUS NTAPI NtConnectPort(OUT PHANDLE PortHandle, IN PUNICODE_STRING PortName, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, IN OUT PPORT_VIEW ClientView OPTIONAL, IN OUT PREMOTE_PORT_VIEW ServerView OPTIONAL, OUT PULONG MaxMessageLength OPTIONAL, IN OUT PVOID ConnectionInformation OPTIONAL, IN OUT PULONG ConnectionInformationLength OPTIONAL)
Definition: connect.c:753
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define SECURITY_DYNAMIC_TRACKING
Definition: setypes.h:103
static const WCHAR L[]
Definition: oid.c:1250
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
Definition: lsa.idl:65
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_SUCCESS
Definition: shellext.h:65
IN PUNICODE_STRING PortName
Definition: conport.c:35

Referenced by LsaEnumerateLogonSessions(), LsaGetLogonSessionData(), LsaRegisterPolicyChangeNotification(), and LsaUnregisterPolicyChangeNotification().

◆ LsaRegisterPolicyChangeNotification()

NTSTATUS NTAPI LsaRegisterPolicyChangeNotification ( POLICY_NOTIFICATION_INFORMATION_CLASS  InformationClass,
HANDLE  NotificationEventHandle 
)

Definition at line 331 of file lsalpc.c.

334 {
335  LSA_API_MSG ApiMessage;
337 
338  TRACE("LsaRegisterPolicyChangeNotification(%lu %p)\n",
339  InformationClass, NotificationEventHandle);
340 
342  if (!NT_SUCCESS(Status))
343  return Status;
344 
346  ApiMessage.h.u1.s1.DataLength = LSA_PORT_DATA_SIZE(ApiMessage.PolicyChangeNotify);
347  ApiMessage.h.u1.s1.TotalLength = LSA_PORT_MESSAGE_SIZE;
348  ApiMessage.h.u2.ZeroInit = 0;
349 
350  ApiMessage.PolicyChangeNotify.Request.InformationClass = InformationClass;
351  ApiMessage.PolicyChangeNotify.Request.NotificationEventHandle = NotificationEventHandle;
352  ApiMessage.PolicyChangeNotify.Request.Register = TRUE;
353 
355  (PPORT_MESSAGE)&ApiMessage,
356  (PPORT_MESSAGE)&ApiMessage);
357  if (!NT_SUCCESS(Status))
358  {
359  ERR("NtRequestWaitReplyPort() failed (Status 0x%08lx)\n", Status);
360  return Status;
361  }
362 
363  if (!NT_SUCCESS(ApiMessage.Status))
364  {
365  ERR("NtRequestWaitReplyPort() failed (ApiMessage.Status 0x%08lx)\n", ApiMessage.Status);
366  return ApiMessage.Status;
367  }
368 
369  return Status;
370 }
NTSTATUS LsapOpenLsaPort(VOID)
Definition: lsalpc.c:52
NTSTATUS NTAPI NtRequestWaitReplyPort(IN HANDLE PortHandle, IN PPORT_MESSAGE LpcRequest, IN OUT PPORT_MESSAGE LpcReply)
Definition: send.c:695
#define TRUE
Definition: types.h:120
struct _LSA_POLICY_CHANGE_NOTIFY_MSG::@3423::@3425 Request
LSA_POLICY_CHANGE_NOTIFY_MSG PolicyChangeNotify
Definition: lsass.h:193
LONG NTSTATUS
Definition: precomp.h:26
PORT_MESSAGE h
Definition: lsass.h:177
HANDLE LsaPortHandle
Definition: lsalpc.c:26
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
#define LSA_PORT_MESSAGE_SIZE
Definition: lsass.h:200
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
LSA_API_NUMBER ApiNumber
Definition: lsass.h:183
#define ERR(fmt,...)
Definition: debug.h:110
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1713
#define LSA_PORT_DATA_SIZE(c)
Definition: lsass.h:199

Referenced by NetRegisterDomainNameChangeNotification().

◆ LsaUnregisterPolicyChangeNotification()

NTSTATUS NTAPI LsaUnregisterPolicyChangeNotification ( POLICY_NOTIFICATION_INFORMATION_CLASS  InformationClass,
HANDLE  NotificationEventHandle 
)

Definition at line 378 of file lsalpc.c.

381 {
382  LSA_API_MSG ApiMessage;
384 
385  TRACE("LsaUnregisterPolicyChangeNotification(%lu %p)\n",
386  InformationClass, NotificationEventHandle);
387 
389  if (!NT_SUCCESS(Status))
390  return Status;
391 
393  ApiMessage.h.u1.s1.DataLength = LSA_PORT_DATA_SIZE(ApiMessage.PolicyChangeNotify);
394  ApiMessage.h.u1.s1.TotalLength = LSA_PORT_MESSAGE_SIZE;
395  ApiMessage.h.u2.ZeroInit = 0;
396 
397  ApiMessage.PolicyChangeNotify.Request.InformationClass = InformationClass;
398  ApiMessage.PolicyChangeNotify.Request.NotificationEventHandle = NotificationEventHandle;
399  ApiMessage.PolicyChangeNotify.Request.Register = FALSE;
400 
402  (PPORT_MESSAGE)&ApiMessage,
403  (PPORT_MESSAGE)&ApiMessage);
404  if (!NT_SUCCESS(Status))
405  {
406  ERR("NtRequestWaitReplyPort() failed (Status 0x%08lx)\n", Status);
407  return Status;
408  }
409 
410  if (!NT_SUCCESS(ApiMessage.Status))
411  {
412  ERR("NtRequestWaitReplyPort() failed (ApiMessage.Status 0x%08lx)\n", ApiMessage.Status);
413  return ApiMessage.Status;
414  }
415 
416  return Status;
417 }
NTSTATUS LsapOpenLsaPort(VOID)
Definition: lsalpc.c:52
NTSTATUS NTAPI NtRequestWaitReplyPort(IN HANDLE PortHandle, IN PPORT_MESSAGE LpcRequest, IN OUT PPORT_MESSAGE LpcReply)
Definition: send.c:695
struct _LSA_POLICY_CHANGE_NOTIFY_MSG::@3423::@3425 Request
LSA_POLICY_CHANGE_NOTIFY_MSG PolicyChangeNotify
Definition: lsass.h:193
LONG NTSTATUS
Definition: precomp.h:26
PORT_MESSAGE h
Definition: lsass.h:177
HANDLE LsaPortHandle
Definition: lsalpc.c:26
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:24
#define TRACE(s)
Definition: solgame.cpp:4
#define LSA_PORT_MESSAGE_SIZE
Definition: lsass.h:200
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
LSA_API_NUMBER ApiNumber
Definition: lsass.h:183
#define ERR(fmt,...)
Definition: debug.h:110
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1713
#define LSA_PORT_DATA_SIZE(c)
Definition: lsass.h:199

Referenced by NetUnregisterDomainNameChangeNotification().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( secur32  )

Variable Documentation

◆ LsaPortHandle

◆ Secur32Heap

HANDLE Secur32Heap

Definition at line 17 of file dllmain.c.

Referenced by DllMain().