From: Kurt Zeilenga Date: Fri, 6 Jan 2006 20:03:00 +0000 (+0000) Subject: Fixed slapd-bdb reindexing via cn=config not noticed issue (ITS#4260) X-Git-Tag: OPENLDAP_REL_ENG_2_3_16~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8bea8be026a36a972f56d8ae37e1cfa436dd236b;p=openldap Fixed slapd-bdb reindexing via cn=config not noticed issue (ITS#4260) Fixed slapd-monitor connection search crash (ITS#4300) Flapd slapd cn=config bad ACL syntax modfy crash (ITS#4306) Fixed slapd ACL/suffix configuration issue (ITS#4307) Added slapd-bdb(5) cachefree description --- diff --git a/CHANGES b/CHANGES index 679e46e4ca..d1b4e5d185 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,14 @@ OpenLDAP 2.3 Change Log OpenLDAP 2.3.16 Engineering + Fixed slapd-bdb reindexing via cn=config not noticed issue (ITS#4260) + Fixed slapd-monitor connection search crash (ITS#4300) + Flapd slapd cn=config bad ACL syntax modfy crash (ITS#4306) + Fixed slapd ACL/suffix configuration issue (ITS#4307) Build environment Replace sched_yield(2) on Linux with select(2) (ITS#3950) + Documentation + Added slapd-bdb(5) cachefree description OpenLDAP 2.3.15 Release Fixed slapd strerror logging bug (ITS#4292) diff --git a/doc/man/man5/slapd-bdb.5 b/doc/man/man5/slapd-bdb.5 index 0452ee5067..85d3b890f3 100644 --- a/doc/man/man5/slapd-bdb.5 +++ b/doc/man/man5/slapd-bdb.5 @@ -46,6 +46,11 @@ Specify the size in entries of the in-memory entry cache maintained by the \fBbdb\fP or \fBhdb\fP backend database instance. The default is 1000 entries. .TP +.BI cachefree \ +Specify the number of entries to free from the entry cache when the +cache reaches the \fBcachesize\fP limit. +The default is 1 entry. +.TP .BI checkpoint \ \ Specify the frequency for checkpointing the database transaction log. A checkpoint operation flushes the database buffers to disk and writes diff --git a/servers/slapd/aclparse.c b/servers/slapd/aclparse.c index 26eb739f4d..64abc4c394 100644 --- a/servers/slapd/aclparse.c +++ b/servers/slapd/aclparse.c @@ -1983,44 +1983,49 @@ parse_acl( } if ( be != NULL ) { - if ( !BER_BVISNULL( &be->be_nsuffix[ 1 ] ) ) { + if ( be->be_nsuffix == NULL ) { Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " - "scope checking only applies to single-valued " - "suffix databases\n", + "scope checking needs suffix before ACLs.\n", fname, lineno, 0 ); /* go ahead, since checking is not authoritative */ - } - - switch ( check_scope( be, a ) ) { - case ACL_SCOPE_UNKNOWN: - Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " - "cannot assess the validity of the ACL scope within " - "backend naming context\n", - fname, lineno, 0 ); - break; - - case ACL_SCOPE_WARN: + } else if ( !BER_BVISNULL( &be->be_nsuffix[ 1 ] ) ) { Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " - "ACL could be out of scope within backend naming context\n", + "scope checking only applies to single-valued " + "suffix databases\n", fname, lineno, 0 ); - break; + /* go ahead, since checking is not authoritative */ + } else { + switch ( check_scope( be, a ) ) { + case ACL_SCOPE_UNKNOWN: + Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " + "cannot assess the validity of the ACL scope within " + "backend naming context\n", + fname, lineno, 0 ); + break; - case ACL_SCOPE_PARTIAL: - Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " - "ACL appears to be partially out of scope within " - "backend naming context\n", - fname, lineno, 0 ); - break; + case ACL_SCOPE_WARN: + Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " + "ACL could be out of scope within backend naming context\n", + fname, lineno, 0 ); + break; - case ACL_SCOPE_ERR: - Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " - "ACL appears to be out of scope within " - "backend naming context\n", - fname, lineno, 0 ); - break; + case ACL_SCOPE_PARTIAL: + Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " + "ACL appears to be partially out of scope within " + "backend naming context\n", + fname, lineno, 0 ); + break; + + case ACL_SCOPE_ERR: + Debug( LDAP_DEBUG_ACL, "%s: line %d: warning: " + "ACL appears to be out of scope within " + "backend naming context\n", + fname, lineno, 0 ); + break; - default: - break; + default: + break; + } } acl_append( &be->be_acl, a, pos ); diff --git a/servers/slapd/back-bdb/config.c b/servers/slapd/back-bdb/config.c index 01de9ec201..dd7feee8d1 100644 --- a/servers/slapd/back-bdb/config.c +++ b/servers/slapd/back-bdb/config.c @@ -272,7 +272,9 @@ bdb_online_index( void *ctx, void *arg ) } for ( i = 0; i < bdb->bi_nattrs; i++ ) { - if ( bdb->bi_attrs[ i ]->ai_indexmask & BDB_INDEX_DELETING ) { + if ( bdb->bi_attrs[ i ]->ai_indexmask & BDB_INDEX_DELETING + || bdb->bi_attrs[ i ]->ai_newmask == 0 ) + { continue; } bdb->bi_attrs[ i ]->ai_indexmask = bdb->bi_attrs[ i ]->ai_newmask; diff --git a/servers/slapd/back-monitor/conn.c b/servers/slapd/back-monitor/conn.c index 749cfd78cf..d8686e8ad0 100644 --- a/servers/slapd/back-monitor/conn.c +++ b/servers/slapd/back-monitor/conn.c @@ -547,6 +547,7 @@ monitor_subsys_conn_create( char *next = NULL; static struct berval nconn_bv = BER_BVC( "cn=connection " ); + rc = LDAP_NO_SUCH_OBJECT; /* create exactly the required entry; * the normalized DN must start with "cn=connection ", diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 840c79074c..da0637d062 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -3701,6 +3701,7 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs, ca->bi = ce->ce_bi; ca->private = ce->ce_private; ca->ca_entry = e; + ca->fname = "slapd"; strcpy( ca->log, "back-config" ); for (ml = op->orm_modlist; ml; ml=ml->sml_next) {