1 /* slapcommon.h - common definitions for the slap tools */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2004 The OpenLDAP Foundation.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
12 * A copy of this license is available in the file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
18 #define SLAPCOMMON_H_ 1
24 SLAPADD=1, /* LDIF -> database tool */
25 SLAPCAT, /* database -> LDIF tool */
26 SLAPDN, /* DN check w/ syntax tool */
27 SLAPINDEX, /* database index tool */
28 SLAPPASSWD, /* password generation tool */
29 SLAPTEST, /* slapd.conf test tool */
30 SLAPAUTH, /* test authz-regexp and authc/authz stuff */
31 SLAPACL, /* test acl */
35 #define SLAP_TOOL_CTXCSN_KEEP 0
36 #define SLAP_TOOL_CTXCSN_ENTRY 1
37 #define SLAP_TOOL_CTXCSN_BATCH 2
39 typedef struct tool_vars {
43 int tv_retrieve_ctxcsn;
44 int tv_retrieve_synccookie;
45 int tv_replica_promotion;
46 int tv_replica_demotion;
47 char *tv_replica_id_string;
48 char **tv_replica_id_strlist;
49 int *tv_replica_id_list;
51 int tv_nosubordinates;
53 struct berval tv_sub_ndn;
55 struct berval tv_authcDN;
56 struct berval tv_baseDN;
57 struct berval tv_authcID;
58 struct berval tv_authzID;
61 extern tool_vars tool_globals;
63 #define be tool_globals.tv_be
64 #define verbose tool_globals.tv_verbose
65 #define update_ctxcsn tool_globals.tv_update_ctxcsn
66 #define retrieve_ctxcsn tool_globals.tv_retrieve_ctxcsn
67 #define retrieve_synccookie tool_globals.tv_retrieve_synccookie
68 #define replica_promotion tool_globals.tv_replica_promotion
69 #define replica_demotion tool_globals.tv_replica_demotion
70 #define replica_id_string tool_globals.tv_replica_id_string
71 #define replica_id_strlist tool_globals.tv_replica_id_strlist
72 #define replica_id_list tool_globals.tv_replica_id_list
73 #define continuemode tool_globals.tv_continuemode
74 #define nosubordinates tool_globals.tv_nosubordinates
75 #define dryrun tool_globals.tv_dryrun
76 #define sub_ndn tool_globals.tv_sub_ndn
77 #define ldiffp tool_globals.tv_ldiffp
78 #define authcDN tool_globals.tv_authcDN
79 #define baseDN tool_globals.tv_baseDN
80 #define authcID tool_globals.tv_authcID
81 #define authzID tool_globals.tv_authzID
83 void slap_tool_init LDAP_P((
86 int argc, char **argv ));
88 void slap_tool_destroy LDAP_P((void));
90 #endif /* SLAPCOMMON_H_ */