skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 3:... HP Open Source Security for OpenVMS Volume 3:...
go to beginning of chapter: KRB5 (Kerberos V5) Application Programming Interface KRB5 (Kerberos V5) Application Programming Interface
go to previous page: krb5_cc_get_name  Return the name of the credentials cache krb5_cc_get_name Return the name of the credentials cache
go to next page: krb5_cc_get_type  Return the CC prefixkrb5_cc_get_type Return the CC prefix
end of book navigation links

krb5_cc_get_principal -- Retrieve the primary principal of the credentials cache 



C Prototype 

krb5_error_code krb5_cc_get_principal(
         krb5_context     context,
         krb5_ccache      id,
         krb5_principal   *principal );

Arguments 

context
(input/output)
 The context structure.
id (input)  A credentials cache identifier.
principal (output) The returned primary principal.

Description 

This routine retrieves the primary principal of the credentials cache (as set by krb5_cc_initialize request). The primary principal is set to *principal; the caller should release this memory by calling krb5_free_principal on *principal when finished.

It requires that id identifies a valid credentials cache.

Return Values 

This routine returns the following KRB5 status code:

Successful completion.



go to previous page: krb5_cc_get_name  Return the name of the credentials cache krb5_cc_get_name Return the name of the credentials cache
go to next page: krb5_cc_get_type  Return the CC prefixkrb5_cc_get_type Return the CC prefix