I have a problem facing with reset option that PAM supports.
I have a config like this
auth sufficient Module1
auth sufficient Module2
account required Module1
account required Module2
account [success=ok ignore=ignore perm_denied=reset default=ok] Module_X
The problem I am facing is "reset" option is not working. The code flow is observed a s follows
1) Auth Module1 success
2) Account Module1, Module 2 success
3) Account Module_X-> fail (note " but reset option was provided in config)
4) Auth Module2 success
5) Account Module1, Module2 success
6) Acount Module-X - > success
But the problem is overall authorization/PAM is reporting failure due to step 3.
My understanding is it has to reset the current state but looks like it is maintaining the state across the stack even though reset option is provided