Skip to content

Feature Alternatives to sudo for privilege escalation #67897

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

TheSemicolons
Copy link

@TheSemicolons TheSemicolons commented Mar 20, 2025

What does this PR do?

This commit adds functionality for alternative privilege escalation
commands to be used via the sudo_cmd variable in the minion config
file. If the variable is absent the default of sudo is used.

What issues does this PR fix or reference?

Fixes #67255

Previous Behavior

Only sudo was available for privilege escalation.

New Behavior

sudo is the default privilege escalation. sudo_cmd has been added
and allows alternatives to be specified in the minion config file via this
variable.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

`sudo` is the default privilege escalation. `sudo_cmd` has been added
and allows alternatives to be specified in the minion config file via
this variable.
@TheSemicolons TheSemicolons requested a review from a team as a code owner March 20, 2025 05:01
Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

We probably want to add this as a new config option by adding it to salt/config/__init__.py and document it in conf/minion and doc/ref/configuration/minion.rst

Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

This also needs a changelog and a test

@twangboy twangboy added the test:full Run the full test suite label Jul 1, 2025
@twangboy twangboy added this to the Argon v3008.0 milestone Jul 1, 2025
@twangboy twangboy added needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases needs-changelog labels Jul 1, 2025
`sudo` is the default privilege escalation. `sudo_cmd` has been added
and allows alternatives to be specified in the minion config file via
this variable.
@TheSemicolons
Copy link
Author

Added as a new config option by adding it to salt/config/__init__.py and documented in conf/minion and doc/ref/configuration/minion.rst. Unsure how to write the test.

Copy link
Contributor

@twangboy twangboy left a comment

Choose a reason for hiding this comment

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

This adds the sudo_cmd config option, but I don't see where this is implemented later on in Salt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-changelog needs-testcase PR needs test cases written, or the issue is about a bug/feature that needs test cases test:full Run the full test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants