[autobackport: sssd-2-13] sdap: handle missing rootDSE gracefully#8736
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates sdap_cli_connect_recv in sdap_async_connection.c to ensure that srv_opts is never NULL, addressing cases where rootdse_access is set to 'never' or the rootDSE is unavailable on the server. It does this by dynamically setting up the server options using sdap_get_server_opts_from_rootdse if they are not already present. No review comments were provided for this change.
If `ldap_read_rootdse = never` then srv_opts is NULL which is unexpected. It can also happen on other path in the connection code, because sdap_cli_use_rootdse() is called only when the rootDSE is successfully fetch. This patch makes sure that srv_opts are always set. :fixes: SSSD no longer crashes if `ldap_read_rootdse = never` and `enumerate = true` Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Tomáš Halman <thalman@redhat.com> (cherry picked from commit 2cc7dfa)
|
The pull request was accepted by @alexey-tikhonov with the following PR CI status: 🟢 rpm-build:centos-stream-10-x86_64:upstream (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
141611a to
2ea7a7a
Compare
This is an automatic backport of PR#8706 sdap: handle missing rootDSE gracefully to branch sssd-2-13, created by @pbrezina.
Please make sure this backport is correct.
Note
The commits were cherry-picked without conflicts.
You can push changes to this pull request
Original commits
2cc7dfa - sdap: handle missing rootDSE gracefully
Backported commits
Original Pull Request Body
If
ldap_read_rootdse = neverthen srv_opts which is unexpected. It canalso happen on other path in the connection code, because
sdap_cli_use_rootdse() is called only when the rootDSE is successfully
fetch. This patch makes sure that srv_opts are always set.
:fixes: SSSD no longer crashes if
ldap_read_rootdse = neverandenumarete = true