17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  *	Openvision retains the copyright to derivative works of
57c478bd9Sstevel@tonic-gate  *	this source code.  Do *NOT* create a derivative of this
67c478bd9Sstevel@tonic-gate  *	source code before consulting with your legal department.
77c478bd9Sstevel@tonic-gate  *	Do *NOT* integrate *ANY* of this source code into another
87c478bd9Sstevel@tonic-gate  *	product before consulting with your legal department.
97c478bd9Sstevel@tonic-gate  *
107c478bd9Sstevel@tonic-gate  *	For further information, read the top-level Openvision
117c478bd9Sstevel@tonic-gate  *	copyright which is contained in the top-level MIT Kerberos
127c478bd9Sstevel@tonic-gate  *	copyright.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
157c478bd9Sstevel@tonic-gate  *
167c478bd9Sstevel@tonic-gate  */
177c478bd9Sstevel@tonic-gate 
187c478bd9Sstevel@tonic-gate 
197c478bd9Sstevel@tonic-gate /*
207c478bd9Sstevel@tonic-gate  * kadmin/ktutil/ktutil.h
217c478bd9Sstevel@tonic-gate  *
227c478bd9Sstevel@tonic-gate  * Copyright 1995 by the Massachusetts Institute of Technology.
237c478bd9Sstevel@tonic-gate  * All Rights Reserved.
247c478bd9Sstevel@tonic-gate  *
257c478bd9Sstevel@tonic-gate  * Export of this software from the United States of America may
267c478bd9Sstevel@tonic-gate  *   require a specific license from the United States Government.
277c478bd9Sstevel@tonic-gate  *   It is the responsibility of any person or organization contemplating
287c478bd9Sstevel@tonic-gate  *   export to obtain such a license before exporting.
29*2a8bcb4eSToomas Soome  *
307c478bd9Sstevel@tonic-gate  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
317c478bd9Sstevel@tonic-gate  * distribute this software and its documentation for any purpose and
327c478bd9Sstevel@tonic-gate  * without fee is hereby granted, provided that the above copyright
337c478bd9Sstevel@tonic-gate  * notice appear in all copies and that both that copyright notice and
347c478bd9Sstevel@tonic-gate  * this permission notice appear in supporting documentation, and that
357c478bd9Sstevel@tonic-gate  * the name of M.I.T. not be used in advertising or publicity pertaining
367c478bd9Sstevel@tonic-gate  * to distribution of the software without specific, written prior
377c478bd9Sstevel@tonic-gate  * permission.  Furthermore if you modify this software you must label
387c478bd9Sstevel@tonic-gate  * your software as modified software and not distribute it in such a
397c478bd9Sstevel@tonic-gate  * fashion that it might be confused with the original M.I.T. software.
407c478bd9Sstevel@tonic-gate  * M.I.T. makes no representations about the suitability of
417c478bd9Sstevel@tonic-gate  * this software for any purpose.  It is provided "as is" without express
427c478bd9Sstevel@tonic-gate  * or implied warranty.
43*2a8bcb4eSToomas Soome  *
447c478bd9Sstevel@tonic-gate  */
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate typedef struct _krb5_kt_list {
4756a424ccSmp     struct _krb5_kt_list *next;
4856a424ccSmp     krb5_keytab_entry *entry;
497c478bd9Sstevel@tonic-gate } *krb5_kt_list;
507c478bd9Sstevel@tonic-gate 
5156a424ccSmp krb5_error_code ktutil_free_kt_list (krb5_context, krb5_kt_list);
527c478bd9Sstevel@tonic-gate 
5356a424ccSmp krb5_error_code ktutil_delete (krb5_context, krb5_kt_list *, int);
5456a424ccSmp 
5556a424ccSmp krb5_error_code ktutil_add (krb5_context,
5656a424ccSmp 			    krb5_kt_list *,
5756a424ccSmp 			    char *,
5856a424ccSmp 			    krb5_kvno,
5956a424ccSmp 			    char *,
6056a424ccSmp 			    int);
617c478bd9Sstevel@tonic-gate 
6256a424ccSmp krb5_error_code ktutil_read_keytab (krb5_context,
6356a424ccSmp 				    char *,
6456a424ccSmp 				    krb5_kt_list *);
6556a424ccSmp 
6656a424ccSmp krb5_error_code ktutil_write_keytab (krb5_context,
6756a424ccSmp 				     krb5_kt_list,
6856a424ccSmp 				     char *);
6956a424ccSmp 
7056a424ccSmp #ifdef KRB5_KRB4_COMPAT
7156a424ccSmp krb5_error_code ktutil_read_srvtab (krb5_context,
7256a424ccSmp 				    char *,
7356a424ccSmp 				    krb5_kt_list *);
7456a424ccSmp krb5_error_code ktutil_write_srvtab (krb5_context,
7556a424ccSmp 				     krb5_kt_list,
7656a424ccSmp 				     char *);
777c478bd9Sstevel@tonic-gate #endif
7856a424ccSmp 
7956a424ccSmp void ktutil_add_entry (int, char *[]);
8056a424ccSmp 
8156a424ccSmp void ktutil_clear_list (int, char *[]);
8256a424ccSmp 
8356a424ccSmp void ktutil_read_v5 (int, char *[]);
8456a424ccSmp 
8556a424ccSmp void ktutil_read_v4 (int, char *[]);
8656a424ccSmp 
8756a424ccSmp void ktutil_write_v5 (int, char *[]);
8856a424ccSmp 
8956a424ccSmp void ktutil_write_v4 (int, char *[]);
9056a424ccSmp 
9156a424ccSmp void ktutil_delete_entry (int, char *[]);
9256a424ccSmp 
9356a424ccSmp void ktutil_list (int, char *[]);
94