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