mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-21 09:51:27 -07:00
* pamd - fixed issue+minor refactorings
* added changelog fragment
* added unit test suggested in issue
* Update tests/integration/targets/pamd/tasks/main.yml
* fixed per PR + additional adjustment
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit edd7b84285
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
bea5a6266c
commit
c64ab70c75
4 changed files with 59 additions and 30 deletions
|
@ -218,6 +218,14 @@ auth required pam_deny.so
|
|||
test_rule = PamdRule('auth', 'sufficient', 'pam_unix.so', 'nullok try_first_pass')
|
||||
self.assertNotIn(str(test_rule), str(self.pamd))
|
||||
|
||||
def test_update_rule_remove_module_args(self):
|
||||
self.assertTrue(self.pamd.update_rule('auth', 'sufficient', 'pam_unix.so', new_args=''))
|
||||
test_rule = PamdRule('auth', 'sufficient', 'pam_unix.so', '')
|
||||
self.assertIn(str(test_rule), str(self.pamd))
|
||||
|
||||
test_rule = PamdRule('auth', 'sufficient', 'pam_unix.so', 'nullok try_first_pass')
|
||||
self.assertNotIn(str(test_rule), str(self.pamd))
|
||||
|
||||
def test_update_first_three(self):
|
||||
self.assertTrue(self.pamd.update_rule('auth', 'required', 'pam_env.so',
|
||||
new_type='one', new_control='two', new_path='three'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue