]> git.sur5r.net Git - openldap/commitdiff
Allow overlays to override operational attributes on add (needed
authorLuke Howard <lukeh@openldap.org>
Sun, 31 Jul 2005 05:19:37 +0000 (05:19 +0000)
committerLuke Howard <lukeh@openldap.org>
Sun, 31 Jul 2005 05:19:37 +0000 (05:19 +0000)
to preserve 2.2 SLAPI behaviour; see comments for further info)

servers/slapd/add.c

index 392a6c68e2df48f899ac59a710b491a75283326e..d0fcef1dbed7ffbbc13ba20799f2b8e763080884 100644 (file)
@@ -418,6 +418,17 @@ slap_mods2entry(
 #ifdef SLURPD_FRIENDLY
                        ber_len_t i,j;
 
+                       if ( !initial ) {
+                               /*      
+                                * This check allows overlays to override operational
+                                * attributes by setting them directly in the entry.
+                                * We assume slap_mods_no_user_mod_check() was called
+                                * with the user modifications.
+                                */
+                               *text = NULL;
+                               return LDAP_SUCCESS;
+                       }
+
                        for( i=0; attr->a_vals[i].bv_val; i++ ) {
                                /* count them */
                        }