#define FILTER_ESCAPE(c) ( (c) == '*' || (c) == '\\' \
|| (c) == '(' || (c) == ')' || !ASCII_PRINTABLE(c) )
+#define DN_ESCAPE(c) ((c) == SLAP_ESCAPE_CHAR)
#define DN_SEPARATOR(c) ((c) == ',' || (c) == ';')
#define RDN_ATTRTYPEANDVALUE_SEPARATOR(c) ((c) == '+') /* RFC 2253 */
#define RDN_SEPARATOR(c) (DN_SEPARATOR(c) || RDN_ATTRTYPEANDVALUE_SEPARATOR(c))
#define SLAP_INDEX_SUBSTR_MAXLEN 4
#define SLAP_INDEX_SUBSTR_STEP 2
-#define SLAP_INDEX_FLAGS 0xF000UL
-#define SLAP_INDEX_SUBTYPES 0x1000UL /* use index with subtypes */
-#define SLAP_INDEX_AUTO_SUBTYPES 0x2000UL /* use mask with subtypes */
-#define SLAP_INDEX_LANG 0x4000UL /* use index with lang subtypes */
-#define SLAP_INDEX_AUTO_LANG 0x8000UL /* use mask with lang subtypes */
+#define SLAP_INDEX_FLAGS 0xF000UL
+#define SLAP_INDEX_NOSUBTYPES 0x1000UL /* don't use index w/ subtypes */
+#define SLAP_INDEX_NOLANG 0x2000UL /* don't use index w/ lang */
+#define SLAP_INDEX_AUTO_SUBTYPES 0x4000UL /* use mask with lang subtypes */
/*
* there is a single index for each attribute. these prefixes ensure
#define SLAP_MR_SUBSTR_ANY ( SLAP_MR_SUBSTR | 0x0020U )
#define SLAP_MR_SUBSTR_FINAL ( SLAP_MR_SUBSTR | 0x0040U )
-/* this is used to kludge objectClass testing */
-#define SLAP_MR_MODIFY_MATCHING 0x0001U
-/* are we matching from a mr asserted value or a real value */
-#define SLAP_MR_VALUE_IS_IN_MR_SYNTAX 0x0002U
+/*
+ * normally the provided value is expected to conform to
+ * assertion syntax specified in the matching rule, however
+ * at times (such as during individual value modification),
+ * the provided value is expected to conform to the
+ * attribute's value syntax.
+ */
+#define SLAP_MR_ASSERTION_SYNTAX_MATCH 0x0000U
+#define SLAP_MR_VALUE_SYNTAX_MATCH 0x0001U
+#define SLAP_MR_VALUE_SYNTAX_CONVERTED_MATCH 0x0003U
+
+#define SLAP_IS_MR_ASSERTION_SYNTAX_MATCH( usage ) \
+ (!((usage) & SLAP_MR_VALUE_SYNTAX_MATCH))
+#define SLAP_IS_MR_VALUE_SYNTAX_MATCH( usage ) \
+ ((usage) & SLAP_MR_VALUE_SYNTAX_MATCH)
+
+#define SLAP_IS_MR_VALUE_SYNTAX_CONVERTED_MATCH( usage ) \
+ (((usage) & SLAP_MR_VALUE_SYNTAX_CONVERTED_MATCH) \
+ == SLAP_MR_VALUE_SYNTAX_CONVERTED_MATCH)
+#define SLAP_IS_MR_VALUE_SYNTAX_NONCONVERTED_MATCH( usage ) \
+ (((usage) & SLAP_MR_VALUE_SYNTAX_CONVERTED_MATCH) \
+ == SLAP_MR_VALUE_SYNTAX_MATCH)
Syntax *smr_syntax;
slap_mr_convert_func *smr_convert;
/* operational attribute descriptions */
AttributeDescription *si_ad_structuralObjectClass;
+ AttributeDescription *si_ad_entryUUID;
+ AttributeDescription *si_ad_entryCSN;
AttributeDescription *si_ad_creatorsName;
AttributeDescription *si_ad_createTimestamp;
AttributeDescription *si_ad_modifiersName;
struct berval *ma_value; /* required */
} MatchingRuleAssertion;
-
/*
* represents a search filter
*/
#define SLAPD_FILTER_DN_ONE ((ber_tag_t) -2)
#define SLAPD_FILTER_DN_SUBTREE ((ber_tag_t) -3)
-
union f_un_u {
/* precomputed result */
ber_int_t f_un_result;
int lm_type; /* type of pattern */
#define SLAP_LIMITS_UNDEFINED 0x0000
#define SLAP_LIMITS_EXACT 0x0001
-#define SLAP_LIMITS_REGEX 0x0002
-#define SLAP_LIMITS_ANONYMOUS 0x0003
- regex_t lm_dn_regex; /* regex-based size and time limits */
- char *lm_dn_pat; /* ndn for EXACT; pattern for REGEX */
+#define SLAP_LIMITS_BASE SLAP_LIMITS_EXACT
+#define SLAP_LIMITS_ONE 0x0002
+#define SLAP_LIMITS_SUBTREE 0x0003
+#define SLAP_LIMITS_CHILDREN 0x0004
+#define SLAP_LIMITS_REGEX 0x0005
+#define SLAP_LIMITS_ANONYMOUS 0x0006
+#define SLAP_LIMITS_USERS 0x0007
+ regex_t lm_dn_regex; /* regex data for REGEX */
+ struct berval *lm_dn_pat; /* ndn for EXACT, BASE, ONE, SUBTREE,
+ * CHILDREN; pattern for REGEX; NULL
+ * for ANONYMOUS, USERS */
struct slap_limits_set lm_limits;
};