-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: sudosu not working on some BSD machines #8214
Conversation
BTW, if The original version passes |
Thanks for your contribution! Please note that you need to add a changelog fragment, and that the unit tests are failing (https://github.com/ansible-collections/community.general/blob/main/tests/unit/plugins/become/test_sudosu.py). Also it seems to me that this is potentially a larger change that might break some use-cases on other systems. I'm wondering whether the switch between the current and the new behavior should maybe be controlled by a toggle? (The |
ummmm the unit test is failing because it is asserting the original command which is not working on all system... Maybe we should change the unit test? |
That sounds good to me. |
Ping @lekoOwO needs_info |
…h more versions of `su`
changelogs/fragments/8214-sudosu-not-working-on-some-BSD-machines.yml
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
…nes.yml Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
If nobody objects, I'll merge this tomorrow. |
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #8631 🤖 @patchback |
* fix: sudosu not working on some BSD machines * fix: sudosu: added a flag (`alt_method`) to enhance compatibility with more versions of `su` * Update changelogs/fragments/8214-sudosu-not-working-on-some-BSD-machines.yml Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * fix: sudosu: lint --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit 83318c3)
@lekoOwO thanks for your contribution! |
…e BSD machines (#8631) fix: sudosu not working on some BSD machines (#8214) * fix: sudosu not working on some BSD machines * fix: sudosu: added a flag (`alt_method`) to enhance compatibility with more versions of `su` * Update changelogs/fragments/8214-sudosu-not-working-on-some-BSD-machines.yml Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * fix: sudosu: lint --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit 83318c3) Co-authored-by: leko <[email protected]>
* fix: sudosu not working on some BSD machines * fix: sudosu: added a flag (`alt_method`) to enhance compatibility with more versions of `su` * Update changelogs/fragments/8214-sudosu-not-working-on-some-BSD-machines.yml Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * fix: sudosu: lint --------- Co-authored-by: Felix Fontein <[email protected]>
* fix: sudosu not working on some BSD machines * fix: sudosu: added a flag (`alt_method`) to enhance compatibility with more versions of `su` * Update changelogs/fragments/8214-sudosu-not-working-on-some-BSD-machines.yml Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/become/sudosu.py Co-authored-by: Felix Fontein <[email protected]> * fix: sudosu: lint --------- Co-authored-by: Felix Fontein <[email protected]>
SUMMARY
The original sudosu does not work on some BSD machines and some versions of linux machine as the argument of su differs .
ISSUE TYPE
COMPONENT NAME
become.sudosu
ADDITIONAL INFORMATION