1 /* 2 * lib/kdb/kdb_ldap/ldap_services.h 3 * 4 * Copyright (c) 2004-2005, Novell, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: 9 * 10 * * Redistributions of source code must retain the above copyright notice, 11 * this list of conditions and the following disclaimer. 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * * The copyright holder's name is not used to endorse or promote products 16 * derived from this software without specific prior written permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31 #ifndef _LDAP_SERVICE_H 32 #define _LDAP_SERVICE_H 1 33 34 #pragma ident "%Z%%M% %I% %E% SMI" 35 36 /* service specific mask */ 37 #define LDAP_SERVICE_SERVICEFLAG 0x0001 38 #define LDAP_SERVICE_HOSTSERVER 0x0002 39 #define LDAP_SERVICE_REALMREFERENCE 0x0004 40 41 /* service type mask */ 42 #define LDAP_KDC_SERVICE 0x0001 43 #define LDAP_ADMIN_SERVICE 0x0002 44 #define LDAP_PASSWD_SERVICE 0x0004 45 46 /* rights mask */ 47 #define LDAP_SUBTREE_RIGHTS 0x0001 48 #define LDAP_REALM_RIGHTS 0x0002 49 50 /* Types of service flags */ 51 #define SERVICE_FLAGS_AUTO_RESTART 0x0001 52 #define SERVICE_FLAGS_CHECK_ADDRESSES 0x0002 53 #define SERVICE_FLAGS_UNIXTIME_OLD_PATYPE 0x0004 54 55 /* Service protocol type */ 56 #define SERVICE_PROTOCOL_TYPE_UDP "0" 57 #define SERVICE_PROTOCOL_TYPE_TCP "1" 58 59 typedef struct _krb5_ldap_service_params { 60 char *servicedn; 61 int servicetype; 62 int krbserviceflags; 63 char **krbhostservers; 64 char **krbrealmreferences; 65 krb5_tl_data *tl_data; 66 } krb5_ldap_service_params; 67 68 #ifdef HAVE_EDIRECTORY 69 70 krb5_error_code 71 krb5_ldap_read_service( krb5_context, char *, krb5_ldap_service_params **, int *); 72 73 krb5_error_code 74 krb5_ldap_create_service( krb5_context, krb5_ldap_service_params *,int); 75 76 krb5_error_code 77 krb5_ldap_modify_service( krb5_context, krb5_ldap_service_params *, int); 78 79 krb5_error_code 80 krb5_ldap_delete_service( krb5_context, krb5_ldap_service_params *, char *); 81 82 krb5_error_code 83 krb5_ldap_list_services( krb5_context, char *, char ***); 84 85 krb5_error_code 86 krb5_ldap_free_service( krb5_context, krb5_ldap_service_params *); 87 88 89 krb5_error_code 90 krb5_ldap_set_service_passwd( krb5_context, char *, char *); 91 92 krb5_error_code 93 krb5_ldap_add_service_rights( krb5_context, int, char *, char *, char **, int); 94 95 krb5_error_code 96 krb5_ldap_delete_service_rights( krb5_context, int, char *, char *, char **, int); 97 #endif 98 99 #endif 100