]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - lib/libgssapi/gss_export_sec_context.3
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / lib / libgssapi / gss_export_sec_context.3
1 .\" -*- nroff -*-
2 .\"
3 .\" Copyright (c) 2005 Doug Rabson
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
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.
14 .\"
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
25 .\" SUCH DAMAGE.
26 .\"
27 .\"     $FreeBSD$
28 .\"
29 .\" The following commands are required for all man pages.
30 .Dd January 26, 2010
31 .Dt GSS_EXPORT_SEC_CONTEXT 3 PRM
32 .Os
33 .Sh NAME
34 .Nm gss_export_sec_context
35 .Nd Transfer a security context to another process
36 .\" This next command is for sections 2 and 3 only.
37 .\" .Sh LIBRARY
38 .Sh SYNOPSIS
39 .In "gssapi/gssapi.h"
40 .Ft OM_uint32
41 .Fo gss_export_sec_context
42 .Fa "OM_uint32 *minor_status"
43 .Fa "gss_ctx_id_t *context_handle"
44 .Fa "gss_buffer_t interprocess_token"
45 .Fc
46 .Sh DESCRIPTION
47 Provided to support the sharing of work between multiple processes.
48 This routine will typically be used by the context-acceptor,
49 in an application where a single process receives incoming connection
50 requests and accepts security contexts over them,
51 then passes the established context to one or more other processes for
52 message exchange.
53 .Fn gss_export_sec_context
54 deactivates the security context for the calling process and creates
55 an interprocess token which,
56 when passed to
57 .Fn gss_import_sec_context
58 in another process,
59 will re-activate the context in the second process.
60 Only a single instantiation of a given context may be active at any
61 one time;
62 a subsequent attempt by a context exporter to access the exported security context will fail.
63 .Pp
64 The implementation may constrain the set of processes by which the
65 interprocess token may be imported,
66 either as a function of local security policy,
67 or as a result of implementation decisions.
68 For example,
69 some implementations may constrain contexts to be passed only between
70 processes that run under the same account,
71 or which are part of the same process group.
72 .Pp
73 The interprocess token may contain security-sensitive information
74 (for example cryptographic keys).
75 While mechanisms are encouraged to either avoid placing such sensitive
76 information within interprocess tokens,
77 or to encrypt the token before returning it to the application,
78 in a typical object-library GSS-API implementation this may not be
79 possible.
80 Thus the application must take care to protect the interprocess token,
81 and ensure that any process to which the token is transferred is
82 trustworthy.
83 .Pp
84 If creation of the interprocess token is successful,
85 the implementation shall deallocate all process-wide resources
86 associated with the security context,
87 and set the context_handle to
88 .Dv GSS_C_NO_CONTEXT .
89 In the event of an error that makes it impossible to complete the
90 export of the security context,
91 the implementation must not return an interprocess token,
92 and should strive to leave the security context referenced by the
93 .Fa context_handle
94 parameter untouched.
95 If this is impossible,
96 it is permissible for the implementation to delete the security
97 context,
98 providing it also sets the
99 .Fa context_handle
100 parameter to
101 .Dv GSS_C_NO_CONTEXT .
102 .Sh PARAMETERS
103 .Bl -tag
104 .It minor_status
105 Mechanism specific status code.
106 .It context_handle
107 Context handle identifying the context to transfer.
108 .It interprocess_token
109 Token to be transferred to target process.
110 Storage associated with this token must be freed by the application
111 after use with a call to
112 .Fn gss_release_buffer .
113 .El
114 .Sh RETURN VALUES
115 .Bl -tag
116 .It GSS_S_COMPLETE
117 Successful completion
118 .It GSS_S_CONTEXT_EXPIRED
119 The context has expired
120 .It GSS_S_NO_CONTEXT
121 The context was invalid
122 .It GSS_S_UNAVAILABLE
123 The operation is not supported
124 .El
125 .Sh SEE ALSO
126 .Xr gss_import_sec_context 3 ,
127 .Xr gss_release_buffer 3
128 .Sh STANDARDS
129 .Bl -tag
130 .It RFC 2743
131 Generic Security Service Application Program Interface Version 2, Update 1
132 .It RFC 2744
133 Generic Security Service API Version 2 : C-bindings
134 .El
135 .Sh HISTORY
136 The
137 .Nm
138 function first appeared in
139 .Fx 7.0 .
140 .Sh AUTHORS
141 John Wray, Iris Associates
142 .Sh COPYRIGHT
143 Copyright (C) The Internet Society (2000).  All Rights Reserved.
144 .Pp
145 This document and translations of it may be copied and furnished to
146 others, and derivative works that comment on or otherwise explain it
147 or assist in its implementation may be prepared, copied, published
148 and distributed, in whole or in part, without restriction of any
149 kind, provided that the above copyright notice and this paragraph are
150 included on all such copies and derivative works.  However, this
151 document itself may not be modified in any way, such as by removing
152 the copyright notice or references to the Internet Society or other
153 Internet organizations, except as needed for the purpose of
154 developing Internet standards in which case the procedures for
155 copyrights defined in the Internet Standards process must be
156 followed, or as required to translate it into languages other than
157 English.
158 .Pp
159 The limited permissions granted above are perpetual and will not be
160 revoked by the Internet Society or its successors or assigns.
161 .Pp
162 This document and the information contained herein is provided on an
163 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
164 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
165 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
166 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
167 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.