]> git.sur5r.net Git - openldap/commitdiff
permissive modify/increment support
authorKurt Zeilenga <kurt@openldap.org>
Mon, 13 Feb 2006 21:22:46 +0000 (21:22 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 13 Feb 2006 21:22:46 +0000 (21:22 +0000)
CHANGES
servers/slapd/mods.c

diff --git a/CHANGES b/CHANGES
index 5ed46b03babf25e640974643085992c3042ae2aa..cc0f507a612b62682636e6a62bb53fccfa2ea1f7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,7 @@ OpenLDAP 2.3.20 Engineering
        Fixed slapd non-read/write epoll event handling (ITS#4395)
        Fixed slapd syncrepl de-normalize UUID issue
        Added slapd syncrepl log messages (ITS#4369)
+       Added slapd permissive modify/increment support
        Fixed slapd connectionless LDAP support
        Fixed slapd-bdb/hdb wake listener on runqueue submit (ITS#4385)
        Fixed slapo-auditlog crash (ITS#4394)
index 76bb81f51ea2a70cd5081f5ca0507bbe5ec4dc71..f1dbdffcb804468ef7db1ad83b7d3e8358aeeae0 100644 (file)
@@ -377,11 +377,19 @@ modify_increment_values(
 
        a = attr_find( e->e_attrs, mod->sm_desc );
        if( a == NULL ) {
-               *text = textbuf;
-               snprintf( textbuf, textlen,
-                       "modify/increment: %s: no such attribute",
-                       mod->sm_desc->ad_cname.bv_val );
-               return LDAP_NO_SUCH_ATTRIBUTE;
+               if ( permissive ) {
+                       Modification modReplace = *mod;
+
+                       modReplace.sm_op = LDAP_MOD_REPLACE;
+
+                       return modify_add_values(e, &modReplace, permissive, text, textbuf, textlen);
+               } else {
+                       *text = textbuf;
+                       snprintf( textbuf, textlen,
+                               "modify/increment: %s: no such attribute",
+                               mod->sm_desc->ad_cname.bv_val );
+                       return LDAP_NO_SUCH_ATTRIBUTE;
+               }
        }
 
        if ( !strcmp( a->a_desc->ad_type->sat_syntax_oid, SLAPD_INTEGER_SYNTAX )) {