Skip to content

krb5: make sure keytab is a FILE before checking for access#8556

Merged
alexey-tikhonov merged 1 commit into
SSSD:masterfrom
257:improve-reporting-when-running-as-sssd2
Apr 13, 2026
Merged

krb5: make sure keytab is a FILE before checking for access#8556
alexey-tikhonov merged 1 commit into
SSSD:masterfrom
257:improve-reporting-when-running-as-sssd2

Conversation

@257

@257 257 commented Mar 27, 2026

Copy link
Copy Markdown

KCM: and API: are other cases besides MEMORY:

Resolves: #8555
Signed-off-by: Paymon MARANDI [email protected]

Copilot AI review requested due to automatic review settings March 27, 2026 15:48

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

Copy link
Copy Markdown

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 modifies the copy_keytab_into_memory function in src/providers/krb5/krb5_keytab.c to ensure that the file accessibility check using faccessat is only performed when the keytab name is explicitly prefixed with "FILE:". This change prevents potential errors when dealing with non-file-based keytabs. I have no feedback to provide as there were no review comments to evaluate.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates Kerberos keytab handling in SSSD to avoid incorrectly applying filesystem readability checks to non-file keytab backends (e.g., KCM: / API:), addressing the regression described in #8555.

Changes:

  • Restrict the faccessat() readability check to only FILE: keytabs in copy_keytab_into_memory().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/providers/krb5/krb5_keytab.c Outdated
@257
257 force-pushed the improve-reporting-when-running-as-sssd2 branch from 477139e to e895edb Compare March 27, 2026 15:53
Comment thread src/providers/krb5/krb5_keytab.c Outdated
@alexey-tikhonov alexey-tikhonov added the no-backport This should go to target branch only. label Mar 27, 2026
@257
257 force-pushed the improve-reporting-when-running-as-sssd2 branch from e895edb to d50b0d2 Compare March 27, 2026 16:03
Comment thread src/providers/krb5/krb5_keytab.c
KCM: and API: are other cases besides MEMORY:

Resolves: SSSD#8555
Signed-off-by: Paymon MARANDI <[email protected]>
Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Pavel Březina <[email protected]>
@sssd-bot

Copy link
Copy Markdown
Contributor

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


🟢 CodeQL (success)
🟢 osh-diff-scan:fedora-rawhide-x86_64:upstream (success)
🟢 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)
🟢 Analyze (target) / cppcheck (success)
🟢 Build / freebsd (success)
🟢 Build / make-distcheck (success)
🟢 ci / intgcheck (centos-10) (success)
🟢 ci / intgcheck (fedora-42) (success)
🟢 ci / intgcheck (fedora-43) (success)
🟢 ci / intgcheck (fedora-44) (success)
🟢 ci / intgcheck (fedora-45) (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-10) (success)
🟢 ci / system (fedora-42) (success)
🟢 ci / system (fedora-43) (success)
🟢 ci / system (fedora-44) (success)
🟢 ci / system (fedora-45) (success)
➖ Coverity scan / coverity (skipped)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (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 improve-reporting-when-running-as-sssd2 branch from d50b0d2 to 94698ee Compare April 13, 2026 10:14
@alexey-tikhonov
alexey-tikhonov merged commit 95d8476 into SSSD:master Apr 13, 2026
8 checks passed
@257

257 commented Apr 13, 2026

Copy link
Copy Markdown
Author

thanks and sorry about the Cc:'s

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.

KRB5:do_keytab_copy(): don't faccessat() for types other than 'FILE:'

5 participants