Poster of Linux kernelThe best gift for a Linux geek
KRB5_SET_DEFAULT_REALM

KRB5_SET_DEFAULT_REALM

Section: C Library Functions (3)
Local index Up

BSD mandoc
HEIMDAL  

NAME

krb5_copy_host_realm krb5_free_host_realm krb5_get_default_realm krb5_get_default_realms krb5_get_host_realm krb5_set_default_realm - default and host realm read and manipulation routines  

LIBRARY

Kerberos 5 Library (libkrb5, -lkrb5)  

SYNOPSIS

In krb5.h Ft krb5_error_code Fo krb5_copy_host_realm Fa krb5_context context Fa const krb5_realm *from Fa krb5_realm **to Fc Ft krb5_error_code Fo krb5_free_host_realm Fa krb5_context context Fa krb5_realm *realmlist Fc Ft krb5_error_code Fo krb5_get_default_realm Fa krb5_context context Fa krb5_realm *realm Fc Ft krb5_error_code Fo krb5_get_default_realms Fa krb5_context context Fa krb5_realm **realm Fc Ft krb5_error_code Fo krb5_get_host_realm Fa krb5_context context Fa const char *host Fa krb5_realm **realms Fc Ft krb5_error_code Fo krb5_set_default_realm Fa krb5_context context Fa const char *realm Fc  

DESCRIPTION

Fn krb5_copy_host_realm copies the list of realms from Fa from to Fa to . Fa to should be freed by the caller using Fa krb5_free_host_realm .

Fn krb5_free_host_realm frees all memory allocated by Fa realmlist .

Fn krb5_get_default_realm returns the first default realm for this host. The realm returned should be freed with Fn free .

Fn krb5_get_default_realms returns a NULL terminated list of default realms for this context. Realms returned by Fn krb5_get_default_realms should be freed with Fn krb5_free_host_realm .

Fn krb5_get_host_realm returns a NULL terminated list of realms for Fa host by looking up the information in the [domain_realm] in krb5.conf or in DNS If the mapping in [domain_realm] results in the string dns_locate DNS is used to lookup the realm.

When using DNS to a resolve the domain for the host a.b.c, Fn krb5_get_host_realm looks for a TXT resource record named _kerberos.a.b.c and if not found, it strips off the first component and tries a again (_kerberos.b.c) until it reaches the root.

If there is no configuration or DNS information found, Fn krb5_get_host_realm assumes it can use the domain part of the Fa host to form a realm. Caller must free Fa realmlist with Fn krb5_free_host_realm .

Fn krb5_set_default_realm sets the default realm for the Fa context . If NULL is used as a Fa realm , the [libdefaults]default_realm stanza in krb5.conf is used. If there is no such stanza in the configuration file, the Fn krb5_get_host_realm function is used to form a default realm.  

SEE ALSO

free(3), krb5.conf5


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 22:22:58 GMT, April 16, 2011