From: Sam Hartman <hartmans@debian.org>
Date: Mon, 11 Sep 2023 14:00:42 -0600
Subject: _pam_dispatch_jump_is_ignore

Previously jumps were treated as PAM_IGNORE in the freezing part of
the chain and PAM_OK (aka required) in the frozen part of the chain.
No one on pam-list was able to explain this behavior, so I changed it
to be consistent.
---
 libpam/pam_dispatch.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/libpam/pam_dispatch.c b/libpam/pam_dispatch.c
index 974104a..15cad01 100644
--- a/libpam/pam_dispatch.c
+++ b/libpam/pam_dispatch.c
@@ -260,22 +260,7 @@ static int _pam_dispatch_aux(pam_handle_t *pamh, int flags, struct handler *h,
 	    if ( _PAM_ACTION_IS_JUMP(action) ) {
 
 		/* If we are evaluating a cached chain, we treat this
-		   module as required (aka _PAM_ACTION_OK) as well as
-		   executing the jump. */
-
-		if (use_cached_chain) {
-		    if (impression == _PAM_UNDEF
-			|| (impression == _PAM_POSITIVE
-			    && status == PAM_SUCCESS) ) {
-			if ( retval != PAM_IGNORE || cached_retval == retval ) {
-			    if ( impression == _PAM_UNDEF && retval == PAM_SUCCESS ) {
-				h->grantor = 1;
-			    }
-			    impression = _PAM_POSITIVE;
-			    status = retval;
-			}
-		    }
-		}
+		   module as ignored as well as executing the jump. */
 
 		/* this means that we need to skip #action stacked modules */
 		while (h->next != NULL && h->next->stack_level >= stack_level && action > 0) {
