summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5_keytab.3
blob: 3c76f400d5ee2f92a59223d5efb9cb22bfc9fcc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
.TH "Heimdal Kerberos 5 keytab handling functions" 3 "30 Sep 2011" "Version 1.5.1" "HeimdalKerberos5library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Heimdal Kerberos 5 keytab handling functions \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_register\fP (krb5_context context, const krb5_kt_ops *ops)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_resolve\fP (krb5_context context, const char *name, krb5_keytab *id)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default_name\fP (krb5_context context, char *name, size_t namesize)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default_modify_name\fP (krb5_context context, char *name, size_t namesize)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_default\fP (krb5_context context, krb5_keytab *id)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_get_full_name\fP (krb5_context context, krb5_keytab keytab, char **str)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_close\fP (krb5_context context, krb5_keytab id)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_destroy\fP (krb5_context context, krb5_keytab id)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_kt_free_entry\fP (krb5_context context, krb5_keytab_entry *entry)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.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)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_kt_have_content\fP (krb5_context context, krb5_keytab id)"
.br
.in -1c
.SH "Detailed Description"
.PP 

.SH "Function Documentation"
.PP 
.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_add_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry)"
.PP
Add the entry in `entry' to the keytab `id'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP a keytab. 
.br
\fIentry\fP the entry to add
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_close (krb5_context context, krb5_keytab id)"
.PP
Finish using the keytab in `id'. All resources will be released, even on errors.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP keytab to close.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
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.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIentry\fP an entry to match with. 
.br
\fIprincipal\fP principal to match, NULL matches all principals. 
.br
\fIvno\fP key version to match, 0 matches all key version numbers. 
.br
\fIenctype\fP encryption type to match, 0 matches all encryption types.
.RE
.PP
\fBReturns:\fP
.RS 4
Return TRUE or match, FALSE if not matched. 
.RE
.PP

.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)"
.PP
Copy the contents of `in' into `out'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIin\fP the keytab entry to copy. 
.br
\fIout\fP the copy of the keytab entry, free with \fBkrb5_kt_free_entry()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default (krb5_context context, krb5_keytab * id)"
.PP
Set `id' to the default keytab.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP the new default keytab.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_modify_name (krb5_context context, char * name, size_t namesize)"
.PP
Copy the name of the default modify keytab into `name'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIname\fP buffer where the name will be written 
.br
\fInamesize\fP length of name
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_default_name (krb5_context context, char * name, size_t namesize)"
.PP
copy the name of the default keytab into `name'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIname\fP buffer where the name will be written 
.br
\fInamesize\fP length of name
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_destroy (krb5_context context, krb5_keytab id)"
.PP
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.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP keytab to destroy.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
Release all resources associated with `cursor'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP a keytab. 
.br
\fIcursor\fP the cursor to free.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_free_entry (krb5_context context, krb5_keytab_entry * entry)"
.PP
Free the contents of `entry'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIentry\fP the entry to free
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
Retrieve the keytab entry for `principal, kvno, enctype' into `entry' from the keytab `id'. Matching is done like \fBkrb5_kt_compare()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP a keytab. 
.br
\fIprincipal\fP principal to match, NULL matches all principals. 
.br
\fIkvno\fP key version to match, 0 matches all key version numbers. 
.br
\fIenctype\fP encryption type to match, 0 matches all encryption types. 
.br
\fIentry\fP the returned entry, free with \fBkrb5_kt_free_entry()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_get_full_name (krb5_context context, krb5_keytab keytab, char ** str)"
.PP
Retrieve the full name of the keytab `keytab' and store the name in `str'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIkeytab\fP keytab to get name for. 
.br
\fIstr\fP the name of the keytab name, usee krb5_xfree() to free the string. On error, *str is set to NULL.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
Retrieve the name of the keytab `keytab' into `name', `namesize'
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIkeytab\fP the keytab to get the name for. 
.br
\fIname\fP name buffer. 
.br
\fInamesize\fP size of name buffer.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
Return the type of the `keytab' in the string `prefix of length `prefixsize'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIkeytab\fP the keytab to get the prefix for 
.br
\fIprefix\fP prefix buffer 
.br
\fIprefixsize\fP length of prefix buffer
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_kt_have_content (krb5_context context, krb5_keytab id)"
.PP
Return true if the keytab exists and have entries
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP a keytab.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
Get the next entry from keytab, advance the cursor. On last entry the function will return KRB5_KT_END.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP a keytab. 
.br
\fIentry\fP the returned entry, free with \fBkrb5_kt_free_entry()\fP. 
.br
\fIcursor\fP the cursor of the iteration.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
Read the key identified by `(principal, vno, enctype)' from the keytab in `keyprocarg' (the default if == NULL) into `*key'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIkeyprocarg\fP 
.br
\fIprincipal\fP 
.br
\fIvno\fP 
.br
\fIenctype\fP 
.br
\fIkey\fP 
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_register (krb5_context context, const krb5_kt_ops * ops)"
.PP
Register a new keytab backend.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIops\fP a backend to register.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_remove_entry (krb5_context context, krb5_keytab id, krb5_keytab_entry * entry)"
.PP
Remove an entry from the keytab, matching is done using \fBkrb5_kt_compare()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP a keytab. 
.br
\fIentry\fP the entry to remove
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_kt_resolve (krb5_context context, const char * name, krb5_keytab * id)"
.PP
Resolve the keytab name (of the form `type:residual') in `name' into a keytab in `id'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIname\fP name to resolve 
.br
\fIid\fP resulting keytab, free with \fBkrb5_kt_close()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

.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)"
.PP
Set `cursor' to point at the beginning of `id'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context. 
.br
\fIid\fP a keytab. 
.br
\fIcursor\fP a newly allocated cursor, free with \fBkrb5_kt_end_seq_get()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Return an error code or 0, see krb5_get_error_message(). 
.RE
.PP

OpenPOWER on IntegriCloud