krb5_cc_default_name()--Get Name of the Default Credentials Cache


  Syntax
 #include <krb5.h>

 char * krb5_cc_default_name(
     krb5_context     context);    
  Service Program Name: QSYS/QKRBGSS

  Default Public Authority: *USE

  Threadsafe: Conditional. See Usage Notes.

The krb5_cc_default_name() function returns the name of the default credentials cache for the current user. If the KRB5CCNAME environment variable is set, this is the name of the default cache. Otherwise, the name is obtained from the file specified by the _EUV_SEC_KRB5CCNAME_FILE environment variable. If this environment variable is not set, the name is obtained from the krb5ccname in the HOME directory. If this file does not exist or if there is no default credentials cache name set in the file, a new credentials cache file is created.


Authorities

No authorities are required.


Parameters

context  (Input)
The Kerberos context.

Return Value

The name of the default credentials cache for the current user. This is a pointer to read-only storage and must not be freed by the application. If an error occurs, the function return value is NULL.


Error Messages

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.


Usage Notes

  1. The krb5_cc_default_name() routine uses static storage within the Kerberos context to hold the default name; therefore, this routine is not threadsafe unless a separate context is used for each thread.


API introduced: V5R1

[ Back to top | Security APIs | UNIX-Type APIs | APIs by category ]