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 #pragma ident "%Z%%M% %I% %E% SMI" 36 37 #include "ldap_misc.h" 38 39 #define MAX_DN_CHARS 256 40 #define HOST_INFO_DELIMITER '#' 41 #define PROTOCOL_STR_LEN 3 42 #define PROTOCOL_NUM_UDP 0 43 #define PROTOCOL_NUM_TCP 1 44 #define PROTOCOL_DEFAULT_KDC PROTOCOL_NUM_UDP 45 #define PROTOCOL_DEFAULT_ADM PROTOCOL_NUM_TCP 46 #define PROTOCOL_DEFAULT_PWD PROTOCOL_NUM_UDP 47 #define PORT_STR_LEN 5 48 #define PORT_DEFAULT_KDC 88 49 #define PORT_DEFAULT_ADM 749 50 #define PORT_DEFAULT_PWD 464 51 52 #define MAX_LEN 1024 53 #define MAX_SERVICE_PASSWD_LEN 256 54 #define RANDOM_PASSWD_LEN 128 55 56 /* Solaris Kerberos: default for the service_passwd file is in osconf.h */ 57 #if 0 58 #define DEF_SERVICE_PASSWD_FILE "/usr/local/var/service_passwd" 59 #endif 60 61 struct data{ 62 int len; 63 unsigned char *value; 64 }; 65 66 extern int enc_password(struct data pwd, struct data *enc_key, struct data *enc_pass); 67 extern int tohex(krb5_data, krb5_data *); 68 69 extern void kdb5_ldap_create_service (int argc, char **argv); 70 extern void kdb5_ldap_modify_service (int argc, char **argv); 71 extern void kdb5_ldap_destroy_service(int argc, char **argv); 72 extern void kdb5_ldap_list_services(int argc, char **argv); 73 extern void kdb5_ldap_view_service(int argc, char **argv); 74 extern int kdb5_ldap_set_service_password(int argc, char **argv); 75 extern void kdb5_ldap_set_service_certificate(int argc, char **argv); 76 extern void print_service_params(krb5_ldap_service_params *lserparams, int mask); 77 extern krb5_error_code convert_realm_name2dn_list(char **list, const char *krbcontainer_loc); 78 extern void kdb5_ldap_stash_service_password(int argc, char **argv); 79 80 #endif /* _KDB5_LDAP_SERVICES_H_ */ 81