wslcsession: use DuplicateHandle idiom for self-process handle in GetProcessHandle (#40748)
Replace OpenProcess(GetCurrentProcessId()) in IWSLCSessionFactory::GetProcessHandle and IWSLCSession::GetProcessHandle with a duplicate of the GetCurrentProcess() pseudo-handle via wslutil::DuplicateHandle. A process should not need an access check to obtain a handle to itself; duplicating the pseudo-handle is the canonical idiom and avoids OpenProcess's access check against the calling thread's (possibly impersonated) effective token. An explicit desired-access mask keeps the handle's rights identical (PROCESS_SET_QUOTA | PROCESS_TERMINATE), so the marshaled handle and downstream usage are unchanged. This is a cleanup/hardening change. It does not fix the 0x80070005 seen after hibernate/resume, which originates from AssignProcessToJobObject in wslservice.exe (WSLCSessionManager::AddSessionProcessToJobObject), not from GetProcessHandle. Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>