Skip to content

IPA: set sudo search base on sdom to avoid spurious ldap_sudo_search_… - #9191

Closed
madhuriupadhye wants to merge 1 commit into
SSSD:masterfrom
madhuriupadhye:ipa_sudo_fix_master
Closed

IPA: set sudo search base on sdom to avoid spurious ldap_sudo_search_…#9191
madhuriupadhye wants to merge 1 commit into
SSSD:masterfrom
madhuriupadhye:ipa_sudo_fix_master

Conversation

@madhuriupadhye

Copy link
Copy Markdown
Contributor

…base warning

With the IPA sudo provider, SSSD logs a false warning that ldap_sudo_search_base is not set and the whole tree will be searched — even though IPA has already scoped sudo to cn=sudo,$basedn. Sudo works correctly; the message is wrong.

IPA parses the sudo base only into sudo_ctx->sudo_sb and leaves sdom->sudo_search_bases NULL. sdap_set_config_options_with_rootdse() then enters its if (!sdom->sudo_search_bases) block and emits the warning. (#9031 tried to guard this via an option check that doesn't hold on this path.)

In ipa_sudo_init_ipa_schema(), also record the base on sdom->sudo_search_bases. It runs before any rootDSE callback, so the block is skipped and the warning never fires. IPA lookups are unchanged (they use sudo_ctx->sudo_sb); the LDAP path is untouched.

Resolves: #9030

Assisted-By: Claude Code (Opus 4.8)

…base warning

With the IPA sudo provider, SSSD logs a false warning that `ldap_sudo_search_base`
is not set and the whole tree will be searched — even though IPA has already
scoped sudo to `cn=sudo,$basedn`. Sudo works correctly; the message is wrong.

IPA parses the sudo base only into `sudo_ctx->sudo_sb` and leaves
`sdom->sudo_search_bases` NULL. `sdap_set_config_options_with_rootdse()` then
enters its `if (!sdom->sudo_search_bases)` block and emits the warning. (SSSD#9031
tried to guard this via an option check that doesn't hold on this path.)

In `ipa_sudo_init_ipa_schema()`, also record the base on
`sdom->sudo_search_bases`. It runs before any rootDSE callback, so the block is
skipped and the warning never fires. IPA lookups are unchanged (they use
`sudo_ctx->sudo_sb`); the LDAP path is untouched.

Resolves: SSSD#9030

Assisted-By: Claude Code (Opus 4.8)

Signed-off-by: Madhuri Upadhye <Madhuri Upadhye>
@madhuriupadhye
madhuriupadhye marked this pull request as draft September 1, 2026 13:33
@alexey-tikhonov

Copy link
Copy Markdown
Member

@madhuriupadhye, @sumit-bose, I think this approach obsoletes patch merged in #9031 and (assuming this approach is correct) it would be better to revert #9031 (in branches it was merged to)?

@alexey-tikhonov

Copy link
Copy Markdown
Member

I'm setting 'Blocked' label to avoid merging accidentally, before we figure out what to do with previous patch and have functioning CI. Otherwise we won't get out of this mess.

@alexey-tikhonov

Copy link
Copy Markdown
Member

#9031 tried to guard this via an option check that doesn't hold on this path

this is probably wrong statement

@alexey-tikhonov

Copy link
Copy Markdown
Member

@madhuriupadhye, please re-open if you think this PR is still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possibly spurious warning about ldap_sudo_search_base

2 participants