1 /* modify.c - monitor backend modify routine */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 2001-2004 The OpenLDAP Foundation.
6 * Portions Copyright 2001-2003 Pierangelo Masarati.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted only as authorized by the OpenLDAP
13 * A copy of this license is available in file LICENSE in the
14 * top-level directory of the distribution or, alternatively, at
15 * <http://www.OpenLDAP.org/license.html>.
18 * This work was initially developed by Pierangelo Masarati for inclusion
19 * in OpenLDAP Software.
26 #include <ac/string.h>
27 #include <ac/socket.h>
30 #include "back-monitor.h"
31 #include "proto-back-monitor.h"
34 monitor_back_modify( Operation *op, SlapReply *rs )
41 Modifications *modlist
45 struct monitorinfo *mi
46 = (struct monitorinfo *) op->o_bd->be_private;
51 LDAP_LOG( BACK_MON, ENTRY, "monitor_back_modify: enter\n", 0, 0, 0 );
53 Debug(LDAP_DEBUG_ARGS, "monitor_back_modify:\n", 0, 0, 0);
56 /* acquire and lock entry */
57 monitor_cache_dn2entry( op, &op->o_req_ndn, &e, &matched );
59 rs->sr_err = LDAP_NO_SUCH_OBJECT;
61 rs->sr_matched = matched->e_name.bv_val;
63 send_ldap_result( op, rs );
64 if ( matched != NULL ) {
65 rs->sr_matched = NULL;
66 monitor_cache_release( mi, matched );
71 if ( !acl_check_modlist( op, e, op->oq_modify.rs_modlist )) {
72 rc = LDAP_INSUFFICIENT_ACCESS;
74 rc = monitor_entry_modify( op, e );
78 send_ldap_result( op, rs );
80 monitor_cache_release( mi, e );