Index: base/setup/usetup/interface/usetup.c =================================================================== --- base/setup/usetup/interface/usetup.c (revision 63958) +++ base/setup/usetup/interface/usetup.c (working copy) @@ -4095,6 +4095,7 @@ PAGE_NUMBER Page; LARGE_INTEGER Time; NTSTATUS Status; + BOOLEAN Old; NtQuerySystemTime(&Time); @@ -4296,6 +4297,7 @@ NtDelayExecution(FALSE, &Time); /* Reboot */ + RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, TRUE, FALSE, &Old); NtShutdownSystem(ShutdownReboot); NtTerminateProcess(NtCurrentProcess(), 0); } Index: base/setup/usetup/usetup.h =================================================================== --- base/setup/usetup/usetup.h (revision 63958) +++ base/setup/usetup/usetup.h (working copy) @@ -48,6 +48,7 @@ #include #include #include +#include /* Filesystem headers */ #include Index: base/system/winlogon/sas.c =================================================================== --- base/system/winlogon/sas.c (revision 63958) +++ base/system/winlogon/sas.c (working copy) @@ -776,6 +776,7 @@ PLOGOFF_SHUTDOWN_DATA LSData; HANDLE hThread; DWORD exitCode; + BOOLEAN Old; DisplayStatusMessage(Session, Session->WinlogonDesktop, IDS_REACTOSISSHUTTINGDOWN); @@ -821,6 +822,7 @@ UninitializeSAS(Session); FIXME("FIXME: Call SMSS API #1\n"); + RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, TRUE, FALSE, &Old); if (wlxAction == WLX_SAS_ACTION_SHUTDOWN_REBOOT) NtShutdownSystem(ShutdownReboot); else @@ -832,6 +834,7 @@ } NtShutdownSystem(ShutdownNoReboot); } + RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, Old, FALSE, &Old); return STATUS_SUCCESS; } Index: base/system/winlogon/winlogon.h =================================================================== --- base/system/winlogon/winlogon.h (revision 63958) +++ base/system/winlogon/winlogon.h (working copy) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include Index: ntoskrnl/po/power.c =================================================================== --- ntoskrnl/po/power.c (revision 63958) +++ ntoskrnl/po/power.c (working copy) @@ -830,7 +830,7 @@ { /* Not granted */ DPRINT1("ERROR: Privilege not held for shutdown\n"); - //return STATUS_PRIVILEGE_NOT_HELD; HACK! + return STATUS_PRIVILEGE_NOT_HELD; } /* Do it as a kernel-mode caller for consistency with system state */