-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Elevated Do/Undo Command Fixes #1120
Conversation
By default in Linux sunshine runs as an unprivileged user because it is launched as a systemd --user service. Because of this, the warning in run_unprivileged() saying run unprivileged is not supported does not make sense. |
In fact, all of this run_privileged/run_unprivileged business should be a Windows only feature and should not be generalised into common.h for all platforms. If you want to run a privileged command in Linux you would run it with sudo and configure the behaviour in sudoers. You should not handle this within the sunshine application. |
Good idea, can you put in a pull request for that please? |
I'm just following the existing code sir. I realize it's a dumb idea, but it's already done this way. I don't really have the time to fix it, I've already spent hours on fixing this issue anyway. I'd encourage others to spent time to optimize it though: |
My point here is there's a lot in the codebase for Sunshine that doesn't make sense and could be done better. However that's not my focus right now, my main goal is to fix security exploits and to keep the code as consistent with the original code as possible.Furthermore, it is best practice to keep pull requests focusing on one thing at a time. A refactor should be a separate pull request. |
I believe those comments were added by cameron when he added the ability to execute commands in the context of the logged in user in #600 , instead of as the SYSTEM user. His skill is lightyears beyond mine so I didn't question it. |
This is obsolete and will be replaced with #1123 |
Description
Adds support for executing do/undo commands (safely) with elevation prompts.
If users prefer to make their system vulnerable by disabling the prompts, they can add a registry key called UnsafeElevation under HKLM/LizardByte/Sunshine with a value of 1.
When doing that, it will launch the commands under system and inform the user (via logs) that they are vulnerable to exploits.
Issues Fixed or Closed
#1117
Type of Change
.github/...
)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.