[Bug 45133] Multiple applications need 'ntdll.NtQueryInformationProcess' to support 'ProcessSessionInformation' info class (ProcessHacker, NewProcessFromToken)

wine-bugs at winehq.org wine-bugs at winehq.org
Fri May 4 15:52:02 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=45133

Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|NewProcessFromToken tool    |Multiple applications need
                   |(.NET app) from Google      |'ntdll.NtQueryInformationPr
                   |sandbox-attacksurface-analy |ocess' to support
                   |sis-tools v1.1.x wants      |'ProcessSessionInformation'
                   |'ntdll.NtQueryInformationPr |info class (ProcessHacker,
                   |ocess' to support           |NewProcessFromToken)
                   |'ProcessSessionInformation' |
                URL|                            |https://github.com/google/s
                   |                            |andbox-attacksurface-analys
                   |                            |is-tools/releases/download/
                   |                            |v1.1.14/Release-v1.1.14.7z
           Keywords|                            |dotnet, download

--- Comment #1 from Anastasius Focht <focht at gmx.net> ---
Hello folks,

widening the summary a bit, 'ProcessHacker' might need this too.

https://github.com/processhacker/processhacker/search?q=ProcessSessionInformation

--- snip ---
/**
 * Gets a process' session ID.
 *
 * \param ProcessHandle A handle to a process. The handle must have
 * PROCESS_QUERY_LIMITED_INFORMATION access.
 * \param SessionId A variable which receives the process' session ID.
 */
FORCEINLINE
NTSTATUS
PhGetProcessSessionId(
    _In_ HANDLE ProcessHandle,
    _Out_ PULONG SessionId
    )
{
    NTSTATUS status;
    PROCESS_SESSION_INFORMATION sessionInfo;

    status = NtQueryInformationProcess(
        ProcessHandle,
        ProcessSessionInformation,
        &sessionInfo,
        sizeof(PROCESS_SESSION_INFORMATION),
        NULL
        );

    if (NT_SUCCESS(status))
    {
        *SessionId = sessionInfo.SessionId;
    }

    return status;
}
--- snip ---

https://github.com/processhacker/processhacker/search?q=PhGetProcessSessionId

https://github.com/processhacker/processhacker/search?q=sessionid

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list