17c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
27c478bd9Sstevel@tonic-gate 
37c478bd9Sstevel@tonic-gate /*
47c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
57c478bd9Sstevel@tonic-gate  *
67c478bd9Sstevel@tonic-gate  *	Openvision retains the copyright to derivative works of
77c478bd9Sstevel@tonic-gate  *	this source code.  Do *NOT* create a derivative of this
87c478bd9Sstevel@tonic-gate  *	source code before consulting with your legal department.
97c478bd9Sstevel@tonic-gate  *	Do *NOT* integrate *ANY* of this source code into another
107c478bd9Sstevel@tonic-gate  *	product before consulting with your legal department.
117c478bd9Sstevel@tonic-gate  *
127c478bd9Sstevel@tonic-gate  *	For further information, read the top-level Openvision
137c478bd9Sstevel@tonic-gate  *	copyright which is contained in the top-level MIT Kerberos
147c478bd9Sstevel@tonic-gate  *	copyright.
157c478bd9Sstevel@tonic-gate  *
167c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
177c478bd9Sstevel@tonic-gate  *
187c478bd9Sstevel@tonic-gate  */
197c478bd9Sstevel@tonic-gate 
207c478bd9Sstevel@tonic-gate 
217c478bd9Sstevel@tonic-gate /*
227c478bd9Sstevel@tonic-gate  * kadmin/ktutil/ktutil.h
237c478bd9Sstevel@tonic-gate  *
247c478bd9Sstevel@tonic-gate  * Copyright 1995 by the Massachusetts Institute of Technology.
257c478bd9Sstevel@tonic-gate  * All Rights Reserved.
267c478bd9Sstevel@tonic-gate  *
277c478bd9Sstevel@tonic-gate  * Export of this software from the United States of America may
287c478bd9Sstevel@tonic-gate  *   require a specific license from the United States Government.
297c478bd9Sstevel@tonic-gate  *   It is the responsibility of any person or organization contemplating
307c478bd9Sstevel@tonic-gate  *   export to obtain such a license before exporting.
31*56a424ccSmp  *
327c478bd9Sstevel@tonic-gate  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
337c478bd9Sstevel@tonic-gate  * distribute this software and its documentation for any purpose and
347c478bd9Sstevel@tonic-gate  * without fee is hereby granted, provided that the above copyright
357c478bd9Sstevel@tonic-gate  * notice appear in all copies and that both that copyright notice and
367c478bd9Sstevel@tonic-gate  * this permission notice appear in supporting documentation, and that
377c478bd9Sstevel@tonic-gate  * the name of M.I.T. not be used in advertising or publicity pertaining
387c478bd9Sstevel@tonic-gate  * to distribution of the software without specific, written prior
397c478bd9Sstevel@tonic-gate  * permission.  Furthermore if you modify this software you must label
407c478bd9Sstevel@tonic-gate  * your software as modified software and not distribute it in such a
417c478bd9Sstevel@tonic-gate  * fashion that it might be confused with the original M.I.T. software.
427c478bd9Sstevel@tonic-gate  * M.I.T. makes no representations about the suitability of
437c478bd9Sstevel@tonic-gate  * this software for any purpose.  It is provided "as is" without express
447c478bd9Sstevel@tonic-gate  * or implied warranty.
45*56a424ccSmp  *
467c478bd9Sstevel@tonic-gate  */
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate typedef struct _krb5_kt_list {
49*56a424ccSmp     struct _krb5_kt_list *next;
50*56a424ccSmp     krb5_keytab_entry *entry;
517c478bd9Sstevel@tonic-gate } *krb5_kt_list;
527c478bd9Sstevel@tonic-gate 
53*56a424ccSmp krb5_error_code ktutil_free_kt_list (krb5_context, krb5_kt_list);
547c478bd9Sstevel@tonic-gate 
55*56a424ccSmp krb5_error_code ktutil_delete (krb5_context, krb5_kt_list *, int);
56*56a424ccSmp 
57*56a424ccSmp krb5_error_code ktutil_add (krb5_context,
58*56a424ccSmp 			    krb5_kt_list *,
59*56a424ccSmp 			    char *,
60*56a424ccSmp 			    krb5_kvno,
61*56a424ccSmp 			    char *,
62*56a424ccSmp 			    int);
637c478bd9Sstevel@tonic-gate 
64*56a424ccSmp krb5_error_code ktutil_read_keytab (krb5_context,
65*56a424ccSmp 				    char *,
66*56a424ccSmp 				    krb5_kt_list *);
67*56a424ccSmp 
68*56a424ccSmp krb5_error_code ktutil_write_keytab (krb5_context,
69*56a424ccSmp 				     krb5_kt_list,
70*56a424ccSmp 				     char *);
71*56a424ccSmp 
72*56a424ccSmp #ifdef KRB5_KRB4_COMPAT
73*56a424ccSmp krb5_error_code ktutil_read_srvtab (krb5_context,
74*56a424ccSmp 				    char *,
75*56a424ccSmp 				    krb5_kt_list *);
76*56a424ccSmp krb5_error_code ktutil_write_srvtab (krb5_context,
77*56a424ccSmp 				     krb5_kt_list,
78*56a424ccSmp 				     char *);
797c478bd9Sstevel@tonic-gate #endif
80*56a424ccSmp 
81*56a424ccSmp void ktutil_add_entry (int, char *[]);
82*56a424ccSmp 
83*56a424ccSmp void ktutil_clear_list (int, char *[]);
84*56a424ccSmp 
85*56a424ccSmp void ktutil_read_v5 (int, char *[]);
86*56a424ccSmp 
87*56a424ccSmp void ktutil_read_v4 (int, char *[]);
88*56a424ccSmp 
89*56a424ccSmp void ktutil_write_v5 (int, char *[]);
90*56a424ccSmp 
91*56a424ccSmp void ktutil_write_v4 (int, char *[]);
92*56a424ccSmp 
93*56a424ccSmp void ktutil_delete_entry (int, char *[]);
94*56a424ccSmp 
95*56a424ccSmp void ktutil_list (int, char *[]);
96