#define IA5StringApproxIndexer approxIndexer
#define IA5StringApproxFilter approxFilter
+/* Change Sequence Number (CSN) - much of this will change */
+#define csnValidate blobValidate
+#define csnMatch octetStringMatch
+#define csnOrderingMatch octetStringOrderingMatch
+#define csnIndexer generalizedTimeIndexer
+#define csnFilter generalizedTimeFilter
+
unsigned int index_substr_if_minlen = SLAP_INDEX_SUBSTR_IF_MINLEN_DEFAULT;
unsigned int index_substr_if_maxlen = SLAP_INDEX_SUBSTR_IF_MAXLEN_DEFAULT;
unsigned int index_substr_any_len = SLAP_INDEX_SUBSTR_ANY_LEN_DEFAULT;
bvtmp.bv_len = sizeof(tmp);
bvtmp.bv_val = tmp;
- keys = slap_sl_malloc( sizeof( struct berval ) * 2, ctx );
-
/* GeneralizedTime YYYYmmddHH[MM[SS]][(./,)d...](Z|(+/-)HH[MM]) */
- assert(value->bv_val != NULL && value->bv_len >= 10);
/* Use 40 bits of time for key */
- if ( lutil_parsetime( value->bv_val, &tm ) == 0 ) {
+ if ( value->bv_val && value->bv_len >= 10 &&
+ lutil_parsetime( value->bv_val, &tm ) == 0 ) {
+
lutil_tm2time( &tm, &tt );
tmp[0] = tt.tt_gsec & 0xff;
tmp[4] = tt.tt_sec & 0xff;
tt.tt_sec >>= 8;
tmp[1] = tt.tt_sec & 0xff;
+ keys = slap_sl_malloc( sizeof( struct berval ) * 2, ctx );
ber_dupbv_x(keys, &bvtmp, ctx );
+ keys[1].bv_val = NULL;
+ keys[1].bv_len = 0;
} else {
- keys[0].bv_val = NULL;
- keys[0].bv_len = 0;
+ keys = NULL;
}
- keys[1].bv_val = NULL;
- keys[1].bv_len = 0;
-
*keysp = keys;
return LDAP_SUCCESS;
{"( 1.2.36.79672281.1.5.0 DESC 'RDN' )",
0, rdnValidate, rdnPretty},
#ifdef LDAP_COMP_MATCH
- {"( 1.2.36.79672281.1.5.3 DESC 'allComponents' )",
- 0, allComponentsValidate, NULL},
+ {"( 1.2.36.79672281.1.5.3 DESC 'allComponents' )",
+ 0, allComponentsValidate, NULL},
{"( 1.2.36.79672281.1.5.2 DESC 'componentFilterMatch assertion') ",
0, componentFilterValidate, NULL},
#endif
{"( 1.3.6.1.4.1.4203.666.2.6 DESC 'UUID' )",
SLAP_SYNTAX_HIDE, UUIDValidate, NULL},
+ {"( 1.3.6.1.4.1.4203.666.11.2.1 DESC 'CSN' )",
+ SLAP_SYNTAX_HIDE, csnValidate, NULL},
+
/* OpenLDAP Void Syntax */
{"( 1.3.6.1.4.1.4203.1.1.1 DESC 'OpenLDAP void' )" ,
SLAP_SYNTAX_HIDE, inValidate, NULL},
NULL, NULL , allComponentsMatch,
octetStringIndexer, octetStringFilter,
NULL },
+
+ {"( 1.2.36.79672281.1.13.7 NAME 'directoryComponentsMatch' "
+ "SYNTAX 1.2.36.79672281.1.5.3 )",
+ SLAP_MR_EQUALITY|SLAP_MR_EXT|SLAP_MR_COMPONENT, NULL,
+ NULL, NULL , directoryComponentsMatch,
+ octetStringIndexer, octetStringFilter,
+ NULL },
#endif
{"( 2.5.13.2 NAME 'caseIgnoreMatch' "
octetStringIndexer, octetStringFilter,
"UUIDMatch"},
+ {"( 1.3.6.1.4.1.4203.666.11.2.2 NAME 'CSNMatch' "
+ "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1 )",
+ SLAP_MR_HIDE | SLAP_MR_EQUALITY | SLAP_MR_ORDERED_INDEX, NULL,
+ NULL, NULL, csnMatch,
+ csnIndexer, csnFilter,
+ NULL},
+
+ {"( 1.3.6.1.4.1.4203.666.11.2.3 NAME 'CSNOrderingMatch' "
+ "SYNTAX 1.3.6.1.4.1.4203.666.11.2.1 )",
+ SLAP_MR_HIDE | SLAP_MR_ORDERING | SLAP_MR_ORDERED_INDEX, NULL,
+ NULL, NULL, csnOrderingMatch,
+ NULL, NULL,
+ "CSNMatch" },
+
{NULL, SLAP_MR_NONE, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL }