summaryrefslogtreecommitdiff
path: root/system/runtime
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-01-07 12:12:46 +0000
committerMoonchild <moonchild@palemoon.org>2022-01-07 12:12:46 +0000
commit9cb21608f1ac1874da7e4ddd9b5f217f3e16fc29 (patch)
treec64011eb255e8b3fc0a486a636ad9e59f49e6c5a /system/runtime
parent1699dbe78bf43eaa5ef4c593f075dfdc59c02b15 (diff)
parent811b994a48ba359f8d62aae7771f8aa01186bef4 (diff)
downloadaura-central-9cb21608f1ac1874da7e4ddd9b5f217f3e16fc29.tar.gz
Merge branch 'master' into Remove-GMP
Diffstat (limited to 'system/runtime')
-rw-r--r--system/runtime/nsAppRunner.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/system/runtime/nsAppRunner.cpp b/system/runtime/nsAppRunner.cpp
index 6c1477b23..17f9d47d2 100644
--- a/system/runtime/nsAppRunner.cpp
+++ b/system/runtime/nsAppRunner.cpp
@@ -1008,29 +1008,16 @@ nsXULAppInfo::GetWindowsDLLBlocklistStatus(bool* aResult)
}
#ifdef XP_WIN
-// Matches the enum in WinNT.h for the Vista SDK but renamed so that we can
-// safely build with the Vista SDK and without it.
-typedef enum
-{
- VistaTokenElevationTypeDefault = 1,
- VistaTokenElevationTypeFull,
- VistaTokenElevationTypeLimited
-} VISTA_TOKEN_ELEVATION_TYPE;
-
-// avoid collision with TokeElevationType enum in WinNT.h
-// of the Vista SDK
-#define VistaTokenElevationType static_cast< TOKEN_INFORMATION_CLASS >( 18 )
-
NS_IMETHODIMP
nsXULAppInfo::GetUserCanElevate(bool *aUserCanElevate)
{
HANDLE hToken;
- VISTA_TOKEN_ELEVATION_TYPE elevationType;
+ TOKEN_ELEVATION_TYPE elevationType;
DWORD dwSize;
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken) ||
- !GetTokenInformation(hToken, VistaTokenElevationType, &elevationType,
+ !GetTokenInformation(hToken, TokenElevationType, &elevationType,
sizeof(elevationType), &dwSize)) {
*aUserCanElevate = false;
}
@@ -1044,7 +1031,7 @@ nsXULAppInfo::GetUserCanElevate(bool *aUserCanElevate)
// TokenElevationTypeLimited: The token is linked to a limited token
// (e.g. UAC is enabled and the user is not elevated, so they can be
// elevated)
- *aUserCanElevate = (elevationType == VistaTokenElevationTypeLimited);
+ *aUserCanElevate = (elevationType == TokenElevationTypeLimited);
}
if (hToken)