-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Using ConPTY with CreateProcessWithLogon and CreateProcessWithToken #11865
Comments
You know, we wrote terminal/src/winconpty/winconpty.cpp Line 360 in f2386de
a while ago, but I don't think we ever added it to the public SDK. We should probably do that. (this might also be an argument in favor of the conpty nuget package, #3577/#1130 so folks don't need to rely on SDK version updates) |
Thanks for the quick reply. Do I read it correctly that such scenario is then not supported and the only way to host another user's process in pseudoconsole is to call |
Right now, yea, it's not technically supported. All the code is there and ready to be used, we just never exposed the public function signature for it (mostly because we just forgot to). If we do ever get around to shipping a conpty nuget, then we could ship the updated API surface out-of-band, without needing to wait for the OS to update. That might be a quicker and easier solution than trying to get this exposed in the OS. |
The linked code just calls Unless the new token is related to the caller's token (e.g. a restricted token, or UWP app token), directly calling Also, for |
The documentation only covers same-user scenario with
CreateProcess
function. There is no mention whetherCreatePseudoConsole
also works withCreateProcessWithLogon
,CreateProcessWithToken
and similar functions.It seems as if this scenario is not supported.
CreateProcessWithLogon
fails withERROR_INVALID_PARAMETER
(87) message. However, given how cryptic the message is, the underlying issue might be also elsewhere.The text was updated successfully, but these errors were encountered: