krb5_unparse_name()--Convert a Kerberos Principal to Text String


  Syntax
 #include <krb5.h>

 krb5_error_code krb5_unparse_name(
     krb5_context       context,
     krb5_const_principal   principal,  
     char **        name);
  Service Program Name: QSYS/QKRBGSS

  Default Public Authority: *USE

  Threadsafe: Yes

The krb5_unparse_name() function creates a text string from a Kerberos principal. The string is in the format name@realm, with the name components separated by forward slashes. If a forward slash occurs within a name component, it is escaped in the generated string by preceding the forward slash with a backward slash.

Not every coded character set identifier (CCSID) contains the '@' character; however, alternative CCSID values often are available. For example, instead of using Greece 423, run the job with a default CCSID of 875.


Authorities

No authorities are required.


Parameters

context  (Input)
The Kerberos context.

principal  (Input)
The principal to be converted.

name  (Output)
The text string for the principal in the format name@realm. The krb5_free_string() routine should be called to release the returned string when it is no longer needed.

Return Value

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


Error Messages

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.


API introduced: V5R1
Top | Security APIs
UNIX-Type APIs | APIs by category