-
Notifications
You must be signed in to change notification settings - Fork 899
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
review comments: update shadow file processing
- Avoid signficant functional side-effects like subprocess calls in __init__ methods of classes. Move subp(ifconfig -a) call out of cloudinit/distros/networking/NetworkingBSD.__init__ and into a cached property. Only perform significant side-effects when the data is needed. - avoid subprocess(grep -e) commands and instead use python to process shadow files, removing need for _check_if_password_field_matches. - rename _check_if_existing_password -> _shadow_file_has_empty_user_password to clearly declare intent of the method - drop wrapper method _check_if_existing_password as it is misleading since we just not the retvalue value from _shadow_file_has_empty_user_password - define class attributes shadow_extrausers_fn and shadow_empty_locked_passwd_patterns allowing BSD subclasses to specialize those match patterns for finding empty passwords WIP checkpoint for review, will rebase force push this commit today
- Loading branch information
1 parent
99edb8c
commit d9cfa17
Showing
9 changed files
with
213 additions
and
196 deletions.
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
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.