#define SB_TLS_ON 1
#define SB_TLS_CRITICAL 2
+enum slaptool {
+ SLAPADD=1, /* LDIF -> database tool */
+ SLAPCAT, /* database -> LDIF tool */
+ SLAPDN, /* DN check w/ syntax tool */
+ SLAPINDEX, /* database index tool */
+ SLAPMODIFY, /* database modify tool */
+ SLAPPASSWD, /* password generation tool */
+ SLAPSCHEMA, /* schema checking tool */
+ SLAPTEST, /* slapd.conf test tool */
+ SLAPAUTH, /* test authz-regexp and authc/authz stuff */
+ SLAPACL, /* test acl */
+ SLAPLAST
+};
+
+LDAP_SLAPD_V(enum slaptool) slapTool;
+
typedef struct slap_keepalive {
int sk_idle;
int sk_probes;
#include "ldif.h"
tool_vars tool_globals;
+enum slaptool slapTool;
#ifdef CSRIMALLOC
static char *leakfilename;
* initialize stuff and figure out which backend we're dealing with
*/
+ slapTool = tool;
rc = slap_init( mode, progname );
if ( rc != 0 ) {
fprintf( stderr, "%s: slap_init failed!\n", progname );
#define SLAPD_TOOLS 1
#include "slap.h"
-enum slaptool {
- SLAPADD=1, /* LDIF -> database tool */
- SLAPCAT, /* database -> LDIF tool */
- SLAPDN, /* DN check w/ syntax tool */
- SLAPINDEX, /* database index tool */
- SLAPMODIFY, /* database modify tool */
- SLAPPASSWD, /* password generation tool */
- SLAPSCHEMA, /* schema checking tool */
- SLAPTEST, /* slapd.conf test tool */
- SLAPAUTH, /* test authz-regexp and authc/authz stuff */
- SLAPACL, /* test acl */
- SLAPLAST
-};
-
typedef struct tool_vars {
Backend *tv_be;
int tv_dbnum;
#include <lutil_sha1.h>
#include "ldap_defaults.h"
+
#include "slap.h"
+#include "slap-config.h"
+#include "slapcommon.h"
-static int verbose = 0;
static char *modulepath = NULL;
static char *moduleload = NULL;
usage ( progname );
}
}
+ slapTool = SLAPPASSWD;
if( argc - optind != 0 ) {
usage( progname );
int requestBSF = 0;
int doBSF = 0;
- slap_tool_init( progname, SLAPCAT, argc, argv );
+ slap_tool_init( progname, SLAPSCHEMA, argc, argv );
requestBSF = ( sub_ndn.bv_len || filter );