~ubuntu-branches/ubuntu/oneiric/likewise-open/oneiric

« back to all changes in this revision

Viewing changes to krb5/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_util.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Salley
  • Date: 2010-11-22 12:06:00 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20101122120600-8lba1fpceot71wlb
Tags: 6.0.0.53010-1
Likewise Open 6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * kadmin/ldap_util/kdb5_ldap_util.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 "kdb_ldap.h"
 
33
#include "kdb5_ldap_realm.h"
 
34
#include "kdb5_ldap_services.h"
 
35
#include "kdb5_ldap_policy.h"
 
36
 
 
37
#define MAIN_HELP            -1
 
38
#define CREATE_REALM          1
 
39
#define MODIFY_REALM          2
 
40
#define VIEW_REALM            3
 
41
#define DESTROY_REALM         4
 
42
#define LIST_REALM            5
 
43
 
 
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
 
51
#else
 
52
# define STASH_SRV_PW          17
 
53
#endif
 
54
 
 
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
 
60
 
 
61
extern char *progname;
 
62
 
 
63
extern int exit_status;
 
64
extern krb5_context util_context;
 
65
 
 
66
extern void usage(void);
 
67
extern void db_usage(int);
 
68
 
 
69
#define ARG_VAL (--argc > 0 ? (koptarg = *(++argv)) : (char *)(db_usage(MAIN_HELP), NULL))
 
70
 
 
71
/* Following are the bitmaps that indicate which of the options among -D, -w, -h, -p & -t
 
72
 * were specified on the command line.
 
73
 */
 
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 */
 
78
 
 
79
#define MAX_PASSWD_LEN          1024
 
80
#define MAX_PASSWD_PROMPT_LEN   276     /* max_dn_size(=256) + strlen("Password for \" \"")=20 */