summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/doc/doxyout/krb5/man/man3/krb5.3
blob: a6661bd923d859b94a57e9f9f3edaa0cbbc69a0a (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
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
.TH "Heimdal Kerberos 5 library" 3 "30 Sep 2011" "Version 1.5.1" "HeimdalKerberos5library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
Heimdal Kerberos 5 library \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_et_list\fP (krb5_context context, void(*func)(struct et_list **))"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_password\fP (krb5_context context, krb5_creds *creds, const char *newpw, krb5_principal targprinc, int *result_code, krb5_data *result_code_string, krb5_data *result_string)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_init_context\fP (krb5_context *context)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_context\fP (krb5_context context, krb5_context *out)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_context\fP (krb5_context context)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_config_files\fP (krb5_context context, char **filenames)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_prepend_config_files_default\fP (const char *filelist, char ***pfilenames)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_default_config_files\fP (char ***pfilenames)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_config_files\fP (char **filenames)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION const krb5_enctype *KRB5_LIB_CALL \fBkrb5_kerberos_enctypes\fP (krb5_context context)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_default_in_tkt_etypes\fP (krb5_context context, const krb5_enctype *etypes)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_default_in_tkt_etypes\fP (krb5_context context, krb5_pdu pdu_type, krb5_enctype **etypes)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_init_ets\fP (krb5_context context)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_set_use_admin_kdc\fP (krb5_context context, krb5_boolean flag)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_get_use_admin_kdc\fP (krb5_context context)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_extra_addresses\fP (krb5_context context, krb5_addresses *addresses)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_extra_addresses\fP (krb5_context context, const krb5_addresses *addresses)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_extra_addresses\fP (krb5_context context, krb5_addresses *addresses)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_add_ignore_addresses\fP (krb5_context context, krb5_addresses *addresses)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_ignore_addresses\fP (krb5_context context, const krb5_addresses *addresses)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_ignore_addresses\fP (krb5_context context, krb5_addresses *addresses)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_fcache_version\fP (krb5_context context, int version)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_fcache_version\fP (krb5_context context, int *version)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_is_thread_safe\fP (void)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_set_dns_canonicalize_hostname\fP (krb5_context context, krb5_boolean flag)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_get_dns_canonicalize_hostname\fP (krb5_context context)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_get_kdc_sec_offset\fP (krb5_context context, int32_t *sec, int32_t *usec)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_kdc_sec_offset\fP (krb5_context context, int32_t sec, int32_t usec)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL \fBkrb5_get_max_time_skew\fP (krb5_context context)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_set_max_time_skew\fP (krb5_context context, time_t t)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_set_home_dir_access\fP (krb5_context context, krb5_boolean allow)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_host_realm\fP (krb5_context context, const krb5_realm *from, krb5_realm **to)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_cred_contents\fP (krb5_context context, krb5_creds *c)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_creds_contents\fP (krb5_context context, const krb5_creds *incred, krb5_creds *c)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_creds\fP (krb5_context context, const krb5_creds *incred, krb5_creds **outcred)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_creds\fP (krb5_context context, krb5_creds *c)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_compare_creds\fP (krb5_context context, krb5_flags whichfields, const krb5_creds *mcreds, const krb5_creds *creds)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL \fBkrb5_creds_get_ticket_flags\fP (krb5_creds *creds)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_data_zero\fP (krb5_data *p)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_data_free\fP (krb5_data *p)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_free_data\fP (krb5_context context, krb5_data *p)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_data_alloc\fP (krb5_data *p, int len)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_data_realloc\fP (krb5_data *p, int len)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_data_copy\fP (krb5_data *p, const void *data, size_t len)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_data\fP (krb5_context context, const krb5_data *indata, krb5_data **outdata)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_data_cmp\fP (const krb5_data *data1, const krb5_data *data2)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_data_ct_cmp\fP (const krb5_data *data1, const krb5_data *data2)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_krbhst_get_addrinfo\fP (krb5_context context, krb5_krbhst_info *host, struct addrinfo **ai)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_free_ticket\fP (krb5_context context, krb5_ticket *ticket)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_copy_ticket\fP (krb5_context context, const krb5_ticket *from, krb5_ticket **to)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ticket_get_client\fP (krb5_context context, const krb5_ticket *ticket, krb5_principal *client)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ticket_get_server\fP (krb5_context context, const krb5_ticket *ticket, krb5_principal *server)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL \fBkrb5_ticket_get_endtime\fP (krb5_context context, const krb5_ticket *ticket)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ticket_get_authorization_data_type\fP (krb5_context context, krb5_ticket *ticket, int type, krb5_data *data)"
.br
.ti -1c
.RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_set_real_time\fP (krb5_context context, krb5_timestamp sec, int32_t usec)"
.br
.in -1c
.SH "Detailed Description"
.PP 

.SH "Function Documentation"
.PP 
.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_et_list (krb5_context context, void(*)(struct et_list **) func)"
.PP
Add a specified list of error messages to the et list in context. Call func (probably a comerr-generated function) with a pointer to the current et_list.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP A kerberos context. 
.br
\fIfunc\fP The generated com_err et function.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_extra_addresses (krb5_context context, krb5_addresses * addresses)"
.PP
Add extra address to the address list that the library will add to the client's address list when communicating with the KDC.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIaddresses\fP addreses to add
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_add_ignore_addresses (krb5_context context, krb5_addresses * addresses)"
.PP
Add extra addresses to ignore when fetching addresses from the underlaying operating system.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIaddresses\fP addreses to ignore
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_compare_creds (krb5_context context, krb5_flags whichfields, const krb5_creds * mcreds, const krb5_creds * creds)"
.PP
Return TRUE if `mcreds' and `creds' are equal (`whichfields' determines what equal means).
.PP
The following flags, set in whichfields affects the comparison:
.IP "\(bu" 2
KRB5_TC_MATCH_SRV_NAMEONLY Consider all realms equal when comparing the service principal.
.IP "\(bu" 2
KRB5_TC_MATCH_KEYTYPE Compare enctypes.
.IP "\(bu" 2
KRB5_TC_MATCH_FLAGS_EXACT Make sure that the ticket flags are identical.
.IP "\(bu" 2
KRB5_TC_MATCH_FLAGS Make sure that all ticket flags set in mcreds are also present in creds .
.IP "\(bu" 2
KRB5_TC_MATCH_TIMES_EXACT Compares the ticket times exactly.
.IP "\(bu" 2
KRB5_TC_MATCH_TIMES Compares only the expiration times of the creds.
.IP "\(bu" 2
KRB5_TC_MATCH_AUTHDATA Compares the authdata fields.
.IP "\(bu" 2
KRB5_TC_MATCH_2ND_TKT Compares the second tickets (used by user-to-user authentication).
.IP "\(bu" 2
KRB5_TC_MATCH_IS_SKEY Compares the existance of the second ticket.
.PP
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIwhichfields\fP which fields to compare. 
.br
\fImcreds\fP cred to compare with. 
.br
\fIcreds\fP cred to compare with.
.RE
.PP
\fBReturns:\fP
.RS 4
return TRUE if mcred and creds are equal, FALSE if not. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_context (krb5_context context, krb5_context * out)"
.PP
Make a copy for the Kerberos 5 context, the new krb5_context shoud be freed with \fBkrb5_free_context()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP the Kerberos context to copy 
.br
\fIout\fP the copy of the Kerberos, set to NULL error.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_creds (krb5_context context, const krb5_creds * incred, krb5_creds ** outcred)"
.PP
Copy krb5_creds.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIincred\fP source credential 
.br
\fIoutcred\fP destination credential, free with \fBkrb5_free_creds()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_creds_contents (krb5_context context, const krb5_creds * incred, krb5_creds * c)"
.PP
Copy content of krb5_creds.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIincred\fP source credential 
.br
\fIc\fP destination credential, free with \fBkrb5_free_cred_contents()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_data (krb5_context context, const krb5_data * indata, krb5_data ** outdata)"
.PP
Copy the data into a newly allocated krb5_data.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIindata\fP the krb5_data data to copy 
.br
\fIoutdata\fP new krb5_date to copy too. Free with \fBkrb5_free_data()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_host_realm (krb5_context context, const krb5_realm * from, krb5_realm ** to)"
.PP
Copy the list of realms from `from' to `to'.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIfrom\fP list of realms to copy from. 
.br
\fIto\fP list of realms to copy to, free list of \fBkrb5_free_host_realm()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_copy_ticket (krb5_context context, const krb5_ticket * from, krb5_ticket ** to)"
.PP
Copy ticket and content
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Kerberos 5 context 
.br
\fIfrom\fP ticket to copy 
.br
\fIto\fP new copy of ticket, free with \fBkrb5_free_ticket()\fP
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION unsigned long KRB5_LIB_CALL krb5_creds_get_ticket_flags (krb5_creds * creds)"
.PP
Returns the ticket flags for the credentials in creds. See also \fBkrb5_ticket_get_flags()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIcreds\fP credential to get ticket flags from
.RE
.PP
\fBReturns:\fP
.RS 4
ticket flags 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_alloc (krb5_data * p, int len)"
.PP
Allocate data of and krb5_data.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP krb5_data to allocate. 
.br
\fIlen\fP size to allocate.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_cmp (const krb5_data * data1, const krb5_data * data2)"
.PP
Compare to data.
.PP
\fBParameters:\fP
.RS 4
\fIdata1\fP krb5_data to compare 
.br
\fIdata2\fP krb5_data to compare
.RE
.PP
\fBReturns:\fP
.RS 4
return the same way as memcmp(), useful when sorting. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_copy (krb5_data * p, const void * data, size_t len)"
.PP
Copy the data of len into the krb5_data.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP krb5_data to copy into. 
.br
\fIdata\fP data to copy.. 
.br
\fIlen\fP new size.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_data_ct_cmp (const krb5_data * data1, const krb5_data * data2)"
.PP
Compare to data not exposing timing information from the checksum data
.PP
\fBParameters:\fP
.RS 4
\fIdata1\fP krb5_data to compare 
.br
\fIdata2\fP krb5_data to compare
.RE
.PP
\fBReturns:\fP
.RS 4
returns zero for same data, otherwise non zero. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_data_free (krb5_data * p)"
.PP
Free the content of krb5_data structure, its ok to free a zeroed structure (with memset() or \fBkrb5_data_zero()\fP). When done, the structure will be zeroed. The same function is called \fBkrb5_free_data_contents()\fP in MIT Kerberos.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP krb5_data to free. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_data_realloc (krb5_data * p, int len)"
.PP
Grow (or shrink) the content of krb5_data to a new size.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP krb5_data to free. 
.br
\fIlen\fP new size.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_data_zero (krb5_data * p)"
.PP
Reset the (potentially uninitalized) krb5_data structure.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP krb5_data to reset. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_config_files (char ** filenames)"
.PP
Free a list of configuration files.
.PP
\fBParameters:\fP
.RS 4
\fIfilenames\fP list, terminated with a NULL pointer, to be freed. NULL is an valid argument.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_context (krb5_context context)"
.PP
Frees the krb5_context allocated by \fBkrb5_init_context()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP context to be freed. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_cred_contents (krb5_context context, krb5_creds * c)"
.PP
Free content of krb5_creds.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIc\fP krb5_creds to free.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_creds (krb5_context context, krb5_creds * c)"
.PP
Free krb5_creds.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIc\fP krb5_creds to free.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_free_data (krb5_context context, krb5_data * p)"
.PP
Free krb5_data (and its content).
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIp\fP krb5_data to free. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_free_ticket (krb5_context context, krb5_ticket * ticket)"
.PP
Free ticket and content
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Kerberos 5 context 
.br
\fIticket\fP ticket to free
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_default_config_files (char *** pfilenames)"
.PP
Get the global configuration list.
.PP
\fBParameters:\fP
.RS 4
\fIpfilenames\fP return array of filenames, should be freed with \fBkrb5_free_config_files()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_default_in_tkt_etypes (krb5_context context, krb5_pdu pdu_type, krb5_enctype ** etypes)"
.PP
Get the default encryption types that will be use in communcation with the KDC, clients and servers.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIetypes\fP Encryption types, array terminated with ETYPE_NULL(0), caller should free array with krb5_xfree():
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_get_dns_canonicalize_hostname (krb5_context context)"
.PP
Get if the library uses DNS to canonicalize hostnames.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context.
.RE
.PP
\fBReturns:\fP
.RS 4
return non zero if the library uses DNS to canonicalize hostnames. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_extra_addresses (krb5_context context, krb5_addresses * addresses)"
.PP
Get extra address to the address list that the library will add to the client's address list when communicating with the KDC.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIaddresses\fP addreses to set
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_fcache_version (krb5_context context, int * version)"
.PP
Get version of fcache that the library should use.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIversion\fP version number.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_ignore_addresses (krb5_context context, krb5_addresses * addresses)"
.PP
Get extra addresses to ignore when fetching addresses from the underlaying operating system.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIaddresses\fP list addreses ignored
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_kdc_sec_offset (krb5_context context, int32_t * sec, int32_t * usec)"
.PP
Get current offset in time to the KDC.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIsec\fP seconds part of offset. 
.br
\fIusec\fP micro seconds part of offset.
.RE
.PP
\fBReturns:\fP
.RS 4
returns zero 
.RE
.PP

