[SSSD] [PATCH] Use conditional build for retrieving ccache.

Jakub Hrozek jhrozek at redhat.com
Mon Jul 15 14:36:27 UTC 2013


On Tue, Jul 09, 2013 at 08:29:42PM +0200, Lukas Slebodnik wrote:
> 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 at 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

Ack, there is just one whitespace bug I will fix before pushing:

> +    kerr = krb5_cc_get_full_name(ctx, tmp_cc, &tmp_ccname);
> +    if (kerr !=0) {
                 ^^
            missing space.

> +        KRB5_DEBUG(SSSDBG_MINOR_FAILURE, ctx, kerr);
> +        goto done;
> +    }

Otherwise looks good and seems to be working fine.




More information about the sssd-devel mailing list