1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.h */ 3 /* Copyright (c) 2004-2005, Novell, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are met: 8 * 9 * * Redistributions of source code must retain the above copyright notice, 10 * this list of conditions and the following disclaimer. 11 * * Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * * The copyright holder's name is not used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30 #define BUFF_LEN 64 /* Max len of enctype string */ 31 #define MAX_PRINC_SIZE 256 32 33 enum ap_op { 34 NULL_KEY, /* setup null keys */ 35 MASTER_KEY, /* use master key as new key */ 36 TGT_KEY /* special handling for tgt key */ 37 }; 38 39 struct realm_info { 40 krb5_deltat max_life; 41 krb5_deltat max_rlife; 42 krb5_timestamp expiration; 43 krb5_flags flags; 44 krb5_keyblock *key; 45 krb5_int32 nkslist; 46 krb5_key_salt_tuple *kslist; 47 }; 48 49 struct iterate_args { 50 krb5_context ctx; 51 struct realm_info *rblock; 52 krb5_db_entry *dbentp; 53 }; 54 55 extern void kdb5_ldap_create(int argc, char **argv); 56 extern void kdb5_ldap_destroy(int argc, char **argv); 57 extern void kdb5_ldap_modify(int argc, char **argv); 58 extern void kdb5_ldap_view(int argc, char **argv); 59 extern void kdb5_ldap_list(int argc, char **argv); 60