3 .\" Copyright (c) 2005 Doug Rabson
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" 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.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" The following commands are required for all man pages.
31 .Dt GSS_DISPLAY_STATUS 3 PRM
34 .Nm gss_display_status
35 .Nd Convert a GSS-API status code to text
36 .\" This next command is for sections 2 and 3 only.
41 .Fo gss_display_status
42 .Fa "OM_uint32 *minor_status"
43 .Fa "OM_uint32 status_value"
45 .Fa "const gss_OID mech_type"
46 .Fa "OM_uint32 *message_context"
47 .Fa "gss_buffer_t status_string"
50 Allows an application to obtain a textual representation of a GSS-API
52 for display to the user or for logging purposes.
53 Since some status values may indicate multiple conditions,
54 applications may need to call
55 .Fn gss_display_status
57 each call generating a single text string.
61 .Fn gss_display_status
62 to store state information about which error messages have already
63 been extracted from a given
66 must be initialized to zero by the application prior to the first call,
68 .Fn gss_display_status
69 will return a non-zero value in this parameter if there are further
74 parameter contains all state information required by
75 .Fn gss_display_status
76 in order to extract further messages from the
78 even when a non-zero value is returned in this parameter,
79 the application is not required to call
80 .Fn gss_display_status
81 again unless subsequent messages are desired.
82 The following code extracts all messages from a given status code and prints them to stderr:
84 OM_uint32 message_context;
85 OM_uint32 status_code;
88 gss_buffer_desc status_string;
96 maj_status = gss_display_status (
106 (int)status_string.length,
107 (char *)status_string.value);
109 gss_release_buffer(&min_status, &status_string);
111 } while (message_context != 0);
114 .Bl -tag -width ".It minor_status"
116 Mechanism specific status code.
118 Status value to be converted
120 .Bl -tag -width ".It GSS_C_MECH_CODE"
126 is a mechanism status code
129 Underlying mechanism (used to interpret a minor status value).
132 to obtain the system default.
134 Should be initialized to zero by the application prior to the first
137 .Fn gss_display_status ,
138 a non-zero status_value parameter indicates that additional messages
139 may be extracted from the status code via subsequent calls to
140 .Fn gss_display_status ,
149 Textual interpretation of the
151 Storage associated with this parameter must be freed by the
152 application after use with a call to
153 .Fn gss_release_buffer .
156 .Bl -tag -width ".It GSS_S_BAD_STATUS"
158 Successful completion
160 Indicates that translation in accordance with an unsupported mechanism
163 The status value was not recognized, or the status type was neither
166 .Dv GSS_C_MECH_CODE .
169 .Xr gss_release_buffer 3
171 .Bl -tag -width ".It RFC 2743"
173 Generic Security Service Application Program Interface Version 2, Update 1
175 Generic Security Service API Version 2 : C-bindings
180 function first appeared in
183 John Wray, Iris Associates
185 Copyright (C) The Internet Society (2000). All Rights Reserved.
187 This document and translations of it may be copied and furnished to
188 others, and derivative works that comment on or otherwise explain it
189 or assist in its implementation may be prepared, copied, published
190 and distributed, in whole or in part, without restriction of any
191 kind, provided that the above copyright notice and this paragraph are
192 included on all such copies and derivative works. However, this
193 document itself may not be modified in any way, such as by removing
194 the copyright notice or references to the Internet Society or other
195 Internet organizations, except as needed for the purpose of
196 developing Internet standards in which case the procedures for
197 copyrights defined in the Internet Standards process must be
198 followed, or as required to translate it into languages other than
201 The limited permissions granted above are perpetual and will not be
202 revoked by the Internet Society or its successors or assigns.
204 This document and the information contained herein is provided on an
205 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
206 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
207 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
208 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
209 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.