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

krb5_copy_principal — Copy a principal structure

  Table of Contents



C Prototype

krb5_error_code krb5_copy_principal(
krb5_context context,
krb5_const_principal inprinc,
krb5_principal *outprinc );


context (input/output) 

The context structure.

inprinc (input) 

Principal name to be copied.

outprinc (output) 

Copy of input principal name.


This routine copies a principal structure, setting *outprinc to point to the newly allocated copy, which should be freed with krb5_free_principal.

Return Values

This routine returns the following KRB5 status code:


Successful completion.
ENOMEMInsufficient memory.