10Sstevel@tonic-gate /* 2*4960Swillf * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 30Sstevel@tonic-gate * Use is subject to license terms. 40Sstevel@tonic-gate */ 50Sstevel@tonic-gate 60Sstevel@tonic-gate #ifndef _KDB5_UTIL_H 70Sstevel@tonic-gate #define _KDB5_UTIL_H 80Sstevel@tonic-gate 90Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 100Sstevel@tonic-gate 110Sstevel@tonic-gate /* 120Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * Openvision retains the copyright to derivative works of 150Sstevel@tonic-gate * this source code. Do *NOT* create a derivative of this 160Sstevel@tonic-gate * source code before consulting with your legal department. 170Sstevel@tonic-gate * Do *NOT* integrate *ANY* of this source code into another 180Sstevel@tonic-gate * product before consulting with your legal department. 190Sstevel@tonic-gate * 200Sstevel@tonic-gate * For further information, read the top-level Openvision 210Sstevel@tonic-gate * copyright which is contained in the top-level MIT Kerberos 220Sstevel@tonic-gate * copyright. 230Sstevel@tonic-gate * 240Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 250Sstevel@tonic-gate * 260Sstevel@tonic-gate */ 270Sstevel@tonic-gate 280Sstevel@tonic-gate #ifdef __cplusplus 290Sstevel@tonic-gate extern "C" { 300Sstevel@tonic-gate #endif 310Sstevel@tonic-gate 320Sstevel@tonic-gate /* 330Sstevel@tonic-gate * admin/edit/kdb5_edit.h 340Sstevel@tonic-gate * 350Sstevel@tonic-gate * Copyright 1992 by the Massachusetts Institute of Technology. 360Sstevel@tonic-gate * All Rights Reserved. 370Sstevel@tonic-gate * 380Sstevel@tonic-gate * Export of this software from the United States of America may 390Sstevel@tonic-gate * require a specific license from the United States Government. 400Sstevel@tonic-gate * It is the responsibility of any person or organization contemplating 410Sstevel@tonic-gate * export to obtain such a license before exporting. 422881Smp153739 * 430Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 440Sstevel@tonic-gate * distribute this software and its documentation for any purpose and 450Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright 460Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and 470Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that 480Sstevel@tonic-gate * the name of M.I.T. not be used in advertising or publicity pertaining 490Sstevel@tonic-gate * to distribution of the software without specific, written prior 502881Smp153739 * permission. Furthermore if you modify this software you must label 512881Smp153739 * your software as modified software and not distribute it in such a 522881Smp153739 * fashion that it might be confused with the original M.I.T. software. 532881Smp153739 * M.I.T. makes no representations about the suitability of 540Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express 550Sstevel@tonic-gate * or implied warranty. 562881Smp153739 * 570Sstevel@tonic-gate */ 580Sstevel@tonic-gate #include <kdb/kdb_log.h> 592881Smp153739 #define MAX_HEADER 1024 602881Smp153739 #define REALM_SEP '@' 612881Smp153739 #define REALM_SEP_STR "@" 620Sstevel@tonic-gate 630Sstevel@tonic-gate extern char *progname; 640Sstevel@tonic-gate extern char *Err_no_database; 65*4960Swillf #ifndef V4_DECLARES_STATIC 66*4960Swillf extern krb5_keyblock master_keyblock; 67*4960Swillf extern krb5_principal master_princ; 68*4960Swillf #endif 692881Smp153739 extern krb5_boolean dbactive; 702881Smp153739 extern int exit_status; 712881Smp153739 extern krb5_context util_context; 722881Smp153739 extern kadm5_config_params global_params; 732881Smp153739 extern int valid_master_key; 742881Smp153739 extern krb5_db_entry master_db; 75*4960Swillf extern char **db5util_db_args; 76*4960Swillf extern int db5util_db_args_size; 77*4960Swillf extern int add_db_arg(char *arg); 780Sstevel@tonic-gate 792881Smp153739 extern void usage(void); 800Sstevel@tonic-gate 812881Smp153739 extern void add_key 822881Smp153739 (char const *, char const *, 832881Smp153739 krb5_const_principal, const krb5_keyblock *, 842881Smp153739 krb5_kvno, krb5_keysalt *); 852881Smp153739 extern int set_dbname_help 862881Smp153739 (char *, char *); 872881Smp153739 882881Smp153739 extern char *kdb5_util_Init (int, char **); 892881Smp153739 902881Smp153739 extern int quit (void); 912881Smp153739 922881Smp153739 extern int check_for_match 932881Smp153739 (char *, int, krb5_db_entry *, int, int); 940Sstevel@tonic-gate 952881Smp153739 extern void parse_token 962881Smp153739 (char *, int *, int *, char *); 970Sstevel@tonic-gate 982881Smp153739 extern int create_db_entry (krb5_principal, krb5_db_entry *); 992881Smp153739 1002881Smp153739 extern int kadm5_create_magic_princs (kadm5_config_params *params, 1012881Smp153739 krb5_context context); 1020Sstevel@tonic-gate 1032881Smp153739 extern int process_ov_principal (char *fname, krb5_context kcontext, 1042881Smp153739 FILE *filep, int verbose, 105*4960Swillf int *linenop); 1060Sstevel@tonic-gate 1072881Smp153739 extern void load_db (int argc, char **argv); 1082881Smp153739 extern void dump_db (int argc, char **argv); 1092881Smp153739 extern void kdb5_create (int argc, char **argv); 1102881Smp153739 extern void kdb5_destroy (int argc, char **argv); 1112881Smp153739 extern void kdb5_stash (int argc, char **argv); 1122881Smp153739 1132881Smp153739 extern void update_ok_file (char *file_name); 1142881Smp153739 1152881Smp153739 extern int kadm5_create (kadm5_config_params *params); 1162881Smp153739 1172881Smp153739 void usage (void); 1180Sstevel@tonic-gate 1190Sstevel@tonic-gate #ifdef __cplusplus 1200Sstevel@tonic-gate } 1210Sstevel@tonic-gate #endif 1220Sstevel@tonic-gate 1230Sstevel@tonic-gate #endif /* !_KDB5_UTIL_H */ 124