-
Notifications
You must be signed in to change notification settings - Fork 881
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: cc_user_groups incorrectly assumes "useradd" never locks password field #5355
Merged
blackboxsw
merged 9 commits into
canonical:main
from
dermotbradley:cc_users_groups_fix_password_lock_unlock
Aug 29, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
99edb8c
Currently cc_user_groups assumes that "useradd" never locks the
dermotbradley d9cfa17
review comments: update shadow file processing
blackboxsw 35ec122
Minor testcases additions and fixups:
dermotbradley 15a5610
Fixup
dermotbradley 0cb5903
proper regex for Distro.shadow_empty_locked_passwd_patterns
blackboxsw f024c29
- added more snappy user/group related tests
dermotbradley f79542b
Fix formatting warning
dermotbradley a3d5550
tests: add integration test coverage warning about empty password unl…
blackboxsw 54bae9b
tests: expect warning about empty password in user-data. use verify_c…
blackboxsw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This unlock is still being called even if
blank_password and pre_existing_user.
I think we still don't want to unlock the password in this case.I'm working on a couple of unittests for these paths so we can be more certain we aren't adding exposure to unlocking insecure accounts by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm renaming some of the variables to make it clear what their purpose is, so "blank_password" becomes "ud_blank_password_specified" to indicate this is where user-data contains a passwd/plain_text_passwd/hashed_passwd value of "" rather than where an existing user account has no password.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dermotbradley thanks on this. If we get a chance to get this updated with any changes/refactors please ping. I'd like to get this into 24.3 which is scheduled for the week of Aug 19th.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@blackboxsw Ok, I've pushed further changes.
Still needed are tests for snappy and for the various BSDs - neither of those are currently tested at all in test_create_users.py.
I'd also like to get this in 24.3 if possible.