-
Notifications
You must be signed in to change notification settings - Fork 18
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
pam: adding support to manage pam modules; pam_access and pam_faillock #31
Conversation
a4f6648
to
507059d
Compare
e6a3dcf
to
5509508
Compare
1eeb1fd
to
17a9b22
Compare
a8beede
to
757a7bf
Compare
I'm not sure why there is an error here. lint: exit 1 (5.50 seconds) /home/runner/work/sssd-test-framework/sssd-test-framework> python -I -m pip install jc pytest 'pytest-mh>=1.0.5' python-ldap pid=2952 Tested locally against |
Hi, 3.x version currently fails due to ParallelSSH/ssh2-python#194 |
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.
Hi, I'm not sure in what state of draft you are. In general, it looks good.
I think both config_set and config_delete should behave the same, that is: either build command and execute it using config_write or call augeas immediately.
baae4d3
to
da1bbae
Compare
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.
LGTM!
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 #31 (review) still stands.
Okay, I see the misunderstanding. The augeas tree is modified and is not written until save is issued. Knowing this, does it change anything, or do you want me to update the functions to build the commands still? |
It doesn't change anything. Imagine: pam.access.config_set("a")
pam.access.config_delete("a")
pam.access.config_write()
In this case, you are already allowing to set multiple values with single call to |
config_write() removed, note --autosave is used in config_delete but cannot be used in config_set because all nodes have to be defined before it can saved, but when deleting only a branch needs to be specified. |
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.
Thank you, it looks great!
Two more nitpicks - setup_when_used should get a return value so mypy can check this method as well (it omits it without type hints). I recently got a warning about this in pytest-mh, not sure why the warning is not visible here. But the return type should definitely be there.
Feel free to merge it once you do this change an CI (3.10) is green.
No description provided.