~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/plugins/kdb/ldap/ldap_util/kdb5_ldap_services.h

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman, Russ Allbery, Sam Hartman
  • Date: 2008-08-21 10:41:41 UTC
  • mfrom: (11.1.15 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080821104141-a0f9c4o4cpo8xd0o
Tags: 1.6.dfsg.4~beta1-4
[ Russ Allbery ]
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #487669, #491774)
  - Italian, thanks Luca Monducci.  (Closes: #493962)

[ Sam Hartman ]
* Translation Updates:
    - Dutch, Thanks Vincent Zweije, Closes: #495733

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * kadmin/ldap_util/kdb5_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
#include "ldap_misc.h"
 
33
 
 
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
 
46
 
 
47
#define MAX_LEN                 1024
 
48
#define MAX_SERVICE_PASSWD_LEN  256
 
49
#define RANDOM_PASSWD_LEN       128
 
50
 
 
51
#define DEF_SERVICE_PASSWD_FILE "/usr/local/var/service_passwd"
 
52
 
 
53
struct data{
 
54
    int len;
 
55
    unsigned char *value;
 
56
};
 
57
 
 
58
extern int enc_password(struct data pwd, struct data *enc_key, struct data *enc_pass);
 
59
extern int tohex(krb5_data, krb5_data *);
 
60
 
 
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);
 
71