Initial import from FreeBSD RELENG_4:
[games.git] / crypto / heimdal / lib / krb5 / krb5_init_context.3
1 .\" Copyright (c) 2001 Kungliga Tekniska Högskolan
2 .\" $Id: krb5_init_context.3,v 1.6 2002/09/02 12:42:00 joda Exp $
3 .Dd January 21, 2001
4 .Dt KRB5_CONTEXT 3
5 .Os HEIMDAL
6 .Sh NAME
7 .Nm krb5_init_context ,
8 .Nm krb5_free_context
9 .Nd create and delete krb5_context structures
10 .Sh LIBRARY
11 Kerberos 5 Library (libkrb5, -lkrb5)
12 .Sh SYNOPSIS
13 .Fd #include <krb5.h>
14 .Ft krb5_error_code
15 .Fn krb5_init_context "krb5_context *context"
16 .Ft void
17 .Fn krb5_free_context "krb5_context context"
18 .Sh DESCRIPTION
19 The
20 .Fn krb5_init_context
21 function initializes the
22 .Fa context
23 structure and reads the configuration file
24 .Pa /etc/krb5.conf .
25 .Pp
26 The structure should be freed by calling
27 .Fn krb5_free_context
28 when it is no longer being used.
29 .Sh RETURN VALUES
30 .Fn krb5_init_context
31 returns 0 to indicate success.
32 Otherwise an errno code is returned.
33 Failure means either that something bad happened during initialization
34 (typically
35 .Bq ENOMEM )
36 or that Kerberos should not be used
37 .Bq ENXIO .
38 .Sh SEE ALSO
39 .Xr errno 2 ,
40 .Xr krb5_context 3 ,
41 .Xr kerberos 8