#include <krb5.h> krb5_error_code krb5_sname_to_principal( krb5_context context, krb5_const char * hostname, krb5_const char * sname, krb5_int32 type, krb5_principal * ret_princ);Service Program Name: QSYS/QKRBGSS
The krb5_sname_to_principal() function converts a service name and a host name to a Kerberos principal. The principal name is in the format sname/hostname@realm. The realm name that corresponds to the host name is obtained by calling the krb5_get_host_realm() routine.
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.
No authorities are required.
KRB5_NT_SRV_HST (x'00000003') | A DNS host name has been provided. The Kerberos runtime looks up the address assigned to the host name and then does a reverse search to get the primary host name for that address. The resulting host name then is converted to lowercase. |
KRB5_NT_UNKNOWN (x'00000000') | The host name type is unknown. No translation is performed on the specified host name and it is used as is. |
If no errors occur, the return value is 0. Otherwise, a Kerberos error code is returned.
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
[ Back to top | Security APIs | UNIX-Type APIs | APIs by category ]