int rc;
char *msg = NULL;
- if (get_relax(op)) {
+ if (get_relax(op) || SLAPD_SYNC_IS_SYNCCONN( op->o_connid )) {
return SLAP_CB_CONTINUE;
}
unsigned ca;
int j;
- if ( cp->set )
- return 0;
-
for ( j = 0; cp->ap[j]; j++ ) {
/* Get this attribute count */
if ( target_entry )
ca = m->sml_numvals;
switch ( m->sml_op ) {
case LDAP_MOD_DELETE:
+ case SLAP_MOD_SOFTDEL:
if ( !ca || ca > ce ) {
ce = 0;
} else {
break;
case LDAP_MOD_ADD:
+ case SLAP_MOD_SOFTADD:
ce += ca;
break;
ce = ca;
break;
+#if 0
+ /* TODO */
+ case handle SLAP_MOD_ADD_IF_NOT_PRESENT:
+#endif
+
default:
/* impossible! assert? */
return 1;
int rc;
char *msg = NULL;
int is_v;
- int first = 1;
- if (get_relax(op)) {
+ if (get_relax(op) || SLAPD_SYNC_IS_SYNCCONN( op->o_connid )) {
return SLAP_CB_CONTINUE;
}
return(rs->sr_err);
}
+ op->o_bd = on->on_info->oi_origdb;
+ rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &target_entry );
+ op->o_bd = be;
+
+ /* let the backend send the error */
+ if ( target_entry == NULL )
+ return SLAP_CB_CONTINUE;
+
/* Do we need to count attributes? */
for(cp = c; cp; cp = cp->ap_next) {
- if (cp->count != 0 || cp->set || cp->restrict_lud != 0) {
- if (first) {
- op->o_bd = on->on_info->oi_origdb;
- rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &target_entry );
- op->o_bd = be;
- first = 0;
- }
+ if (cp->count != 0) {
if (rc != 0 || target_entry == NULL) {
Debug(LDAP_DEBUG_TRACE,
"==> constraint_update rc = %d DN=\"%s\"%s\n",
goto mod_violation;
}
+ if (cp->restrict_lud && constraint_check_restrict(op, cp, target_entry) == 0) {
+ continue;
+ }
+
is_v = constraint_check_count_violation(m, target_entry, cp);
Debug(LDAP_DEBUG_TRACE,