next up previous contents index
Next: Disk based functions Up: Operating-system specific functions Previous: Operating specific context   Contents   Index

Configuration based functions

These functions allow access to configuration specific information. In some cases, the configuration may be overriden by program control.


\begin{funcdecl}{krb5_set_config_files}{krb5_error_code}{\funcinout}
\funcarg{krb5_context}{context}
\funcin
\funcarg{const char **}{filenames}
\end{funcdecl}

Sets the list of configuration files to be examined in determining machine defaults. filenames is an array of files to check in order. The array must have a NULL entry as the last element.

Returns system errors.


\begin{funcdecl}{krb5_get_krbhst}{krb5_error_code}{\funcin}
\funcarg{krb5_contex...
...g{const krb5_data *}{realm}
\funcout
\funcarg{char ***}{hostlist}
\end{funcdecl}

Figures out the Kerberos server names for the given realm, filling in hostlist with a null terminated array of pointers to hostnames.

If realm is unknown, 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.

Returns system errors.


\begin{funcdecl}{krb5_free_krbhst}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcarg{char * const *}{hostlist}
\end{funcdecl}

Frees the storage taken by a host list returned by krb5_get_krbhst.


\begin{funcdecl}{krb5_get_default_realm}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcout
\funcarg{char **}{lrealm}
\end{funcdecl}

Retrieves the default realm to be used if no user-specified realm is available (e.g. to interpret a user-typed principal name with the realm omitted for convenience), filling in lrealm with a pointer to the default realm in allocated storage.

It is the caller's responsibility for freeing the allocated storage pointed to be lream when it is finished with it.

Returns system errors.


\begin{funcdecl}{krb5_set_default_realm}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcarg{char *}{realm}
\end{funcdecl}

Sets the default realm to be used if no user-specified realm is available (e.g. to interpret a user-typed principal name with the realm omitted for convenience). (c.f. krb5_get_default_realm)

If realm is NULL, then the operating system default value will used.

Returns system errors.


\begin{funcdecl}{krb5_get_host_realm}{krb5_error_code}{\funcin}
\funcarg{krb5_co...
...uncarg{const char *}{host}
\funcout
\funcarg{char ***}{realmlist}
\end{funcdecl}

Figures out 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.

Returns system errors.


\begin{funcdecl}{krb5_free_host_realm}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcarg{char * const *}{realmlist}
\end{funcdecl}

Frees the storage taken by a realmlist returned by krb5_get_local_realm.


\begin{funcdecl}{krb5_get_realm_domain}{krb5_error_code}{\funcinout}
\funcarg{kr...
...
\funcarg{const char *}{realm}
\funcout
\funcarg{char **}{domain}
\end{funcdecl}

Determines the proper name of a realm. This is mainly so that a krb4 principal can be converted properly into a krb5 one. If realm is null, the function will assume the default realm of the host. The returned *domain is allocated and must be freed by the caller.


next up previous contents index
Next: Disk based functions Up: Operating-system specific functions Previous: Operating specific context   Contents   Index
Autobuild 2006-06-16