.SS "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL krb5_get_max_time_skew (krb5_context context)"
.PP
Get max time skew allowed.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context.
.RE
.PP
\fBReturns:\fP
.RS 4
timeskew in seconds. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_get_use_admin_kdc (krb5_context context)"
.PP
Make the kerberos library default to the admin KDC.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context.
.RE
.PP
\fBReturns:\fP
.RS 4
boolean flag to telling the context will use admin KDC as the default KDC. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_init_context (krb5_context * context)"
.PP
Initializes the context structure and reads the configuration file /etc/krb5.conf. The structure should be freed by calling \fBkrb5_free_context()\fP when it is no longer being used.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP pointer to returned context
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an errno code is returned. Failure means either that something bad happened during initialization (typically ENOMEM) or that Kerberos should not be used ENXIO. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_init_ets (krb5_context context)"
.PP
Init the built-in ets in the Kerberos library.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP kerberos context to add the ets too 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_is_thread_safe (void)"
.PP
Runtime check if the Kerberos library was complied with thread support.
.PP
\fBReturns:\fP
.RS 4
TRUE if the library was compiled with thread support, FALSE if not. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION const krb5_enctype* KRB5_LIB_CALL krb5_kerberos_enctypes (krb5_context context)"
.PP
Returns the list of Kerberos encryption types sorted in order of most preferred to least preferred encryption type. Note that some encryption types might be disabled, so you need to check with \fBkrb5_enctype_valid()\fP before using the encryption type.
.PP
\fBReturns:\fP
.RS 4
list of enctypes, terminated with ETYPE_NULL. Its a static array completed into the Kerberos library so the content doesn't need to be freed. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_krbhst_get_addrinfo (krb5_context context, krb5_krbhst_info * host, struct addrinfo ** ai)"
.PP
Return an `struct addrinfo *' for a KDC host.
.PP
Returns an the struct addrinfo in in that corresponds to the information in `host'. free:ing is handled by krb5_krbhst_free, so the returned ai must not be released. 
.PP
First try this as an IP address, this allows us to add a dot at the end to stop using the search domains.
.PP
If the hostname contains a dot, assumes it's a FQDN and don't use search domains since that might be painfully slow when machine is disconnected from that network. 
.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_prepend_config_files_default (const char * filelist, char *** pfilenames)"
.PP
Prepend the filename to the global configuration list.
.PP
\fBParameters:\fP
.RS 4
\fIfilelist\fP a filename to add to the default list of filename 
.br
\fIpfilenames\fP return array of filenames, should be freed with \fBkrb5_free_config_files()\fP.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_config_files (krb5_context context, char ** filenames)"
.PP
Reinit the context from a new set of filenames.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP context to add configuration too. 
.br
\fIfilenames\fP array of filenames, end of list is indicated with a NULL filename.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_default_in_tkt_etypes (krb5_context context, const krb5_enctype * etypes)"
.PP
Set the default encryption types that will be use in communcation with the KDC, clients and servers.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIetypes\fP Encryption types, array terminated with ETYPE_NULL (0).
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)"
.PP
Set if the library should use DNS to canonicalize hostnames.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIflag\fP if its dns canonicalizion is used or not. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_extra_addresses (krb5_context context, const krb5_addresses * addresses)"
.PP
Set extra address to the address list that the library will add to the client's address list when communicating with the KDC.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIaddresses\fP addreses to set
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_fcache_version (krb5_context context, int version)"
.PP
Set version of fcache that the library should use.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIversion\fP version number.
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_set_home_dir_access (krb5_context context, krb5_boolean allow)"
.PP
Enable and disable home directory access on either the global state or the krb5_context state. By calling \fBkrb5_set_home_dir_access()\fP with context set to NULL, the global state is configured otherwise the state for the krb5_context is modified.
.PP
For home directory access to be allowed, both the global state and the krb5_context state have to be allowed.
.PP
Administrator (root user), never uses the home directory.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Kerberos 5 context or NULL 
.br
\fIallow\fP allow if TRUE home directory 
.RE
.PP
\fBReturns:\fP
.RS 4
the old value 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_ignore_addresses (krb5_context context, const krb5_addresses * addresses)"
.PP
Set extra addresses to ignore when fetching addresses from the underlaying operating system.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIaddresses\fP addreses to ignore
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_kdc_sec_offset (krb5_context context, int32_t sec, int32_t usec)"
.PP
Set current offset in time to the KDC.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIsec\fP seconds part of offset. 
.br
\fIusec\fP micro seconds part of offset.
.RE
.PP
\fBReturns:\fP
.RS 4
returns zero 
.RE
.PP

