X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-monitor%2Fmodify.c;h=e095492a853a871d0a17d7d09ed61d9e19249f60;hb=966cef8c9a3238efe0c482ad0ee08fd98944d112;hp=0fe61e2b46acec739d81f47137f8022af2aa9524;hpb=b109d018eb2afd2f48bc7d37170479727a51651b;p=openldap diff --git a/servers/slapd/back-monitor/modify.c b/servers/slapd/back-monitor/modify.c index 0fe61e2b46..e095492a85 100644 --- a/servers/slapd/back-monitor/modify.c +++ b/servers/slapd/back-monitor/modify.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2001-2005 The OpenLDAP Foundation. + * Copyright 2001-2011 The OpenLDAP Foundation. * Portions Copyright 2001-2003 Pierangelo Masarati. * All rights reserved. * @@ -41,19 +41,16 @@ monitor_back_modify( Operation *op, SlapReply *rs ) Debug(LDAP_DEBUG_ARGS, "monitor_back_modify:\n", 0, 0, 0); /* acquire and lock entry */ - monitor_cache_dn2entry( op, &op->o_req_ndn, &e, &matched ); + monitor_cache_dn2entry( op, rs, &op->o_req_ndn, &e, &matched ); if ( e == NULL ) { rs->sr_err = LDAP_NO_SUCH_OBJECT; if ( matched ) { -#ifdef SLAP_ACL_HONOR_DISCLOSE if ( !access_allowed_mask( op, matched, slap_schema.si_ad_entry, NULL, ACL_DISCLOSE, NULL, NULL ) ) { /* do nothing */ ; - } else -#endif /* SLAP_ACL_HONOR_DISCLOSE */ - { + } else { rs->sr_matched = matched->e_dn; } } @@ -65,13 +62,16 @@ monitor_back_modify( Operation *op, SlapReply *rs ) return rs->sr_err; } - if ( !acl_check_modlist( op, e, op->oq_modify.rs_modlist )) { + if ( !acl_check_modlist( op, e, op->orm_modlist )) { rc = LDAP_INSUFFICIENT_ACCESS; + } else { - rc = monitor_entry_modify( op, e ); + assert( !SLAP_SHADOW( op->o_bd ) ); + slap_mods_opattrs( op, &op->orm_modlist, 0 ); + + rc = monitor_entry_modify( op, rs, e ); } -#ifdef SLAP_ACL_HONOR_DISCLOSE if ( rc != LDAP_SUCCESS ) { if ( !access_allowed_mask( op, e, slap_schema.si_ad_entry, NULL, ACL_DISCLOSE, NULL, NULL ) ) @@ -79,7 +79,6 @@ monitor_back_modify( Operation *op, SlapReply *rs ) rc = LDAP_NO_SUCH_OBJECT; } } -#endif /* SLAP_ACL_HONOR_DISCLOSE */ rs->sr_err = rc; send_ldap_result( op, rs );