X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fmodify.c;h=2710ffe79969d1491d9aec60b0311fed60495063;hb=eb3e92481bfbc655164e5c66aa3499a4315ac6ea;hp=d0282b16e6039ca45b70e5303eab6cd78aaf2624;hpb=e8c2414831e73d4b09eaf340f3052c572edaf9a1;p=openldap diff --git a/servers/slapd/modify.c b/servers/slapd/modify.c index d0282b16e6..2710ffe799 100644 --- a/servers/slapd/modify.c +++ b/servers/slapd/modify.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2007 The OpenLDAP Foundation. + * Copyright 1998-2009 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -268,6 +268,7 @@ fe_op_modify( Operation *op, SlapReply *rs ) if ( op->orm_increment && !SLAP_INCREMENT( op->o_bd ) ) { send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM, "modify/increment not supported in context" ); + goto cleanup; } /* @@ -383,6 +384,10 @@ slap_mods_no_user_mod_check( continue; } + if ( ml->sml_flags & SLAP_MOD_INTERNAL ) { + continue; + } + if ( get_relax( op ) ) { if ( ml->sml_desc->ad_type->sat_flags & SLAP_AT_MANAGEABLE ) { ml->sml_flags |= SLAP_MOD_MANAGING; @@ -585,6 +590,7 @@ int slap_mods_check( ml->sml_values[nvals] = pval; } } + ml->sml_values[nvals].bv_len = 0; ml->sml_numvals = nvals; /* @@ -802,7 +808,7 @@ slap_sort_vals( } } done: - if ( i >= 0 ) + if ( match == 0 && i >= 0 ) *dup = ix[i]; /* For sorted attributes, put the values in index order */