2
* kadmin/ldap_util/kdb5_ldap_util.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.
33
#include "kdb5_ldap_realm.h"
34
#include "kdb5_ldap_services.h"
35
#include "kdb5_ldap_policy.h"
38
#define CREATE_REALM 1
39
#define MODIFY_REALM 2
41
#define DESTROY_REALM 4
44
#ifdef HAVE_EDIRECTORY
45
# define CREATE_SERVICE 6
46
# define MODIFY_SERVICE 7
47
# define VIEW_SERVICE 8
48
# define DESTROY_SERVICE 9
49
# define LIST_SERVICE 10
50
# define SET_SRV_PW 16
52
# define STASH_SRV_PW 17
55
#define CREATE_POLICY 11
56
#define MODIFY_POLICY 12
57
#define VIEW_POLICY 13
58
#define DESTROY_POLICY 14
59
#define LIST_POLICY 15
61
extern char *progname;
63
extern int exit_status;
64
extern krb5_context util_context;
66
extern void usage(void);
67
extern void db_usage(int);
69
#define ARG_VAL (--argc > 0 ? (koptarg = *(++argv)) : (char *)(db_usage(MAIN_HELP), NULL))
71
/* Following are the bitmaps that indicate which of the options among -D, -w, -h, -p & -t
72
* were specified on the command line.
74
#define CMD_LDAP_D 0x1 /* set if -D option is specified */
75
#define CMD_LDAP_W 0x2 /* set if -w option is specified */
76
#define CMD_LDAP_H 0x4 /* set if -h option is specified */
77
#define CMD_LDAP_P 0x8 /* set if -p option is specified */
79
#define MAX_PASSWD_LEN 1024
80
#define MAX_PASSWD_PROMPT_LEN 276 /* max_dn_size(=256) + strlen("Password for \" \"")=20 */