Skip to content
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

sudo: copy template config from /usr/etc to /etc before modifying it #18217

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

DimStar77
Copy link
Contributor

@DimStar77 DimStar77 commented Nov 28, 2023

tests/console/sudo.pm Outdated Show resolved Hide resolved
tests/console/sudo.pm Outdated Show resolved Hide resolved
@lnussel
Copy link
Contributor

lnussel commented Nov 30, 2023

probably better replace this with a sudoers.d file remove afterwards. Otherwise this test leaves side effects.

@DimStar77
Copy link
Contributor Author

probably better replace this with a sudoers.d file remove afterwards. Otherwise this test leaves side effects.

it does intentionally NOT do a sudoers.d (there are a few tests before that testing the snippets included); the last stage is to test modifying /etc/sudeors.

the sed part being done is being reverted in the post_run_hook already (the only difference to 'base setup' is that /etc/sudoers is in place - a copy of /usr/etc/sudoers; something that can be accepted IMHO)

@Vogtinator
Copy link
Member

the sed part being done is being reverted in the post_run_hook already (the only difference to 'base setup' is that /etc/sudoers is in place - a copy of /usr/etc/sudoers; something that can be accepted IMHO)

IMO it should revert this as well

@DimStar77
Copy link
Contributor Author

the sed part being done is being reverted in the post_run_hook already (the only difference to 'base setup' is that /etc/sudoers is in place - a copy of /usr/etc/sudoers; something that can be accepted IMHO)

IMO it should revert this as well

Added a marker (/tmp/sudoers.copied) when copying it and when this marker is present, remove the file at the end again (the sed revert is overkill there, but making the change least intrusive to not break SLE)

@DimStar77 DimStar77 merged commit 0f82aab into os-autoinst:master Dec 5, 2023
8 checks passed
@DimStar77 DimStar77 deleted the sudo branch December 5, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants