Skip to content

Commit befff69

Browse files
committed
krb5_child: fix OTP authentication for PAM stacked tokens
The `tokeninfo_matches()` function already handles PAM stacked tokens correctly by processing them through the 2FA single path, so the `answer_otp()` function should allow this token type to proceed. Add SSS_AUTHTOK_TYPE_PAM_STACKED to the allowed authentication token types in `answer_otp()` to restore previous functionality. Fixes: 4cb99a2 ("krb5_child: advertise authentication methods"). Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com> Reviewed-by: Justin Stephenson <jstephen@redhat.com> (cherry picked from commit df15165)
1 parent 1127e9c commit befff69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/krb5/krb5_child.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,8 @@ static krb5_error_code answer_otp(krb5_context ctx,
631631

632632
type = sss_authtok_get_type(kr->pd->authtok);
633633
if (type != SSS_AUTHTOK_TYPE_2FA_SINGLE
634-
&& type != SSS_AUTHTOK_TYPE_2FA) {
634+
&& type != SSS_AUTHTOK_TYPE_2FA
635+
&& type != SSS_AUTHTOK_TYPE_PAM_STACKED) {
635636
DEBUG(SSSDBG_MINOR_FAILURE, "Unexpected authentication token type [%s]\n",
636637
sss_authtok_type_to_str(type));
637638
return ERR_CHECK_NEXT_AUTH_TYPE;

0 commit comments

Comments
 (0)