From a4277ba3e181d189534c5f9d75b11df61866fb19 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 28 May 2000 21:45:49 +0000 Subject: [PATCH] SLAPD_SCHEMA_NOT_COMPAT: copy mod op --- servers/slapd/modify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index 58e5ba7daa..af40315e35 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -310,6 +310,9 @@ int slap_modlist2mods( mod = (Modifications *) ch_calloc( 1, sizeof(Modifications) ); + /* copy the op */ + mod->sml_op = ml->ml_op; + /* convert to attribute description */ rc = slap_str2ad( ml->ml_type, &mod->sml_desc, text ); @@ -379,7 +382,7 @@ int slap_modlist2mods( * a rough single value check... an additional check is needed * to catch add of single value to existing single valued attribute */ - if( ( ml->ml_op == LDAP_MOD_ADD || ml->ml_op == LDAP_MOD_REPLACE ) + if( ( mod->sml_op == LDAP_MOD_ADD || mod->sml_op == LDAP_MOD_REPLACE ) && nvals > 1 && is_at_single_value( ad->ad_type )) { slap_mods_free( mod ); -- 2.39.5