1 .\" Copyright (c) 2004 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden).
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the Institute nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 .Nm krb5_free_error_contents ,
41 .Nm krb5_error_from_rd_error
42 .Nd parse, free and read error from KRB-ERROR message
44 Kerberos 5 Library (libkrb5, -lkrb5)
49 .Fa "krb5_context context"
50 .Fa "const krb5_data *msg"
51 .Fa "KRB_ERROR *result"
55 .Fa "krb5_context context"
56 .Fa "krb5_error *error"
59 .Fo krb5_free_error_contents
60 .Fa "krb5_context context"
61 .Fa "krb5_error *error"
64 .Fo krb5_error_from_rd_error
65 .Fa "krb5_context context"
66 .Fa "const krb5_error *error"
67 .Fa "const krb5_creds *creds"
70 Usually applications never needs to parse and understand Kerberos
71 error messages since higher level functions will parse and push up the
72 error in the krb5_context.
73 These functions are described for completeness.
76 parses and returns the kerboeros error message, the structure should be freed with
77 .Fn krb5_free_error_contents
78 when the caller is done with the structure.
81 frees the content and the memory region holding the structure iself.
83 .Fn krb5_free_error_contents
84 free the content of the KRB-ERROR message.
86 .Fn krb5_error_from_rd_error
87 will parse the error message and set the error buffer in krb5_context
88 to the error string passed back or the matching error code in the
90 Caller should pick up the message with
91 .Fn krb5_get_error_string 3
92 (don't forget to free the returned string with
93 .Fn krb5_free_error_string ) .
96 .Xr krb5_set_error_string 3 ,
97 .Xr krb5_get_error_string 3 ,