-
Notifications
You must be signed in to change notification settings - Fork 855
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSL Plugin: Issue with WSLSessionInformation -> UserToken Not Being a Valid User Token #12554
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging |
/question |
Diagnostic information
|
Tagging @OneBlue @benhillis The following function call returns an "Invalid Token" error. I am trying to retrieve the Active Directory group of a user by using:
|
Thank you for reporting this @ssijbabu. This is indeed a bug in the plugin API. It will be fixed in the next release |
Description
I'm working with the OnVmStarted function in the context of handling WSL sessions. I'm encountering an issue where the Session->UserToken is not a valid user token. As a result, attempts to retrieve user-related information such as the user profile directory, user SID, or the list of Active Directory (AD) groups the user is a member of are failing.
Code Snippet
Here's the relevant part of the code I'm using:
Issue Details
When calling functions like GetUserProfileDirectoryW or GetTokenInformation, they fail with an invalid token error (GetLastError() -> 6). For example:
ERROR_INVALID_HANDLE
.ERROR_INVALID_HANDLE
.Questions
The text was updated successfully, but these errors were encountered: