[Heimdal-source-changes] [heimdal/heimdal] c9f65f: env KRB5CCNAME=/tmp/foocc kinit ignores the env

GitHub noreply at github.com
Fre Mars 14 04:34:57 CET 2014


  Branch: refs/heads/master
  Home:   https://github.com/heimdal/heimdal
  Commit: c9f65fc9422e3dbbcda6cfa4db78c321f7a3c4e9
      https://github.com/heimdal/heimdal/commit/c9f65fc9422e3dbbcda6cfa4db78c321f7a3c4e9
  Author: Nicolas Williams <nico at cryptonector.com>
  Date:   2014-03-13 (Thu, 13 Mar 2014)

  Changed paths:
    M lib/krb5/fcache.c

  Log Message:
  -----------
  env KRB5CCNAME=/tmp/foocc kinit ignores the env

The problem is that fcc_get_cache_next() is called in a context where
context->default_cc_name is not set.  We should call
krb5_cc_default_name(), and that fixes the problem.  There's a comment
warning that this can result in reentering krb5_cc_cache_match(), but
nothing in libkrb5 calls krb5_cc_cache_match(), so the comment is wrong,
at least in the github tree.

An alternative would be to call krb5_cc_set_default_name(NULL) in
kuser/kinit.c before calling krb5_cc_cache_match(), however, that seems
like an insufficiently general solution.  Also, the semantics of
krb5_cc_cache_match() would differ from MIT's -- it seems better to
match MIT's semantics.




More information about the Heimdal-source-changes mailing list