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

question about exclusion control of slapd



Hi,
I'm reading the source code of slapd 2.4.21, then I found feel uneasy
point.

in servers/slapd/bind.c:207

cleanup:
    if ( rs->sr_err == LDAP_SUCCESS ) {
        if ( op->orb_method != LDAP_AUTH_SASL ) {
            ber_dupbv( &op->o_conn->c_authmech, &mech );
        }
        op->o_conn->c_authtype = op->orb_method;
    }

I think that this operation need mutex lock as follows.

ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
...
ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );

Regards,

-- 
Open Source Solution Technology Corporation
Tsukasa Hamano <hamano@osstech.co.jp>
fingerprint = 2285 2111 6D34 3816 3C2E  A5B9 16BE D101 6069 BE55