1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/changelogs/fragments
patchback[bot] d0b39271b3
Sudoers validate (#4794) (#4866)
* Use visudo to validate sudoers rules before use

* Replace use of subprocess.Popen with module.run_command

* Switch out apt for package

* Check file mode when verifying file to determine whether something needs to change

* Only install sudo package for debian and redhat environments (when testing)

* Attempt to install sudo on FreeBSD too

* Try just installing sudo for non-darwin machines

* Don't validate file ownership

* Attempt to install sudo on all platforms

* Revert "Attempt to install sudo on all platforms"

This reverts commit b9562a8916.

* Remove file permissions changes from this PR

* Add changelog fragment for 4794 sudoers validation

* Add option to control when sudoers validation is used

* Update changelog fragment

Co-authored-by: Felix Fontein <felix@fontein.de>

* Add version_added to validation property

Co-authored-by: Felix Fontein <felix@fontein.de>

* Also validate failed sudoers validation error message

Co-authored-by: Felix Fontein <felix@fontein.de>

* Make visudo not executable instead of trying to delete it

* Update edge case validation

* Write invalid sudoers file to alternative path to avoid breaking sudo

* Don't try to remove or otherwise modify visudo on Darwin

* Update plugins/modules/system/sudoers.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Remove trailing extra empty line to appease sanity checker

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 97c72f88b7)

Co-authored-by: Jon Ellis <ellis.jp@gmail.com>
2022-06-21 12:52:21 +02:00
..
.keep Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:17:57 +02:00
5.2.0.yml Prepare 5.2.0 release. 2022-06-20 20:29:04 +02:00
4780-passwordstore-wrapper-compat.yml passwordstore: Make compatible with shims (#4780) (#4846) 2022-06-15 10:57:52 +02:00
4791-cmd-runner-callable.yaml cmd_runner: add __call__ method to invoke context (#4791) (#4844) 2022-06-15 10:58:04 +02:00
4794-sudoers-validation.yml Sudoers validate (#4794) (#4866) 2022-06-21 12:52:21 +02:00
4839-fix-VirtualMediaInsert-Supermicro.yml redfish_command: VirtualMediaInsert does not work with Supermicro (#4839) (#4863) 2022-06-20 19:29:52 +02:00
4852-sudoers-state-absent.yml sudoers: fix handling of state: absent (#4852) (#4853) (#4858) 2022-06-19 15:48:50 +02:00
psf-license.yml Add PSF-license.txt for plugins/module_utils/_mount.py (#4847) (#4848) 2022-06-17 12:49:08 +02:00