Skip to content

Commit

Permalink
Improve TOKEN_ELEVATION_TYPE doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
forderud committed Oct 23, 2024
1 parent 959f093 commit 07d17a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RunInSandbox/Sandboxing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,10 @@ struct ImpersonateThread {
if (!GetTokenInformation(token.Get(), TokenElevationType, &elevation_type, sizeof(elevation_type), &ret_len))
abort(); // should never happen

// elevation_type is usually TokenElevationTypeFull, or
// TokenElevationTypeDefault if UAC is disabled.
// DOC: https://devblogs.microsoft.com/oldnewthing/20241003-00/?p=110336
// elevation_type values:
// * TokenElevationTypeFull if user is UAC-elevateed
// * TokenElevationTypeDefault if UAC is disabled
}

return elevation.TokenIsElevated;
Expand Down

0 comments on commit 07d17a2

Please sign in to comment.