Skip to content

Commit d24c7f6

Browse files
committed
[NTOSKRNL][WINLOGON] Remaining hacks
1 parent 007d126 commit d24c7f6

File tree

2 files changed

+4
-50
lines changed

2 files changed

+4
-50
lines changed

base/system/winlogon/notify.c

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ GetNotificationHandler(
9090
* @brief
9191
* Loads the notification DLL and retrieves its exported notification handlers.
9292
**/
93-
static
9493
BOOL
9594
LoadNotifyDll(
9695
_Inout_ PNOTIFICATION_ITEM NotificationDll)
@@ -475,54 +474,9 @@ CallNotificationDll(
475474
_In_ NOTIFICATION_TYPE Type,
476475
_In_ PWLX_NOTIFICATION_INFO pInfo)
477476
{
478-
PWLX_NOTIFY_HANDLER pNotifyHandler;
479-
WLX_NOTIFICATION_INFO Info;
480-
HANDLE UserToken;
481-
482-
/* Delay-load the DLL if needed */
483-
if (!NotificationDll->hModule)
484-
{
485-
if (!LoadNotifyDll(NotificationDll))
486-
{
487-
/* We failed, disable it */
488-
NotificationDll->bEnabled = FALSE;
489-
return;
490-
}
491-
ASSERT(NotificationDll->hModule);
492-
}
493-
494-
/* Retrieve the notification handler; bail out if none is specified */
495-
pNotifyHandler = NotificationDll->Handler[Type];
496-
if (!pNotifyHandler)
497-
return;
498-
499-
/* Capture the notification info structure, since
500-
* the notification handler might mess with it */
501-
Info = *pInfo;
502-
503-
/* Impersonate the logged-on user if necessary */
504-
UserToken = (NotificationDll->bImpersonate ? Info.hToken : NULL);
505-
if (UserToken && !ImpersonateLoggedOnUser(UserToken))
506-
{
507-
ERR("WL: ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError());
508-
return;
509-
}
510-
511-
/* Call the notification handler in SEH to prevent any Winlogon crashes */
512-
_SEH2_TRY
513-
{
514-
pNotifyHandler(&Info);
515-
}
516-
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
517-
{
518-
ERR("WL: Exception 0x%08lx hit by notification DLL %ws while executing %s notify function\n",
519-
_SEH2_GetExceptionCode(), NotificationDll->pszDllName, FuncNames[Type]);
520-
}
521-
_SEH2_END;
522-
523-
/* Revert impersonation */
524-
if (UserToken)
525-
RevertToSelf();
477+
UNREFERENCED_PARAMETER(NotificationDll);
478+
UNREFERENCED_PARAMETER(Type);
479+
UNREFERENCED_PARAMETER(pInfo);
526480
}
527481

528482

ntoskrnl/mm/ARM3/mdlsup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ MiUnmapLockedPagesInUserSpace(
350350

351351
if (MiDecrementPageTableReferences(BaseAddress) == 0)
352352
{
353-
ASSERT(MiIsPteOnPdeBoundary(PointerPte + 1) || (NumberOfPages == 1));
353+
// ASSERT(MiIsPteOnPdeBoundary(PointerPte + 1) || (NumberOfPages == 1));
354354
MiDeletePde(PointerPde, Process);
355355
}
356356

0 commit comments

Comments
 (0)