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

Document, test and improve unssuported scenarios #26

Merged
merged 20 commits into from Oct 9, 2020
Merged

Conversation

jreidinger
Copy link
Member

@jreidinger jreidinger commented Oct 1, 2020

related trello: https://trello.com/c/Wj8zx82g/1781-8-yast-sudo-new-better-parser

Goal of this PBI is to document what is supported and what not. Add example sudoers file that can be used to testing its ability. Also adding unit test for parsing part. And improve three things:

  1. write properly @include and @includedir
  2. improve error report when write failed
  3. stop when unsupported scenario is detected and inform user

Screenshots

old error report when write failed:
sudo_fail_old
new one with better error message:
sudo_fail_new
Unsupported multiple tags:
sudo_unsupported
Unsupported digest:
sudo_unsupported2

@jreidinger jreidinger marked this pull request as ready for review October 5, 2020 14:12
README.md Outdated Show resolved Hide resolved
test/data/cmd_alias_config/sudoers Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Member

@kobliha kobliha left a comment

Choose a reason for hiding this comment

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

LGTM

@jreidinger jreidinger changed the title add few example sudoers Document, test and improve unssuported scenarios Oct 8, 2020
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
package/yast2-sudo.changes Outdated Show resolved Hide resolved
@teclator
Copy link
Contributor

teclator commented Oct 9, 2020

In general LGTM, and it was already approved by @kobliha , so, feel free to apply the suggestions and/or merge it

Co-authored-by: Knut Alejandro Anderssen González <kanderssen@suse.com>
begin
Report.Error(Message.CannotReadCurrentSettings) if !ReadSudoSettings2()
rescue UnsupportedSudoConfig => e
msg = _("Unsupported configuration found. YaST2 exits now to prevent breaking system.")
Copy link
Member

@kobliha kobliha Oct 9, 2020

Choose a reason for hiding this comment

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

What about YaST will now exit to prevent from breaking the system.?

Copy link
Member Author

Choose a reason for hiding this comment

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

fine for me

@kobliha
Copy link
Member

kobliha commented Oct 9, 2020

One little comment and LGTM 👍

@jreidinger jreidinger merged commit 524897c into master Oct 9, 2020
@jreidinger jreidinger deleted the testing_sudoers branch October 9, 2020 12:26
@yast-bot
Copy link
Contributor

yast-bot commented Oct 9, 2020

✔️ Public Jenkins job #12 successfully finished
✔️ Created OBS submit request #840425

@yast-bot
Copy link
Contributor

yast-bot commented Oct 9, 2020

✔️ Internal Jenkins job #6 successfully finished
✔️ Created IBS submit request #228223

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.

None yet

5 participants