]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - crypto/heimdal/doc/doxyout/krb5/man/man3/krb5_keytab.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / crypto / heimdal / doc / doxyout / krb5 / man / man3 / krb5_keytab.3
1 .TH "Heimdal Kerberos 5 keytab handling functions" 3 "11 Jan 2012" "Version 1.5.2" "HeimdalKerberos5library" \" -*- nroff -*-
2 .ad l
3 .nh
4 .SH NAME
5 Heimdal Kerberos 5 keytab handling functions \- 
6 .SS "Functions"
7
8 .in +1c
9 .ti -1c
10 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_register\fP (krb5_context context, const krb5_kt_ops *ops)"
11 .br
12 .ti -1c
13 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_resolve\fP (krb5_context context, const char *name, krb5_keytab *id)"
14 .br
15 .ti -1c
16 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default_name\fP (krb5_context context, char *name, size_t namesize)"
17 .br
18 .ti -1c
19 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default_modify_name\fP (krb5_context context, char *name, size_t namesize)"
20 .br
21 .ti -1c
22 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default\fP (krb5_context context, krb5_keytab *id)"
23 .br
24 .ti -1c
25 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_read_service_key\fP (krb5_context context, krb5_pointer keyprocarg, krb5_principal principal, krb5_kvno vno, krb5_enctype enctype, krb5_keyblock **key)"
26 .br
27 .ti -1c
28 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_type\fP (krb5_context context, krb5_keytab keytab, char *prefix, size_t prefixsize)"
29 .br
30 .ti -1c
31 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_name\fP (krb5_context context, krb5_keytab keytab, char *name, size_t namesize)"
32 .br
33 .ti -1c
34 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_full_name\fP (krb5_context context, krb5_keytab keytab, char **str)"
35 .br
36 .ti -1c
37 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_close\fP (krb5_context context, krb5_keytab id)"
38 .br
39 .ti -1c
40 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_destroy\fP (krb5_context context, krb5_keytab id)"
41 .br
42 .ti -1c
43 .RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_kt_compare\fP (krb5_context context, krb5_keytab_entry *entry, krb5_const_principal principal, krb5_kvno vno, krb5_enctype enctype)"
44 .br
45 .ti -1c
46 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_entry\fP (krb5_context context, krb5_keytab id, krb5_const_principal principal, krb5_kvno kvno, krb5_enctype enctype, krb5_keytab_entry *entry)"
47 .br
48 .ti -1c
49 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_copy_entry_contents\fP (krb5_context context, const krb5_keytab_entry *in, krb5_keytab_entry *out)"
50 .br
51 .ti -1c
52 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_free_entry\fP (krb5_context context, krb5_keytab_entry *entry)"
53 .br
54 .ti -1c
55 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_start_seq_get\fP (krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)"
56 .br
57 .ti -1c
58 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_next_entry\fP (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, krb5_kt_cursor *cursor)"
59 .br
60 .ti -1c
61 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_end_seq_get\fP (krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)"
62 .br
63 .ti -1c
64 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_add_entry\fP (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry)"
65 .br
66 .ti -1c
67 .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_remove_entry\fP (krb5_context context, krb5_keytab id, krb5_keytab_entry *entry)"
68 .br
69 .ti -1c
70 .RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_kt_have_content\fP (krb5_context context, krb5_keytab id)"
71 .br
72 .in -1c
73 .SH "Detailed Description"
74 .PP 
75
76 .SH "Function Documentation"
77 .PP 
78 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_add_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry)"
79 .PP
80 Add the entry in `entry' to the keytab `id'.
81 .PP
82 \fBParameters:\fP
83 .RS 4
84 \fIcontext\fP a Keberos context. 
85 .br
86 \fIid\fP a keytab. 
87 .br
88 \fIentry\fP the entry to add
89 .RE
90 .PP
91 \fBReturns:\fP
92 .RS 4
93 Return an error code or 0, see krb5_get_error_message(). 
94 .RE
95 .PP
96
97 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_close (krb5_context context, krb5_keytab id)"
98 .PP
99 Finish using the keytab in `id'. All resources will be released, even on errors.
100 .PP
101 \fBParameters:\fP
102 .RS 4
103 \fIcontext\fP a Keberos context. 
104 .br
105 \fIid\fP keytab to close.
106 .RE
107 .PP
108 \fBReturns:\fP
109 .RS 4
110 Return an error code or 0, see krb5_get_error_message(). 
111 .RE
112 .PP
113
114 .SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kt_compare (krb5_context context, krb5_keytab_entry * entry, krb5_const_principal principal, krb5_kvno vno, krb5_enctype enctype)"
115 .PP
116 Compare `entry' against `principal, vno, enctype'. Any of `principal, vno, enctype' might be 0 which acts as a wildcard. Return TRUE if they compare the same, FALSE otherwise.
117 .PP
118 \fBParameters:\fP
119 .RS 4
120 \fIcontext\fP a Keberos context. 
121 .br
122 \fIentry\fP an entry to match with. 
123 .br
124 \fIprincipal\fP principal to match, NULL matches all principals. 
125 .br
126 \fIvno\fP key version to match, 0 matches all key version numbers. 
127 .br
128 \fIenctype\fP encryption type to match, 0 matches all encryption types.
129 .RE
130 .PP
131 \fBReturns:\fP
132 .RS 4
133 Return TRUE or match, FALSE if not matched. 
134 .RE
135 .PP
136
137 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_copy_entry_contents (krb5_context context, const krb5_keytab_entry * in, krb5_keytab_entry * out)"
138 .PP
139 Copy the contents of `in' into `out'.
140 .PP
141 \fBParameters:\fP
142 .RS 4
143 \fIcontext\fP a Keberos context. 
144 .br
145 \fIin\fP the keytab entry to copy. 
146 .br
147 \fIout\fP the copy of the keytab entry, free with \fBkrb5_kt_free_entry()\fP.
148 .RE
149 .PP
150 \fBReturns:\fP
151 .RS 4
152 Return an error code or 0, see krb5_get_error_message(). 
153 .RE
154 .PP
155
156 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default (krb5_context context, krb5_keytab * id)"
157 .PP
158 Set `id' to the default keytab.
159 .PP
160 \fBParameters:\fP
161 .RS 4
162 \fIcontext\fP a Keberos context. 
163 .br
164 \fIid\fP the new default keytab.
165 .RE
166 .PP
167 \fBReturns:\fP
168 .RS 4
169 Return an error code or 0, see krb5_get_error_message(). 
170 .RE
171 .PP
172
173 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_modify_name (krb5_context context, char * name, size_t namesize)"
174 .PP
175 Copy the name of the default modify keytab into `name'.
176 .PP
177 \fBParameters:\fP
178 .RS 4
179 \fIcontext\fP a Keberos context. 
180 .br
181 \fIname\fP buffer where the name will be written 
182 .br
183 \fInamesize\fP length of name
184 .RE
185 .PP
186 \fBReturns:\fP
187 .RS 4
188 Return an error code or 0, see krb5_get_error_message(). 
189 .RE
190 .PP
191
192 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_name (krb5_context context, char * name, size_t namesize)"
193 .PP
194 copy the name of the default keytab into `name'.
195 .PP
196 \fBParameters:\fP
197 .RS 4
198 \fIcontext\fP a Keberos context. 
199 .br
200 \fIname\fP buffer where the name will be written 
201 .br
202 \fInamesize\fP length of name
203 .RE
204 .PP
205 \fBReturns:\fP
206 .RS 4
207 Return an error code or 0, see krb5_get_error_message(). 
208 .RE
209 .PP
210
211 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_destroy (krb5_context context, krb5_keytab id)"
212 .PP
213 Destroy (remove) the keytab in `id'. All resources will be released, even on errors, does the equvalment of \fBkrb5_kt_close()\fP on the resources.
214 .PP
215 \fBParameters:\fP
216 .RS 4
217 \fIcontext\fP a Keberos context. 
218 .br
219 \fIid\fP keytab to destroy.
220 .RE
221 .PP
222 \fBReturns:\fP
223 .RS 4
224 Return an error code or 0, see krb5_get_error_message(). 
225 .RE
226 .PP
227
228 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_end_seq_get (krb5_context context, krb5_keytab id, krb5_kt_cursor * cursor)"
229 .PP
230 Release all resources associated with `cursor'.
231 .PP
232 \fBParameters:\fP
233 .RS 4
234 \fIcontext\fP a Keberos context. 
235 .br
236 \fIid\fP a keytab. 
237 .br
238 \fIcursor\fP the cursor to free.
239 .RE
240 .PP
241 \fBReturns:\fP
242 .RS 4
243 Return an error code or 0, see krb5_get_error_message(). 
244 .RE
245 .PP
246
247 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_free_entry (krb5_context context, krb5_keytab_entry * entry)"
248 .PP
249 Free the contents of `entry'.
250 .PP
251 \fBParameters:\fP
252 .RS 4
253 \fIcontext\fP a Keberos context. 
254 .br
255 \fIentry\fP the entry to free
256 .RE
257 .PP
258 \fBReturns:\fP
259 .RS 4
260 Return an error code or 0, see krb5_get_error_message(). 
261 .RE
262 .PP
263
264 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_entry (krb5_context context, krb5_keytab id, krb5_const_principal principal, krb5_kvno kvno, krb5_enctype enctype, krb5_keytab_entry * entry)"
265 .PP
266 Retrieve the keytab entry for `principal, kvno, enctype' into `entry' from the keytab `id'. Matching is done like \fBkrb5_kt_compare()\fP.
267 .PP
268 \fBParameters:\fP
269 .RS 4
270 \fIcontext\fP a Keberos context. 
271 .br
272 \fIid\fP a keytab. 
273 .br
274 \fIprincipal\fP principal to match, NULL matches all principals. 
275 .br
276 \fIkvno\fP key version to match, 0 matches all key version numbers. 
277 .br
278 \fIenctype\fP encryption type to match, 0 matches all encryption types. 
279 .br
280 \fIentry\fP the returned entry, free with \fBkrb5_kt_free_entry()\fP.
281 .RE
282 .PP
283 \fBReturns:\fP
284 .RS 4
285 Return an error code or 0, see krb5_get_error_message(). 
286 .RE
287 .PP
288
289 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_full_name (krb5_context context, krb5_keytab keytab, char ** str)"
290 .PP
291 Retrieve the full name of the keytab `keytab' and store the name in `str'.
292 .PP
293 \fBParameters:\fP
294 .RS 4
295 \fIcontext\fP a Keberos context. 
296 .br
297 \fIkeytab\fP keytab to get name for. 
298 .br
299 \fIstr\fP the name of the keytab name, usee krb5_xfree() to free the string. On error, *str is set to NULL.
300 .RE
301 .PP
302 \fBReturns:\fP
303 .RS 4
304 Return an error code or 0, see krb5_get_error_message(). 
305 .RE
306 .PP
307
308 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_name (krb5_context context, krb5_keytab keytab, char * name, size_t namesize)"
309 .PP
310 Retrieve the name of the keytab `keytab' into `name', `namesize'
311 .PP
312 \fBParameters:\fP
313 .RS 4
314 \fIcontext\fP a Keberos context. 
315 .br
316 \fIkeytab\fP the keytab to get the name for. 
317 .br
318 \fIname\fP name buffer. 
319 .br
320 \fInamesize\fP size of name buffer.
321 .RE
322 .PP
323 \fBReturns:\fP
324 .RS 4
325 Return an error code or 0, see krb5_get_error_message(). 
326 .RE
327 .PP
328
329 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_type (krb5_context context, krb5_keytab keytab, char * prefix, size_t prefixsize)"
330 .PP
331 Return the type of the `keytab' in the string `prefix of length `prefixsize'.
332 .PP
333 \fBParameters:\fP
334 .RS 4
335 \fIcontext\fP a Keberos context. 
336 .br
337 \fIkeytab\fP the keytab to get the prefix for 
338 .br
339 \fIprefix\fP prefix buffer 
340 .br
341 \fIprefixsize\fP length of prefix buffer
342 .RE
343 .PP
344 \fBReturns:\fP
345 .RS 4
346 Return an error code or 0, see krb5_get_error_message(). 
347 .RE
348 .PP
349
350 .SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kt_have_content (krb5_context context, krb5_keytab id)"
351 .PP
352 Return true if the keytab exists and have entries
353 .PP
354 \fBParameters:\fP
355 .RS 4
356 \fIcontext\fP a Keberos context. 
357 .br
358 \fIid\fP a keytab.
359 .RE
360 .PP
361 \fBReturns:\fP
362 .RS 4
363 Return an error code or 0, see krb5_get_error_message(). 
364 .RE
365 .PP
366
367 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_next_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry, krb5_kt_cursor * cursor)"
368 .PP
369 Get the next entry from keytab, advance the cursor. On last entry the function will return KRB5_KT_END.
370 .PP
371 \fBParameters:\fP
372 .RS 4
373 \fIcontext\fP a Keberos context. 
374 .br
375 \fIid\fP a keytab. 
376 .br
377 \fIentry\fP the returned entry, free with \fBkrb5_kt_free_entry()\fP. 
378 .br
379 \fIcursor\fP the cursor of the iteration.
380 .RE
381 .PP
382 \fBReturns:\fP
383 .RS 4
384 Return an error code or 0, see krb5_get_error_message(). 
385 .RE
386 .PP
387
388 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_read_service_key (krb5_context context, krb5_pointer keyprocarg, krb5_principal principal, krb5_kvno vno, krb5_enctype enctype, krb5_keyblock ** key)"
389 .PP
390 Read the key identified by `(principal, vno, enctype)' from the keytab in `keyprocarg' (the default if == NULL) into `*key'.
391 .PP
392 \fBParameters:\fP
393 .RS 4
394 \fIcontext\fP a Keberos context. 
395 .br
396 \fIkeyprocarg\fP 
397 .br
398 \fIprincipal\fP 
399 .br
400 \fIvno\fP 
401 .br
402 \fIenctype\fP 
403 .br
404 \fIkey\fP 
405 .RE
406 .PP
407 \fBReturns:\fP
408 .RS 4
409 Return an error code or 0, see krb5_get_error_message(). 
410 .RE
411 .PP
412
413 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_register (krb5_context context, const krb5_kt_ops * ops)"
414 .PP
415 Register a new keytab backend.
416 .PP
417 \fBParameters:\fP
418 .RS 4
419 \fIcontext\fP a Keberos context. 
420 .br
421 \fIops\fP a backend to register.
422 .RE
423 .PP
424 \fBReturns:\fP
425 .RS 4
426 Return an error code or 0, see krb5_get_error_message(). 
427 .RE
428 .PP
429
430 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_remove_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry)"
431 .PP
432 Remove an entry from the keytab, matching is done using \fBkrb5_kt_compare()\fP.
433 .PP
434 \fBParameters:\fP
435 .RS 4
436 \fIcontext\fP a Keberos context. 
437 .br
438 \fIid\fP a keytab. 
439 .br
440 \fIentry\fP the entry to remove
441 .RE
442 .PP
443 \fBReturns:\fP
444 .RS 4
445 Return an error code or 0, see krb5_get_error_message(). 
446 .RE
447 .PP
448
449 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_resolve (krb5_context context, const char * name, krb5_keytab * id)"
450 .PP
451 Resolve the keytab name (of the form `type:residual') in `name' into a keytab in `id'.
452 .PP
453 \fBParameters:\fP
454 .RS 4
455 \fIcontext\fP a Keberos context. 
456 .br
457 \fIname\fP name to resolve 
458 .br
459 \fIid\fP resulting keytab, free with \fBkrb5_kt_close()\fP.
460 .RE
461 .PP
462 \fBReturns:\fP
463 .RS 4
464 Return an error code or 0, see krb5_get_error_message(). 
465 .RE
466 .PP
467
468 .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_start_seq_get (krb5_context context, krb5_keytab id, krb5_kt_cursor * cursor)"
469 .PP
470 Set `cursor' to point at the beginning of `id'.
471 .PP
472 \fBParameters:\fP
473 .RS 4
474 \fIcontext\fP a Keberos context. 
475 .br
476 \fIid\fP a keytab. 
477 .br
478 \fIcursor\fP a newly allocated cursor, free with \fBkrb5_kt_end_seq_get()\fP.
479 .RE
480 .PP
481 \fBReturns:\fP
482 .RS 4
483 Return an error code or 0, see krb5_get_error_message(). 
484 .RE
485 .PP
486