krb5_parse_name()--Create Kerberos Principal from Text String


  Syntax
 #include <krb5.h>

 krb5_error_code krb5_parse_name(
     krb5_context       context,
     krb5_const char *      name,
     krb5_principal *     principal);  
  Service Program Name: QSYS/QKRBGSS

  Default Public Authority: *USE

  Threadsafe: Yes

The krb5_parse_name() routine converts a text string into a Kerberos principal. The string must be in the format name@realm. If the realm is not specified, the default realm is used. Each forward slash in the name starts a new name component unless it is escaped by preceding the forward slash with a backward slash. Forward slashes in the realm are not treated as component separators and are copied unchanged.

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.

name  (Input)
The string to be parsed. The string must be in the format name@realm.

principal  (Output)
The Kerberos principal. The krb5_free_principal() routine should be called to release the principal 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