krb5_cc_retrieve_cred()--Retrieve a Set of Credentials


  Syntax
 #include <krb5.h>

 krb5_error_code krb5_cc_retrieve_cred(  
     krb5_context     context,  
     krb5_ccache      ccache,
     krb5_flags       flags,
     krb5_creds *     mcreds,
     krb5_creds *     creds); 
  Service Program Name: QSYS/QKRBGSS

  Default Public Authority: *USE

  Threadsafe: Yes

The krb5_cc_retrieve_cred() function searches the credentials cache and returns an entry that matches the credentials specified. The client principal must always match. The KRB5_TC_MATCH_SRV_NAMEONLY flag controls how much of the server principal must match.


Authorities



Parameters

context  (Input)
The Kerberos context.

ccache  (Input)
The credentials cache handle.

flags  (Input)
The search flags that are used to determine whether a particular cache entry should be returned to the caller. The following symbolic definitions are provided for the various flags and should be ORed together to set the desired search flags:



mcreds  (Input)
The match credentials. Fields from these credentials are matched with fields in the cache entries based on the search flags. The client and server principals must always be set in the match credentials, no matter what search flags are specified.

creds  (Output)
The contents of the matched cache entry. The krb5_free_cred_contents() routine should be called to release the credentials contents when they are no longer needed.

Return Value

If no errors occur, the return value is 0. Otherwise, a Kerberos error code is returned.


Error Messages




API introduced: V5R1

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