]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
ITS#1716 is_entry_subentr/ies/y/
[openldap] / servers / slapd / modify.c
index e644a898b9c22ddb1cfc7041f6f7fd5ec3a8a3b6..62a6a6da30923e25208f619afaf15711e9b7ecf8 100644 (file)
@@ -117,9 +117,11 @@ do_modify(
                }
 
                mod = (Modifications *) ch_malloc( sizeof(Modifications) );
+               mod->sml_op = mop;
                mod->sml_type = tmp.sml_type;
                mod->sml_bvalues = tmp.sml_bvalues;
                mod->sml_desc = NULL;
+               mod->sml_next =NULL;
                *modtail = mod;
 
                switch( mop ) {
@@ -166,7 +168,6 @@ do_modify(
                        }
                }
 
-               mod->sml_op = mop;
                modtail = &mod->sml_next;
        }
        *modtail = NULL;
@@ -449,6 +450,15 @@ int slap_mods_check(
                        return LDAP_UNDEFINED_TYPE;
                }
 
+               if( slap_ad_is_lang_range( ad )) {
+                       /* attribute requires binary transfer */
+                       snprintf( textbuf, textlen,
+                               "%s: inappropriate use of language range option",
+                               ml->sml_type.bv_val );
+                       *text = textbuf;
+                       return LDAP_UNDEFINED_TYPE;
+               }
+
                if (!update && is_at_no_user_mod( ad->ad_type )) {
                        /* user modification disallowed */
                        snprintf( textbuf, textlen,