2
* kadmin/ldap_util/kdb5_services.h
5
/* Copyright (c) 2004-2005, Novell, Inc.
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions are met:
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.
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.
32
#include "ldap_misc.h"
34
#define MAX_DN_CHARS 256
35
#define HOST_INFO_DELIMITER '#'
36
#define PROTOCOL_STR_LEN 3
37
#define PROTOCOL_NUM_UDP 0
38
#define PROTOCOL_NUM_TCP 1
39
#define PROTOCOL_DEFAULT_KDC PROTOCOL_NUM_UDP
40
#define PROTOCOL_DEFAULT_ADM PROTOCOL_NUM_TCP
41
#define PROTOCOL_DEFAULT_PWD PROTOCOL_NUM_UDP
42
#define PORT_STR_LEN 5
43
#define PORT_DEFAULT_KDC 88
44
#define PORT_DEFAULT_ADM 749
45
#define PORT_DEFAULT_PWD 464
48
#define MAX_SERVICE_PASSWD_LEN 256
49
#define RANDOM_PASSWD_LEN 128
51
#define DEF_SERVICE_PASSWD_FILE "/usr/local/var/service_passwd"
58
extern int enc_password(struct data pwd, struct data *enc_key, struct data *enc_pass);
59
extern int tohex(krb5_data, krb5_data *);
61
extern void kdb5_ldap_create_service (int argc, char **argv);
62
extern void kdb5_ldap_modify_service (int argc, char **argv);
63
extern void kdb5_ldap_destroy_service(int argc, char **argv);
64
extern void kdb5_ldap_list_services(int argc, char **argv);
65
extern void kdb5_ldap_view_service(int argc, char **argv);
66
extern int kdb5_ldap_set_service_password(int argc, char **argv);
67
extern void kdb5_ldap_set_service_certificate(int argc, char **argv);
68
extern void print_service_params(krb5_ldap_service_params *lserparams, int mask);
69
extern krb5_error_code convert_realm_name2dn_list(char **list, const char *krbcontainer_loc);
70
extern void kdb5_ldap_stash_service_password(int argc, char **argv);