OpenLDAP 2.3 Change Log
OpenLDAP 2.3.9 Engineering
+ Fixed slapd req_pwdexop bug
+ Fixed slapo-syncprov queued UUIDs bug (ITS#4068)
+ Fixed slapo-syncprov memory leak
+ Fixed slapd anlist leak
+ Removed lint
Build Environment
+ Updated testsuite to test only primary backends by default
Disable test041-aci
OpenLDAP 2.3.8 Release
char **attrs;
ObjectClass *oc;
- attrs = anlist2charray( anlist, 1 );
-
+ if ( anlist == NULL )
+ return NULL;
+
for ( i = 0; anlist[i].an_name.bv_val; i++ ) {
if ( ( oc = anlist[i].an_oc ) ) {
for ( j = 0; oc->soc_required && oc->soc_required[j]; j++ ) ;
if ( i == 0 )
return NULL;
+ attrs = anlist2charray( anlist, 1 );
+
n = i;
if ( k )
i = 0;
while ( attrs && attrs[i] ) {
if ( *attrs[i] == '@' ) {
+ ch_free( attrs[i] );
for ( j = i; attrs[j]; j++ ) {
- if ( j == i )
- ch_free( attrs[i] );
attrs[j] = attrs[j+1];
}
} else {
j = i + 1;
while ( attrs && attrs[j] ) {
if ( !strcmp( attrs[i], attrs[j] )) {
+ ch_free( attrs[j] );
for ( k = j; attrs && attrs[k]; k++ ) {
- if ( k == j )
- ch_free( attrs[j] );
attrs[k] = attrs[k+1];
}
} else {
#define SLAP_SOCK_IS_MUTE(s) (!SLAP_SOCK_IS_READ(s))
#define SLAP_SOCK_SET_INIT \
- slap_daemon.sd_epolls = ch_malloc(sizeof(struct epoll_event) * dtblsize * 2); \
+ slap_daemon.sd_epolls = ch_calloc(1, sizeof(struct epoll_event) * dtblsize * 2); \
slap_daemon.sd_index = ch_malloc(sizeof(int) * dtblsize); \
slap_daemon.sd_epfd = epoll_create( dtblsize ); \
for (i=0; i<dtblsize; i++) slap_daemon.sd_index[i] = -1
"csn=%s,rid=%03d", csn->bv_val, rid );
}
}
- ber_str2bv( cookiestr, strlen(cookiestr), 1, cookie );
+ ber_str2bv_x( cookiestr, strlen(cookiestr), 1, cookie,
+ op ? op->o_tmpmemctx : NULL );
}
void
a_uuid.a_nvals = &opc->suuid;
rs.sr_err = syncprov_state_ctrl( op, &rs, &e_uuid,
mode, ctrls, 0, 1, &cookie );
+ op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
rs.sr_ctrls = ctrls;
op->o_bd->bd_info = (BackendInfo *)on->on_info;
sr->s_dn.bv_len = opc->sdn.bv_len;
sr->s_mode = mode;
sr->s_isreference = opc->sreference;
- sr->s_ndn.bv_val = lutil_strcopy( sr->s_dn.bv_val, opc->sdn.bv_val );
+ sr->s_ndn.bv_val = lutil_strcopy( sr->s_dn.bv_val,
+ opc->sdn.bv_val ) + 1;
sr->s_ndn.bv_len = opc->sndn.bv_len;
- *(sr->s_ndn.bv_val++) = '\0';
- sr->s_uuid.bv_val = lutil_strcopy( sr->s_ndn.bv_val, opc->sndn.bv_val );
+ sr->s_uuid.bv_val = lutil_strcopy( sr->s_ndn.bv_val,
+ opc->sndn.bv_val ) + 1;
sr->s_uuid.bv_len = opc->suuid.bv_len;
- *(sr->s_uuid.bv_val++) = '\0';
- sr->s_csn.bv_val = lutil_strcopy( sr->s_uuid.bv_val, opc->suuid.bv_val );
+ AC_MEMCPY( sr->s_uuid.bv_val, opc->suuid.bv_val, opc->suuid.bv_len );
+ sr->s_csn.bv_val = sr->s_uuid.bv_val + sr->s_uuid.bv_len + 1;
sr->s_csn.bv_len = opc->sctxcsn.bv_len;
strcpy( sr->s_csn.bv_val, opc->sctxcsn.bv_val );
rs->sr_err = syncprov_done_ctrl( op, rs, rs->sr_ctrls,
0, 1, &cookie, ss->ss_present ? LDAP_SYNC_REFRESH_PRESENTS :
LDAP_SYNC_REFRESH_DELETES );
+ op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
} else {
/* It's RefreshAndPersist, transition to Persist phase */
syncprov_sendinfo( op, rs, ( ss->ss_present && rs->sr_nentries ) ?
LDAP_TAG_SYNC_REFRESH_PRESENT : LDAP_TAG_SYNC_REFRESH_DELETE,
&cookie, 1, NULL, 0 );
+ op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
/* Detach this Op from frontend control */
ldap_pvt_thread_mutex_lock( &ss->ss_so->s_mutex );
return LDAP_STRONG_AUTH_REQUIRED;
}
+ qpw->rs_old.bv_len = 0;
qpw->rs_old.bv_val = NULL;
+ qpw->rs_new.bv_len = 0;
qpw->rs_new.bv_val = NULL;
qpw->rs_mods = NULL;
qpw->rs_modtail = NULL;
} req_extended_s;
typedef struct req_pwdexop_s {
- struct berval rs_reqoid;
- int rs_flags;
+ struct req_extended_s rs_extended;
struct berval rs_old;
struct berval rs_new;
Modifications *rs_mods;
j = 0;
while ( exattrs[j] != NULL ) {
if ( !strcmp( exattrs[j], sync_descs[i]->ad_cname.bv_val )) {
+ ch_free( exattrs[j] );
for ( k = j; exattrs[k] != NULL; k++ ) {
- if ( k == j )
- ch_free( exattrs[k] );
exattrs[k] = exattrs[k+1];
}
} else {
while ( oc->soc_required[k] ) {
if ( !strcmp( exattrs[i],
oc->soc_required[k]->sat_cname.bv_val )) {
+ ch_free( exattrs[i] );
for ( l = i; exattrs[l]; l++ ) {
- if ( l == i )
- ch_free( exattrs[i] );
exattrs[l] = exattrs[l+1];
}
} else {
BUILD_LDBM=@BUILD_LDBM@
BUILD_SQL=@BUILD_SQL@
+# test primary backends (default)
test tests:
@$(MAKE) bdb
@$(MAKE) hdb
+
+# test all backends
+alltests: tests
@$(MAKE) ldbm
@$(MAKE) sql