.B [\-o name[=value]
.B [\-q]
.B [\-s]
+.B [\-S SID]
.B [\-u]
.B [\-v]
.B [\-w]
partial replica. Loading normal objects which do not conform to
schema may result in unexpected and ill behavior.
.TP
+.B \-S " SID"
+Server ID to use in generated entryCSN. Also used for contextCSN
+if `\-w' is set as well. Defaults to 0.
+.TP
.B \-u
enable dry-run (don't write to backend) mode.
.TP
int rc = EXIT_SUCCESS;
int manage = 0;
+ /* default "000" */
+ csnsid = 0;
+
slap_tool_init( progname, SLAPADD, argc, argv );
memset( &opbuf, 0, sizeof(opbuf) );
nvals[1].bv_len = 0;
nvals[1].bv_val = NULL;
- csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), 0, 0 );
+ csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), csnsid, 0 );
csn.bv_val = csnbuf;
timestamp.bv_val = timebuf;
switch( tool ) {
case SLAPADD:
- options = "b:cd:f:F:gj:l:n:o:qstuvw";
+ options = "b:cd:f:F:gj:l:n:o:qsS:tuvw";
break;
case SLAPCAT:
realm = optarg;
break;
+ case 'S':
+ if ( lutil_atoul( &csnsid, optarg )
+ || csnsid > SLAP_SYNC_SID_MAX )
+ {
+ usage( tool, progname );
+ }
+ break;
+
case 's': /* dump subtree */
if ( tool == SLAPADD )
mode |= SLAP_TOOL_NO_SCHEMA_CHECK;
slap_ssf_t tv_tls_ssf;
slap_ssf_t tv_sasl_ssf;
unsigned tv_dn_mode;
+ unsigned int tv_csnsid;
} tool_vars;
extern tool_vars tool_globals;
#define tls_ssf tool_globals.tv_tls_ssf
#define sasl_ssf tool_globals.tv_sasl_ssf
#define dn_mode tool_globals.tv_dn_mode
+#define csnsid tool_globals.tv_csnsid
#define SLAP_TOOL_LDAPDN_PRETTY SLAP_LDAPDN_PRETTY
#define SLAP_TOOL_LDAPDN_NORMAL (SLAP_LDAPDN_PRETTY << 1)