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_os_localaddr  Return all protocol addresses of this host krb5_os_localaddr Return all protocol addresses of this host
go to next page: krb5_principal_compare  Compare two principalskrb5_principal_compare Compare two principals
end of book navigation links

krb5_parse_name -- Convert string principal name to protocol format 



C Prototype 

krb5_error_code krb5_parse_name(
         krb5_context           context,
         const char             *name,
         krb5_principal         *principal );

Arguments 

context
(input/output)
 The context structure.
name (input) Single string representation of a Kerberos principal name.
principal (output) Multipart principal format used in the protocols.

Description 

This routine converts a single-string representation name of the principal name to the multi-part principal format used in the protocols.

A single-string representation of a Kerberos name consists of one or more principal name components, separated by slashes, optionally followed by the @ character and a realm name. If the realm name is not specified, the local realm is used.

The slash and @ characters can be quoted (included as part of a component rather than as a component separator or realm prefix) by preceding them with a backslash (\) character. Similarly, newline, tab, backspace, and NULL characters can be included in a component by using \n, \t,\b or \0, respectively.

The realm in a Kerberos name cannot contain the slash, colon, or NULL characters.

The *principal argument points to allocated storage that should be freed by the caller (using krb5_free_principal) after use.

Return Values 

This routine returns one of the following KRB5 status codes:

0
Successful completion.
ENOMEM
Insufficient memory.


go to previous page: krb5_os_localaddr  Return all protocol addresses of this host krb5_os_localaddr Return all protocol addresses of this host
go to next page: krb5_principal_compare  Compare two principalskrb5_principal_compare Compare two principals