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

Fix pamd error when inserting a new rule at the end. Fixes #28487 #28488

Merged
merged 1 commit into from
Dec 13, 2017
Merged

Fix pamd error when inserting a new rule at the end. Fixes #28487 #28488

merged 1 commit into from
Dec 13, 2017

Conversation

davidkretch
Copy link
Contributor

@davidkretch davidkretch commented Aug 22, 2017

SUMMARY

Fixes #28487. When inserting a new PAM rule using pamd's insert_after_rule, check if the old rule is the last rule, and if it is, add the new rule onto the end of the list of rules. Otherwise it attempts to check the next rule in the list to see if it also matches the old rule, which fails at the end of the list. I also added one new test for inserting a new rule at the end.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

pamd

ANSIBLE VERSION
ansible 2.4.0 (pamd-insert-rule-fix a77865caf2) last updated 2017/08/21 20:29:53 (GMT -400)
  config file = None
  configured module search path = [u'/home/david/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/david/ansible/lib/ansible
  executable location = /home/david/ansible/bin/ansible
  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]
ADDITIONAL INFORMATION

* When inserting a new rule in `insert_after_rule`, check if the old rule is
the last rule, to avoid a list index out of range error when attempting to
access the next rule.
* Add a test for inserting a new rule after the last rule.
@ansibot
Copy link
Contributor

ansibot commented Aug 22, 2017

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bugfix_pull_request community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Aug 22, 2017
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Aug 22, 2017
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 30, 2017
@ansibot ansibot added test This PR relates to tests. test_pull_requests labels Sep 7, 2017
@gundalow gundalow added test This PR relates to tests. and removed test This PR relates to tests. labels Oct 17, 2017
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Nov 18, 2017
@maxamillion maxamillion self-requested a review December 13, 2017 21:09
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 13, 2017
@maxamillion maxamillion merged commit 98260f9 into ansible:devel Dec 13, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pamd fails when inserting a new rule at the end of a file
5 participants