HP Open Source Security for OpenVMS Volume 3: Kerberos > Chapter 6 KRB5 (Kerberos V5) Application Programming Interface

krb5_cc_get_principal — Retrieve the primary principal of the credentials cache

 » Table of Contents

 » Glossary

 » Index

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.