.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_max_time_skew (krb5_context context, time_t t)"
.PP
Set max time skew allowed.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIt\fP timeskew in seconds. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_password (krb5_context context, krb5_creds * creds, const char * newpw, krb5_principal targprinc, int * result_code, krb5_data * result_code_string, krb5_data * result_string)"
.PP
Change password using creds.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Keberos context 
.br
\fIcreds\fP The initial kadmin/passwd for the principal or an admin principal 
.br
\fInewpw\fP The new password to set 
.br
\fItargprinc\fP if unset, the default principal is used. 
.br
\fIresult_code\fP Result code, KRB5_KPASSWD_SUCCESS is when password is changed. 
.br
\fIresult_code_string\fP binary message from the server, contains at least the result_code. 
.br
\fIresult_string\fP A message from the kpasswd service or the library in human printable form. The string is NUL terminated.
.RE
.PP
\fBReturns:\fP
.RS 4
On sucess and *result_code is KRB5_KPASSWD_SUCCESS, the password is changed.
.RE
.PP
@ 
.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_set_real_time (krb5_context context, krb5_timestamp sec, int32_t usec)"
.PP
Set the absolute time that the caller knows the kdc has so the kerberos library can calculate the relative diffrence beteen the KDC time and local system time.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Keberos 5 context. 
.br
\fIsec\fP The applications new of 'now' in seconds 
.br
\fIusec\fP The applications new of 'now' in micro seconds
.RE
.PP
\fBReturns:\fP
.RS 4
Kerberos 5 error code, see krb5_get_error_message(). 
.RE
.PP

