Path: blob/main/crypto/krb5/src/kadmin/dbutil/kdb5_util.h
34907 views
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */1/* kadmin/dbutil/kdb5_util.h */2/*3* Copyright 1992, 2008, 2009 by the Massachusetts Institute of Technology.4* All Rights Reserved.5*6* Export of this software from the United States of America may7* require a specific license from the United States Government.8* It is the responsibility of any person or organization contemplating9* export to obtain such a license before exporting.10*11* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and12* distribute this software and its documentation for any purpose and13* without fee is hereby granted, provided that the above copyright14* notice appear in all copies and that both that copyright notice and15* this permission notice appear in supporting documentation, and that16* the name of M.I.T. not be used in advertising or publicity pertaining17* to distribution of the software without specific, written prior18* permission. Furthermore if you modify this software you must label19* your software as modified software and not distribute it in such a20* fashion that it might be confused with the original M.I.T. software.21* M.I.T. makes no representations about the suitability of22* this software for any purpose. It is provided "as is" without express23* or implied warranty.24*/2526#include <kdb_log.h>2728#define REALM_SEP '@'29#define REALM_SEP_STR "@"3031extern char *progname;32#ifndef V4_DECLARES_STATIC33extern krb5_keyblock master_keyblock;34extern krb5_principal master_princ;35#endif36extern krb5_boolean dbactive;37extern int exit_status;38extern krb5_context util_context;39extern kadm5_config_params global_params;40extern int valid_master_key;41extern krb5_db_entry master_db;42extern char **db5util_db_args;43extern size_t db5util_db_args_size;44extern krb5_kvno new_mkvno;45extern krb5_keyblock new_master_keyblock;46extern int add_db_arg(char *arg);4748extern void usage(void);4950extern void add_key51(char const *, char const *,52krb5_const_principal, const krb5_keyblock *,53krb5_kvno, krb5_keysalt *);54extern int set_dbname_help55(char *, char *);5657extern char *kdb5_util_Init (int, char **);5859extern int quit (void);6061extern int check_for_match62(char *, int, krb5_db_entry *, int, int);6364extern void parse_token65(char *, int *, int *, char *);6667extern int create_db_entry (krb5_principal, krb5_db_entry *);6869extern int kadm5_create_magic_princs (kadm5_config_params *params,70krb5_context context);7172extern int process_ov_principal (krb5_context kcontext, const char *fname,73FILE *filep, krb5_boolean verbose,74int *linenop);7576extern void load_db (int argc, char **argv);77extern void dump_db (int argc, char **argv);78extern void kdb5_create (int argc, char **argv);79extern void kdb5_destroy (int argc, char **argv);80extern void kdb5_stash (int argc, char **argv);81extern void kdb5_add_mkey (int argc, char **argv);82extern void kdb5_use_mkey (int argc, char **argv);83extern void kdb5_list_mkeys (int argc, char **argv);84extern void kdb5_update_princ_encryption (int argc, char **argv);85extern void tabdump (int argc, char **argv);8687extern krb5_error_code master_key_convert(krb5_context context,88krb5_db_entry *db_entry);89extern void kdb5_purge_mkeys (int argc, char **argv);9091extern int kadm5_create (kadm5_config_params *params);9293extern krb5_error_code add_new_mkey(krb5_context, krb5_db_entry *,94krb5_keyblock *, krb5_kvno);9596extern krb5_kvno get_next_kvno(krb5_context, krb5_db_entry *);9798void usage (void);99100101