-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add elevated execution support to exec messages #102
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concern is real but I'd rather not fix it this way, because the remedy would make
NoExitthe only version-gated exec flag in the library while its exact siblings stay ungated.State of the code today:
NowClientversion-gates exactly one thing: the whole RDM extension (MIN_RDM_ENABLED_VERSION = 1.3, checked inEnsureRdmCapabilities).DETACHEDarrived in 1.4 with the identical property you describe — send it to a 1.3 server and the session is tracked anyway, silently contradicting the caller.RAW_ENCODINGandUNICODE_CONSOLEarrived in 1.6; the latter got a capability bit,NOW_CAP_EXEC_UNICODE_CONSOLE, rather than a version check.So the two coherent options are "the library gates no exec flags and callers gate" (status quo — RDM gates fire-and-forget on
Version >= 1.4and Unicode console on the capset bit) or "the library gates all of them, consistently". Gating just the newest flag is the one option that leaves the codebase harder toreason about.
There's also a severity gap worth naming. Elevation silently not happening is a trust and correctness failure: the operator believes a script ran as administrator when it did not, and nothing in the UI or the logs says otherwise - that is the exact bug this PR exists to close, which is why it gets a hard refusal client-side.
NoExitsilently not applying means a console window closes instead of staying open: immediately visible to the person watching the remote desktop, no incorrect belief about privileges, no correctness impact. The enforcement asymmetry is proportionate to the consequence asymmetry.Elevation also had a mechanism that a version can never express (shell vs token elevation differ in whether stdio survives), which is why it needed capability negotiation rather than a version compare.
NoExithas no such dimension.Concretely, my preference: leave the library as is, and have RDM gate the Keep open checkbox the same way it already gates Fire and forget. That is in the RDM-side plan for this work. If you'd rather have library-level enforcement, I think it deserves its own PR that covers
DETACHEDand the encoding flags too, so the rule is uniform.