URL: https://github.com/SSSD/sssd/pull/5705 Author: assafmo Title: #5705: p11_child: do_card fix loop exit condition Action: opened
PR body: """ This commit fixes the exit condition when searching for a token in p11_child/do_card, specifically in case a token is present in a slot, but there are empty slots before it. This commit fixes issue #5025, thanks to this comment by @sumit-bose: https://github.com/SSSD/sssd/issues/5025#issuecomment-801842175 Closes #5025 """ To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5705/head:pr5705 git checkout pr5705
From 18b533bf4a1e345b4a981f3af55cf499fb9c04a1 Mon Sep 17 00:00:00 2001 From: Assaf Morami <[email protected]> Date: Wed, 7 Jul 2021 17:20:52 +0300 Subject: [PATCH] p11_child: do_card fix loop exit condition when This commit fixes the exit condition when searching for a token in p11_child/do_card, specifically in case a token is present in a slot, but there are empty slots before it. This commit fixes issue #5025, thanks to this comment by @sumit-bose: https://github.com/SSSD/sssd/issues/5025#issuecomment-801842175 Co-Authored-By: Sumit Bose <[email protected]> --- src/p11_child/p11_child_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p11_child/p11_child_openssl.c b/src/p11_child/p11_child_openssl.c index 78c05f5cb3..b5a10de570 100644 --- a/src/p11_child/p11_child_openssl.c +++ b/src/p11_child/p11_child_openssl.c @@ -1745,7 +1745,7 @@ errno_t do_card(TALLOC_CTX *mem_ctx, struct p11_ctx *p11_ctx, } - if ((info.flags & CKF_REMOVABLE_DEVICE)) { + if ((info.flags & CKF_REMOVABLE_DEVICE) && (info.flags & CKF_TOKEN_PRESENT)) { break; } }
_______________________________________________ sssd-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/[email protected] Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
