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

Do not crash if reading active LSM modules returns nil #129

Merged
merged 2 commits into from
Aug 23, 2022

Conversation

dgdavid
Copy link
Member

@dgdavid dgdavid commented Aug 23, 2022

Problem

While locally testing yast/yast-users#366, I realize that test suite was crashing because Y2Security::LSM::Config#active, which was performing a call to the #split method over a nil value.

Solution

Ensure that the result of Yast::SCR.Read is always a string.

Testing

  • Added a new unit test
  • Tested manually

Reading ".target.string" could return nil instead of "" when read path
does not exist.
@dgdavid dgdavid merged commit 64f1ebe into SLE-15-SP4 Aug 23, 2022
@dgdavid dgdavid deleted the fix-lsm-config-active branch August 23, 2022 09:00
@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #4 successfully finished
✔️ Created IBS submit request #278144

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

3 participants