RT RT/krbdev.mit.edu: Ticket #2657 krb5_init_context() calls into the CCAPI via krb5_cc_set_default_name() Signed in as guest.
[Logout]

[Home] [Search] [Configuration]

[Display] [History] [Basics] [Dates] [People] [Links] [Jumbo]

 
 

 The Basics  
Id
2657
Status
resolved
Worked
0 min
Priority
0/0
Queue
krb5
 

 Keyword Selections  
Component
  • krb5-libs
Tags
Version_reported
  • 1.3.5
Version_Fixed
  • 1.4
Target_Version
  • 1.4
 

 Relationships  
Depends on:
Depended on by:
Parents:
Children:

Refers to:
Referred to by:
 
 Dates  
Created: Fri Aug 6 16:46:49 2004
Starts: Not set
Started: Not set
Last Contact: Not set
Due: Not set
Updated: Mon Nov 15 22:22:17 2004 by tlyu
 

 People  
Owner
 lxs
Requestors
 lxs@mit.edu
Cc
 
AdminCc
 
 

 More about Alexandra Ellwood  
Comments about this user:
No comment entered about this user
This user's 25 highest priority tickets:
 

History   Display mode: [Brief headers] [Full headers]
      Fri Aug  6 16:46:51 2004  lxs - Ticket created    
     
Subject: krb5_init_context() calls into the CCAPI via krb5_cc_set_default_name()

Currently krb5_init_context() calls into CCAPI when it resets the ccache name in the
context.
It does this by calling krb5_cc_set_default_name(context, NULL).

krb5_cc_set_default_name(context, NULL) sets the ccache name in the context to its
"default"
value by calling get_from_os().  On CCAPI platforms it calls
cc_context_get_default_ccache_name().

The problem is that cc_context_get_default_ccache_name() produces an IPC call.  This
means
that you pay for the overhead of an IPC call just for initializing a context.  It
also means that
the CCAPI server needs to be present to answer the request, even though the context
may
never use the ccache.

I would like to change the behavior so that it lazily looks up the default ccache.
Basically
when you call krb5_cc_set_default_name(context, NULL), it will just set the ccache
name in
the context to the NULL string and free the old one.  When you call
krb5_cc_default_name(context), it will look at the environment variable and then call
get_from_os().  Basically I just want to defer the actual work to when the library
needs to look
up the ccache name.

Although this changes when the default ccache is looked up, I can't think of any
practical
problems with it based on how callers use krb5_contexts


Download (untitled) 1.2k
      Thu Aug 12 14:57:33 2004  lxs - Status changed from open to resolved    
      Thu Aug 12 14:57:34 2004  lxs - Correspondence added    
     
From: lxs@mit.edu
Subject: CVS Commit

ccdefname.c (krb5_cc_set_default_name, krb5_cc_default_name): Look up the default
ccache name in krb5_cc_default_name, not krb5_cc_set_default_name so that
krb5_init_context doesn't have to do work it might never use.


To generate a diff of this commit:



	cvs diff -r5.45 -r5.46 krb5/src/lib/krb5/os/ccdefname.c


Download (untitled) 315b
      Thu Aug 12 14:57:40 2004  lxs - Correspondence added    
     
From: lxs@mit.edu
Subject: CVS Commit

ccdefname.c (krb5_cc_set_default_name, krb5_cc_default_name): Look up the default
ccache name in krb5_cc_default_name, not krb5_cc_set_default_name so that
krb5_init_context doesn't have to do work it might never use.


To generate a diff of this commit:



	cvs diff -r5.395 -r5.396 krb5/src/lib/krb5/os/ChangeLog


Download (untitled) 315b
      Mon Nov 15 22:22:17 2004  tlyu - Version_Fixed 1.4 added