Skip to content

Add Support for Safely Elevating Administrator Privileges #1036

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

Merged
merged 15 commits into from
Mar 27, 2023

Conversation

Nonary
Copy link

@Nonary Nonary commented Mar 13, 2023

Description

Sunshine will be able to detect if a command failed due to lack of elevation and will try again in an elevated context.
It does it in a safer manner, forcing a UAC prompt and user interaction.

As a bonus, when #998 is fixed as well, this will work for the pre-commands as well.

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

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.

  • I want maintainers to keep my branch updated

@github-actions github-actions bot changed the base branch from master to nightly March 13, 2023 06:23
@github-actions
Copy link

Your PR was set to master, PRs should be sent to nightly.
The base branch of this PR has been automatically changed to nightly.
Please check that there are no merge conflicts

@Nonary

This comment was marked as spam.

@Nonary

This comment was marked as spam.

@ReenigneArcher
Copy link
Member

Regarding #764, that error occurs for me when I don't use cmd /c prefix if using a working directory. https://docs.lizardbyte.dev/projects/sunshine/en/nightly/about/app_examples.html#binary-epic-w-working-directory

Didn't have anything to do with elevation in my experience.

@Nonary

This comment was marked as spam.

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested this, but overall the code looks good. Just have a few minor suggestions.

ReenigneArcher
ReenigneArcher previously approved these changes Mar 17, 2023
@ReenigneArcher
Copy link
Member

Depends on #1022

@Nonary

This comment was marked as spam.

@Nonary

This comment was marked as spam.

@ReenigneArcher ReenigneArcher merged commit c2fba6f into LizardByte:nightly Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants