On (28/06/13 17:13), Lukas Slebodnik wrote:
On (28/06/13 17:12), Lukas Slebodnik wrote:
>ehlo,
>
>Sumit wrote me yesterday, that some krb5 functions in
>get_ccache_name_by_principal needn't be available in older version of libkrb5.
>
>We noticed that this function is very similar to another function
>get_ccache_for_princ and there was used conditional build.
>
>Refactoring patch is attached.
>
>LS
and now with patch :-)
LS
Previous patch generate wasteful message into syslog in RHEL6.
[sssd[krb5_child[7786]]]: Can't find client principal
usersssd02(a)IDM.LAB.ENG.BRQ.REDHAT.COM in cache collection
This message may be confusing for some users, because everything works fine.
Error message can be also seen with configuration options
krb5_ccachedir = /tmp
krb5_ccname_template = FILE:%d/krb5cc_%U_XXXXXX
# default in RHEL6
Attached patch only remove sending error message to syslog.
Diff between previous patch and attached patch
------
kerr = krb5_cc_cache_match(ctx, principal, &tmp_cc);
if (kerr != 0) {
- KRB5_DEBUG(SSSDBG_TRACE_INTERNAL, ctx, kerr);
+ const char *err_msg = sss_krb5_get_error_message(ctx, kerr);
+ DEBUG(SSSDBG_TRACE_INTERNAL,
+ ("krb5_cc_cache_match failed: [%d][%s]\n", kerr, err_msg));
+ sss_krb5_free_error_message(ctx, err_msg);
return NULL;
}
LS