#3586 Give a more detailed debug and system-log message if krb5_init_context() failed
Closed: Fixed Opened by sbose.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1516266

If there are typos in /etc/krb5.conf (or one of the included config snippets) krb5_init_context(), the initial call always needed to do any other operation with libkrb5, fails because /etc/krb5.conf cannot be parsed.

Currently the related debug/syslog messages might be misleading, e.g. failed to read keytab. This is because SSSD does not use a global krb5 context but creates a fresh one for every new request or operation (to always use the latest settings from /etc/krb5.conf) and typically there is an error message indicating that the related operation failed but not giving more details.

Since krb5_init_context() is fundamental for Kerberos support SSSD should try to add as much details as libkrb5 provides in the logs if the call fails.


Metadata Update from @sbose:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1516266

https://github.com/SSSD/sssd/pull/459

Metadata Update from @sbose:
- Issue set to the milestone: None

Metadata Update from @sbose:
- Issue assigned to sbose

Metadata Update from @sbose:
- Custom field patch adjusted to on

master:

  • 2c10819750a8d920ab755eba1278e6e20e684e93

sssd-1-14:

  • dbe54141c36006809cc5fcf9ad729405c0a9292c

sssd-1-13:

  • 8e5bd0be20055cf54041caf81a0d82dbd91902d5

Metadata Update from @lslebodn:
- Issue close_status updated to: Fixed
- Issue set to the milestone: SSSD 1.16.1

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/4610

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata