17c478bd9Sstevel@tonic-gate /* 2*54925bf6Swillf * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 37c478bd9Sstevel@tonic-gate * Use is subject to license terms. 47c478bd9Sstevel@tonic-gate */ 57c478bd9Sstevel@tonic-gate 67c478bd9Sstevel@tonic-gate #ifndef _KDB5_UTIL_H 77c478bd9Sstevel@tonic-gate #define _KDB5_UTIL_H 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 107c478bd9Sstevel@tonic-gate 117c478bd9Sstevel@tonic-gate /* 127c478bd9Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * Openvision retains the copyright to derivative works of 157c478bd9Sstevel@tonic-gate * this source code. Do *NOT* create a derivative of this 167c478bd9Sstevel@tonic-gate * source code before consulting with your legal department. 177c478bd9Sstevel@tonic-gate * Do *NOT* integrate *ANY* of this source code into another 187c478bd9Sstevel@tonic-gate * product before consulting with your legal department. 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * For further information, read the top-level Openvision 217c478bd9Sstevel@tonic-gate * copyright which is contained in the top-level MIT Kerberos 227c478bd9Sstevel@tonic-gate * copyright. 237c478bd9Sstevel@tonic-gate * 247c478bd9Sstevel@tonic-gate * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 257c478bd9Sstevel@tonic-gate * 267c478bd9Sstevel@tonic-gate */ 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gate #ifdef __cplusplus 297c478bd9Sstevel@tonic-gate extern "C" { 307c478bd9Sstevel@tonic-gate #endif 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate /* 337c478bd9Sstevel@tonic-gate * admin/edit/kdb5_edit.h 347c478bd9Sstevel@tonic-gate * 357c478bd9Sstevel@tonic-gate * Copyright 1992 by the Massachusetts Institute of Technology. 367c478bd9Sstevel@tonic-gate * All Rights Reserved. 377c478bd9Sstevel@tonic-gate * 387c478bd9Sstevel@tonic-gate * Export of this software from the United States of America may 397c478bd9Sstevel@tonic-gate * require a specific license from the United States Government. 407c478bd9Sstevel@tonic-gate * It is the responsibility of any person or organization contemplating 417c478bd9Sstevel@tonic-gate * export to obtain such a license before exporting. 427c478bd9Sstevel@tonic-gate * 437c478bd9Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 447c478bd9Sstevel@tonic-gate * distribute this software and its documentation for any purpose and 457c478bd9Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright 467c478bd9Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and 477c478bd9Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that 487c478bd9Sstevel@tonic-gate * the name of M.I.T. not be used in advertising or publicity pertaining 497c478bd9Sstevel@tonic-gate * to distribution of the software without specific, written prior 5056a424ccSmp153739 * permission. Furthermore if you modify this software you must label 5156a424ccSmp153739 * your software as modified software and not distribute it in such a 5256a424ccSmp153739 * fashion that it might be confused with the original M.I.T. software. 5356a424ccSmp153739 * M.I.T. makes no representations about the suitability of 547c478bd9Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express 557c478bd9Sstevel@tonic-gate * or implied warranty. 567c478bd9Sstevel@tonic-gate * 577c478bd9Sstevel@tonic-gate */ 587c478bd9Sstevel@tonic-gate #include <kdb/kdb_log.h> 597c478bd9Sstevel@tonic-gate #define MAX_HEADER 1024 607c478bd9Sstevel@tonic-gate #define REALM_SEP '@' 617c478bd9Sstevel@tonic-gate #define REALM_SEP_STR "@" 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gate extern char *progname; 647c478bd9Sstevel@tonic-gate extern char *Err_no_database; 65*54925bf6Swillf #ifndef V4_DECLARES_STATIC 66*54925bf6Swillf extern krb5_keyblock master_keyblock; 67*54925bf6Swillf extern krb5_principal master_princ; 68*54925bf6Swillf #endif 6956a424ccSmp153739 extern krb5_boolean dbactive; 7056a424ccSmp153739 extern int exit_status; 7156a424ccSmp153739 extern krb5_context util_context; 7256a424ccSmp153739 extern kadm5_config_params global_params; 7356a424ccSmp153739 extern int valid_master_key; 7456a424ccSmp153739 extern krb5_db_entry master_db; 75*54925bf6Swillf extern char **db5util_db_args; 76*54925bf6Swillf extern int db5util_db_args_size; 77*54925bf6Swillf extern int add_db_arg(char *arg); 787c478bd9Sstevel@tonic-gate 7956a424ccSmp153739 extern void usage(void); 8056a424ccSmp153739 8156a424ccSmp153739 extern void add_key 82505d05c7Sgtb (char const *, char const *, 837c478bd9Sstevel@tonic-gate krb5_const_principal, const krb5_keyblock *, 84505d05c7Sgtb krb5_kvno, krb5_keysalt *); 8556a424ccSmp153739 extern int set_dbname_help 86505d05c7Sgtb (char *, char *); 877c478bd9Sstevel@tonic-gate 8856a424ccSmp153739 extern char *kdb5_util_Init (int, char **); 897c478bd9Sstevel@tonic-gate 9056a424ccSmp153739 extern int quit (void); 917c478bd9Sstevel@tonic-gate 9256a424ccSmp153739 extern int check_for_match 93505d05c7Sgtb (char *, int, krb5_db_entry *, int, int); 947c478bd9Sstevel@tonic-gate 9556a424ccSmp153739 extern void parse_token 96505d05c7Sgtb (char *, int *, int *, char *); 977c478bd9Sstevel@tonic-gate 9856a424ccSmp153739 extern int create_db_entry (krb5_principal, krb5_db_entry *); 9956a424ccSmp153739 10056a424ccSmp153739 extern int kadm5_create_magic_princs (kadm5_config_params *params, 10156a424ccSmp153739 krb5_context context); 10256a424ccSmp153739 10356a424ccSmp153739 extern int process_ov_principal (char *fname, krb5_context kcontext, 10456a424ccSmp153739 FILE *filep, int verbose, 105*54925bf6Swillf int *linenop); 10656a424ccSmp153739 10756a424ccSmp153739 extern void load_db (int argc, char **argv); 10856a424ccSmp153739 extern void dump_db (int argc, char **argv); 10956a424ccSmp153739 extern void kdb5_create (int argc, char **argv); 11056a424ccSmp153739 extern void kdb5_destroy (int argc, char **argv); 11156a424ccSmp153739 extern void kdb5_stash (int argc, char **argv); 11256a424ccSmp153739 11356a424ccSmp153739 extern void update_ok_file (char *file_name); 11456a424ccSmp153739 11556a424ccSmp153739 extern int kadm5_create (kadm5_config_params *params); 11656a424ccSmp153739 11756a424ccSmp153739 void usage (void); 1187c478bd9Sstevel@tonic-gate 1197c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1207c478bd9Sstevel@tonic-gate } 1217c478bd9Sstevel@tonic-gate #endif 1227c478bd9Sstevel@tonic-gate 1237c478bd9Sstevel@tonic-gate #endif /* !_KDB5_UTIL_H */ 124