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

krb5_get_host_realm — Get the Kerberos realm names for a host

 » Table of Contents

 » Glossary

 » Index

C Prototype

krb5_error_code krb5_get_host_realm(
krb5_context context,
const char *host,
char ***realmlist );

Arguments

context (input) 

The context structure.

host (input) 

The host name.

realmlist (output)  

A pointer to a list of realm names.

Description

This routine determines the Kerberos realm names for host, filling in realmlist with a pointer to an argv[ ] style list of names, terminated with a NULL pointer.

If host is NULL, the local host's realms are determined.

If there are no known realms for the host, the filled-in pointer is set to NULL.

The pointer array and strings pointed to are all in allocated storage, and should be freed by the caller when finished.

Return Values

This routine returns the following KRB5 status code:

0

Successful completion.

ENOMEM Insufficient memory.