1 /* 2 * kadmin/ldap_util/kdb5_ldap_services.h 3 */ 4 5 /* Copyright (c) 2004-2005, Novell, Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions are met: 10 * 11 * * Redistributions of source code must retain the above copyright notice, 12 * this list of conditions and the following disclaimer. 13 * * Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * * The copyright holder's name is not used to endorse or promote products 17 * derived from this software without specific prior written permission. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 #ifndef _KDB5_LDAP_SERVICES_H_ 33 #define _KDB5_LDAP_SERVICES_H_ 34 35 #include "ldap_misc.h" 36 37 #define MAX_DN_CHARS 256 38 #define HOST_INFO_DELIMITER '#' 39 #define PROTOCOL_STR_LEN 3 40 #define PROTOCOL_NUM_UDP 0 41 #define PROTOCOL_NUM_TCP 1 42 #define PROTOCOL_DEFAULT_KDC PROTOCOL_NUM_UDP 43 #define PROTOCOL_DEFAULT_ADM PROTOCOL_NUM_TCP 44 #define PROTOCOL_DEFAULT_PWD PROTOCOL_NUM_UDP 45 #define PORT_STR_LEN 5 46 #define PORT_DEFAULT_KDC 88 47 #define PORT_DEFAULT_ADM 749 48 #define PORT_DEFAULT_PWD 464 49 50 #define MAX_LEN 1024 51 #define MAX_SERVICE_PASSWD_LEN 256 52 #define RANDOM_PASSWD_LEN 128 53 54 /* Solaris Kerberos: default for the service_passwd file is in osconf.h */ 55 #if 0 56 #define DEF_SERVICE_PASSWD_FILE "/usr/local/var/service_passwd" 57 #endif 58 59 struct data{ 60 int len; 61 unsigned char *value; 62 }; 63 64 extern int enc_password(struct data pwd, struct data *enc_key, struct data *enc_pass); 65 extern int tohex(krb5_data, krb5_data *); 66 67 extern void kdb5_ldap_create_service (int argc, char **argv); 68 extern void kdb5_ldap_modify_service (int argc, char **argv); 69 extern void kdb5_ldap_destroy_service(int argc, char **argv); 70 extern void kdb5_ldap_list_services(int argc, char **argv); 71 extern void kdb5_ldap_view_service(int argc, char **argv); 72 extern int kdb5_ldap_set_service_password(int argc, char **argv); 73 extern void kdb5_ldap_set_service_certificate(int argc, char **argv); 74 extern void print_service_params(krb5_ldap_service_params *lserparams, int mask); 75 extern krb5_error_code convert_realm_name2dn_list(char **list, const char *krbcontainer_loc); 76 extern void kdb5_ldap_stash_service_password(int argc, char **argv); 77 78 #endif /* _KDB5_LDAP_SERVICES_H_ */ 79