URL: https://github.com/SSSD/sssd/pull/5746 Author: assafmo Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705) Action: opened
PR body: """ This PR 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 PR partially fixes issue #5025, thanks to this comment by @sumit-bose: https://github.com/SSSD/sssd/issues/5025#issuecomment-801842175
:relnote: p11_child does not stop at the first empty slot when searching for tokens
This PR is a redo of PR #5705, because it was orphaned and changes were requested by the maintainers. """
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5746/head:pr5746 git checkout pr5746
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
sumit-bose commented: """ Hi,
thanks for the patch, the commit message is looking good now. ACK
bye, Sumit """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-900306004
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
Label: +Accepted
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
Label: +Ready to push
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
pbrezina commented: """ Pushed PR: https://github.com/SSSD/sssd/pull/5746
* `master` * b9f8c2f99d04da6d75bdde5111f2a389e1faff8b - p11_child: do_card partially fix loop exit condition when searching for token
"""
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-903642909
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
Label: +Pushed
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
Label: -Accepted
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
Label: -Ready to push
URL: https://github.com/SSSD/sssd/pull/5746 Author: assafmo Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705) Action: closed
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5746/head:pr5746 git checkout pr5746
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
dpward commented: """ FYI this change breaks some existing assumptions in the code after it
When this code is reached: https://github.com/SSSD/sssd/blob/606dacaa72344fb68ece0284006dff09a7303757/s... it will now exit if it did not find a removable slot _with a token in it_. So the `wait_for_card` handling right after it will never get executed: https://github.com/SSSD/sssd/blob/606dacaa72344fb68ece0284006dff09a7303757/s... """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-904173872
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
sumit-bose commented: """ Hi,
thanks for the hint, I have to admit that I didn't test the patch with `wait_for_card`.
@assafmo, would you like to add a patch that fixes this?
bye, Sumit """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-904439026
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
dpward commented: """ @sumit-bose I don't think a simple patch can fix this. I think some re-factoring of `do_card()` and `wait_for_card()` is what is really needed here, in order to make any progress towards supporting multiple PKCS#11 slots or tokens. """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-905160276
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
dpward commented: """ @sumit-bose I don't think a simple patch can fix this. I think some re-factoring of `do_card()` and `wait_for_card()` is what is really needed here, in order to make any progress towards supporting multiple PKCS#11 slots or tokens. """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-905160276
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
assafmo commented: """ Honestly I don't feel comfortable tinkering with this coee any more then I did. I can confirm that this patch did solve my issue and I was able to test it on multiple setups. """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-912984728
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
dpward commented: """ @assafmo Please see commit df58e6e647834b1dae1e5f2906aadb546405dd86 which fixes the regression caused by this patch. """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-913074437
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
dpward commented: """ @assafmo Please see commit df58e6e647834b1dae1e5f2906aadb546405dd86. """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-913074437
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
dpward commented: """ @assafmo Please see commit a036fc871588372a75c2111cf2075453f4a3eb7f. """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-913074437
URL: https://github.com/SSSD/sssd/pull/5746 Title: #5746: p11_child: do_card partially fix loop exit condition (redo of #5705)
dpward commented: """ @assafmo Please see commit a9218fbe0b36ec2b1ffba70ba6028aabfcfe4ef8. """
See the full comment at https://github.com/SSSD/sssd/pull/5746#issuecomment-913074437
sssd-devel@lists.fedorahosted.org