for (i=0, a=e->e_attrs; a; i++, a=a->a_next) {
attrs[i] = (LDAPMod *)ch_malloc(sizeof(LDAPMod));
attrs[i]->mod_op = LDAP_MOD_BVALUES;
- attrs[i]->mod_type = a->a_type;
+ attrs[i]->mod_type = a->a_desc->ad_cname->bv_val;
attrs[i]->mod_vals.modv_bvals = a->a_vals;
}