.PP
If the caller passes in a negative usec, its assumed to be unknown and the function will use the current time usec. 
.SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag)"
.PP
Make the kerberos library default to the admin KDC.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP Kerberos 5 context. 
.br
\fIflag\fP boolean flag to select if the use the admin KDC or not. 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_authorization_data_type (krb5_context context, krb5_ticket * ticket, int type, krb5_data * data)"
.PP
Extract the authorization data type of type from the ticket. Store the field in data. This function is to use for kerberos applications.
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Kerberos 5 context 
.br
\fIticket\fP Kerberos ticket 
.br
\fItype\fP type to fetch 
.br
\fIdata\fP returned data, free with \fBkrb5_data_free()\fP 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_client (krb5_context context, const krb5_ticket * ticket, krb5_principal * client)"
.PP
Return client principal in ticket
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Kerberos 5 context 
.br
\fIticket\fP ticket to copy 
.br
\fIclient\fP client principal, free with \fBkrb5_free_principal()\fP
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

.SS "KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL krb5_ticket_get_endtime (krb5_context context, const krb5_ticket * ticket)"
.PP
Return end time of ticket
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Kerberos 5 context 
.br
\fIticket\fP ticket to copy
.RE
.PP
\fBReturns:\fP
.RS 4
end time of ticket 
.RE
.PP

.SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ticket_get_server (krb5_context context, const krb5_ticket * ticket, krb5_principal * server)"
.PP
Return server principal in ticket
.PP
\fBParameters:\fP
.RS 4
\fIcontext\fP a Kerberos 5 context 
.br
\fIticket\fP ticket to copy 
.br
\fIserver\fP server principal, free with \fBkrb5_free_principal()\fP
.RE
.PP
\fBReturns:\fP
.RS 4
Returns 0 to indicate success. Otherwise an kerberos et error code is returned, see krb5_get_error_message(). 
.RE
.PP

OpenPOWER on IntegriCloud