and only seeks to control the \fIadd\fP and \fIreplace\fP values
of \fImodify\fP and \fIrename\fP requests.
.LP
-No constraints are applied for operations performed with the
+Constraints can be lifted for operations where the
.I relax
-control set.
+control is set and the user has
+.B manage
+privileges to the relevant attribute.
.SH CONFIGURATION
These
.B slapd.conf
Any attempt to add or modify an attribute named as part of the
constraint overlay specification which does not fit the
constraint listed will fail with a
-LDAP_CONSTRAINT_VIOLATION error.
+LDAP_CONSTRAINT_VIOLATION error unless the
+.I relax
+control was set and the user has
+.B manage
+privilege on the attribute in question.
.SH EXAMPLES
.LP
.RS
int rc = 0;
char *msg = NULL;
- if ( get_relax(op) || be_shadow_update( op ) ) {
+ if ( be_shadow_update( op ) ) {
return SLAP_CB_CONTINUE;
}
continue;
}
+ /* No need to check if user asked to Relax this op and has MANAGE
+ * access to the attribute */
+ if ( get_relax(op) && access_allowed( op, op->ora_e, a->a_desc,
+ NULL, ACL_MANAGE, NULL ) ) {
+ continue;
+ }
+
Debug(LDAP_DEBUG_TRACE,
"==> constraint_add, "
"a->a_numvals = %u, cp->count = %lu\n",
static int
-constraint_check_count_violation( Modifications *m, Entry *target_entry, constraint *cp )
+constraint_check_count_violation( Operation *op, Modifications *m, Entry
+ *target_entry, constraint *cp )
{
BerVarray b = NULL;
unsigned ce = 0;
}
}
if ( ce > cp->count ) {
+ if ( get_relax(op) && access_allowed( op, target_entry, cp->ap[j],
+ NULL, ACL_MANAGE, NULL ) ) {
+ continue;
+ }
return 1;
}
}
char *msg = NULL;
int is_v;
- if ( get_relax(op) || be_shadow_update( op ) ) {
+ if ( be_shadow_update( op ) ) {
return SLAP_CB_CONTINUE;
}
continue;
}
- is_v = constraint_check_count_violation(m, target_entry, cp);
+ is_v = constraint_check_count_violation(op, m, target_entry, cp);
Debug(LDAP_DEBUG_TRACE,
"==> constraint_update is_v: %d\n", is_v );
if ((( b = m->sml_values ) == NULL ) || (b[0].bv_val == NULL))
continue;
+ /* No need to check if user asked to Relax this op and has MANAGE
+ * access to the attribute */
+ if ( get_relax(op) && access_allowed( op, target_entry, m->sml_desc,
+ NULL, ACL_MANAGE, NULL ) ) {
+ continue;
+ }
+
for(cp = c; cp; cp = cp->ap_next) {
int j;
for (j = 0; cp->ap[j]; j++) {