xref: /titanic_50/usr/src/cmd/krb5/kadmin/ktutil/ktutil.h (revision 174bc6499d233e329ecd3d98a880a7b07df16bfa)
1 #pragma ident	"%Z%%M%	%I%	%E% SMI"
2 
3 /*
4  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
5  *
6  *	Openvision retains the copyright to derivative works of
7  *	this source code.  Do *NOT* create a derivative of this
8  *	source code before consulting with your legal department.
9  *	Do *NOT* integrate *ANY* of this source code into another
10  *	product before consulting with your legal department.
11  *
12  *	For further information, read the top-level Openvision
13  *	copyright which is contained in the top-level MIT Kerberos
14  *	copyright.
15  *
16  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
17  *
18  */
19 
20 
21 /*
22  * kadmin/ktutil/ktutil.h
23  *
24  * Copyright 1995 by the Massachusetts Institute of Technology.
25  * All Rights Reserved.
26  *
27  * Export of this software from the United States of America may
28  *   require a specific license from the United States Government.
29  *   It is the responsibility of any person or organization contemplating
30  *   export to obtain such a license before exporting.
31  *
32  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
33  * distribute this software and its documentation for any purpose and
34  * without fee is hereby granted, provided that the above copyright
35  * notice appear in all copies and that both that copyright notice and
36  * this permission notice appear in supporting documentation, and that
37  * the name of M.I.T. not be used in advertising or publicity pertaining
38  * to distribution of the software without specific, written prior
39  * permission.  Furthermore if you modify this software you must label
40  * your software as modified software and not distribute it in such a
41  * fashion that it might be confused with the original M.I.T. software.
42  * M.I.T. makes no representations about the suitability of
43  * this software for any purpose.  It is provided "as is" without express
44  * or implied warranty.
45  *
46  */
47 
48 typedef struct _krb5_kt_list {
49     struct _krb5_kt_list *next;
50     krb5_keytab_entry *entry;
51 } *krb5_kt_list;
52 
53 krb5_error_code ktutil_free_kt_list (krb5_context, krb5_kt_list);
54 
55 krb5_error_code ktutil_delete (krb5_context, krb5_kt_list *, int);
56 
57 krb5_error_code ktutil_add (krb5_context,
58 			    krb5_kt_list *,
59 			    char *,
60 			    krb5_kvno,
61 			    char *,
62 			    int);
63 
64 krb5_error_code ktutil_read_keytab (krb5_context,
65 				    char *,
66 				    krb5_kt_list *);
67 
68 krb5_error_code ktutil_write_keytab (krb5_context,
69 				     krb5_kt_list,
70 				     char *);
71 
72 #ifdef KRB5_KRB4_COMPAT
73 krb5_error_code ktutil_read_srvtab (krb5_context,
74 				    char *,
75 				    krb5_kt_list *);
76 krb5_error_code ktutil_write_srvtab (krb5_context,
77 				     krb5_kt_list,
78 				     char *);
79 #endif
80 
81 void ktutil_add_entry (int, char *[]);
82 
83 void ktutil_clear_list (int, char *[]);
84 
85 void ktutil_read_v5 (int, char *[]);
86 
87 void ktutil_read_v4 (int, char *[]);
88 
89 void ktutil_write_v5 (int, char *[]);
90 
91 void ktutil_write_v4 (int, char *[]);
92 
93 void ktutil_delete_entry (int, char *[]);
94 
95 void ktutil_list (int, char *[]);
96