Skip to content

TOKEN_ELEVATION_TYPE is not enough to check for elevated state #756

@chrisant996

Description

@chrisant996

Discussed in #755

Originally posted by andry81 May 14, 2025
Just have noticed the implementation:

static bool is_elevated()

And compared to that it is not enough: https://stackoverflow.com/questions/78134533/winapi-gettokeninformation-with-tokenelevationtype-what-do-the-enumerators/78145061#78145061

You have to check both: TOKEN_ELEVATION_TYPE and TOKEN_ELEVATION

Another issue here is that the if (!s_initialized) is not atomic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions