[Date Prev][Date Next] [Chronological] [Thread] [Top]

slapo-nops, empty operations and slapo-accesslog



Hello

If all the modifications are removed by slapo-nops, I end up with
op->orm_modlist == NULL. slapo-nops will attempt to cancel the
operation, with this code:
        if ((m = op->orm_modlist) == NULL) {
                op->o_bd->bd_info = (BackendInfo *)(on->on_info);
                send_ldap_error(op, rs, LDAP_SUCCESS, "");
                return(rs->sr_err); 
        }

But if slapo-accesslog is also configured, slapd will exit with an
assertion:
assertion "a->a_vals[0].bv_val != NULL" failed: file "schema_check.c",
line 89, function "entry_schema_check"

Here is the offending code:
        /* misc attribute checks */ 
        for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
                const char *type = a->a_desc->ad_cname.bv_val;
 
                /* there should be at least one value */ 
                assert( a->a_vals != NULL );
                assert( a->a_vals[0].bv_val != NULL );

Here is the backtrace

#0  0xbb81823f in kill () from /lib/libc.so.12
#1  0xbb8b4a64 in abort () from /lib/libc.so.12
#2  0xbb876dde in __assert13 () from /lib/libc.so.12
#3  0x0809edcf in entry_schema_check ()
#4  0x080ff6f7 in bdb_add ()
#5  0x081394e0 in accesslog_initialize ()
#6  0x080cb535 in glue_sub_add ()
#7  0x0807f979 in slap_req2res ()
#8  0x0808221b in slap_read_controls ()
#9  0x08082c9d in slap_send_ldap_result ()
#10 0xbb76ab3c in nops_modify () from /usr/pkg/lib/openldap/nops.so.0
#11 0x080cb6e3 in overlay_op_walk ()
#12 0x080cbc7c in overlay_destroy_one ()
#13 0x080877b7 in fe_op_modify ()
#14 0x08087ecd in do_modify ()
#15 0x080724fd in connection_hangup ()
#16 0x08072acc in connection_hangup ()
#17 0xbbbb8c3f in ldap_int_thread_pool_wrapper ()
   from /usr/pkg/lib/libldap_r-2.4.so.2
#18 0xbb8e762d in pthread_join () from /usr/lib/libpthread.so.0
#19 0xbb839a2c in swapcontext () from /lib/libc.so.12


Peeking with gdb, I can see the problem is with attribute reqOld having
a NULL value.

I would say that slapo-nops does not cancel the proper way, since
slapo-accesslog still think it has something to log. Any idea?

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@netbsd.org