Skip to content

[autobackport: sssd-2-13] sdap: handle missing rootDSE gracefully#8736

Merged
alexey-tikhonov merged 1 commit into
SSSD:sssd-2-13from
sssd-bot:SSSD-sssd-backport-pr8706-to-sssd-2-13
May 27, 2026
Merged

[autobackport: sssd-2-13] sdap: handle missing rootDSE gracefully#8736
alexey-tikhonov merged 1 commit into
SSSD:sssd-2-13from
sssd-bot:SSSD-sssd-backport-pr8706-to-sssd-2-13

Conversation

@sssd-bot
Copy link
Copy Markdown
Contributor

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

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8706-to-sssd-2-13
git checkout SSSD-sssd-backport-pr8706-to-sssd-2-13
git push sssd-bot SSSD-sssd-backport-pr8706-to-sssd-2-13 --force

Original commits
2cc7dfa - sdap: handle missing rootDSE gracefully

Backported commits

  • 141611a - sdap: handle missing rootDSE gracefully

Original Pull Request Body

If ldap_read_rootdse = never then srv_opts 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
enumarete = true

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@thalman thalman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@alexey-tikhonov alexey-tikhonov added no-backport This should go to target branch only. Accepted labels May 27, 2026
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)
@sssd-bot
Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @alexey-tikhonov with the following PR CI status:


🟢 rpm-build:centos-stream-10-x86_64:upstream (success)
🟢 rpm-build:fedora-42-x86_64:upstream (success)
🟢 rpm-build:fedora-43-x86_64:upstream (success)
🟢 rpm-build:fedora-44-x86_64:upstream (success)
🟢 rpm-build:fedora-rawhide-x86_64:upstream (success)
🟢 testing-farm:fedora-42-x86_64:upstream (success)
🟢 testing-farm:fedora-43-x86_64:upstream (success)
🟢 testing-farm:fedora-44-x86_64:centos-stream-10 (success)
🟢 testing-farm:fedora-44-x86_64:upstream (success)
🔴 testing-farm:fedora-rawhide-x86_64:upstream (failure)
🟢 Build / freebsd (success)
🟢 Build / make-distcheck (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot sssd-bot force-pushed the SSSD-sssd-backport-pr8706-to-sssd-2-13 branch from 141611a to 2ea7a7a Compare May 27, 2026 15:35
@alexey-tikhonov alexey-tikhonov merged commit 0ab98c7 into SSSD:sssd-2-13 May 27, 2026
3 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants