| 1 |
From: Sam Hartman <[email protected]> |
| 2 |
Date: Mon, 11 Sep 2023 14:00:42 -0600 |
| 3 |
Subject: _pam_dispatch_jump_is_ignore |
| 4 |
|
| 5 |
Previously jumps were treated as PAM_IGNORE in the freezing part of |
| 6 |
the chain and PAM_OK (aka required) in the frozen part of the chain. |
| 7 |
No one on pam-list was able to explain this behavior, so I changed it |
| 8 |
to be consistent. |
| 9 |
--- |
| 10 |
libpam/pam_dispatch.c | 17 +---------------- |
| 11 |
1 file changed, 1 insertion(+), 16 deletions(-) |
| 12 |
|
| 13 |
diff --git a/libpam/pam_dispatch.c b/libpam/pam_dispatch.c |
| 14 |
index 3a1d59e..b341774 100644 |
| 15 |
--- a/libpam/pam_dispatch.c |
| 16 |
+++ b/libpam/pam_dispatch.c |
| 17 |
@@ -260,22 +260,7 @@ static int _pam_dispatch_aux(pam_handle_t *pamh, int flags, struct handler *h, |
| 18 |
if ( _PAM_ACTION_IS_JUMP(action) ) { |
| 19 |
|
| 20 |
/* If we are evaluating a cached chain, we treat this |
| 21 |
- module as required (aka _PAM_ACTION_OK) as well as |
| 22 |
- executing the jump. */ |
| 23 |
- |
| 24 |
- if (use_cached_chain) { |
| 25 |
- if (impression == _PAM_UNDEF |
| 26 |
- || (impression == _PAM_POSITIVE |
| 27 |
- && status == PAM_SUCCESS) ) { |
| 28 |
- if ( retval != PAM_IGNORE || cached_retval == retval ) { |
| 29 |
- if ( impression == _PAM_UNDEF && retval == PAM_SUCCESS ) { |
| 30 |
- h->grantor = 1; |
| 31 |
- } |
| 32 |
- impression = _PAM_POSITIVE; |
| 33 |
- status = retval; |
| 34 |
- } |
| 35 |
- } |
| 36 |
- } |
| 37 |
+ module as ignored as well as executing the jump. */ |
| 38 |
|
| 39 |
/* this means that we need to skip #action stacked modules */ |
| 40 |
while (h->next != NULL && h->next->stack_level >= stack_level && action > 0) { |