From aeade1fb3b66d7945e2034437fc9ff9b71bb5fef Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 1 Sep 2005 18:16:51 +0000 Subject: [PATCH] Sync changes from yesterday --- CHANGES | 5 +++++ doc/man/man8/slapadd.8 | 7 +++++-- doc/man/man8/slapcat.8 | 3 +++ doc/man/man8/slapindex.8 | 3 +++ libraries/libldap_r/tpool.c | 15 +++++++++------ servers/slapd/slapacl.c | 2 +- servers/slapd/slapadd.c | 6 +++++- 7 files changed, 31 insertions(+), 10 deletions(-) diff --git a/CHANGES b/CHANGES index 0271e62fad..4fda00acce 100644 --- a/CHANGES +++ b/CHANGES @@ -19,11 +19,16 @@ OpenLDAP 2.3.7 Release Fixed slaptest cn=config segfault (ITS#3961) Fixed slaptools logging issue (ITS#3937) Fixed slaptools fails after db clean (ITS#3970) + Fixed slaptools reject unsupported -w (ITS#3939) + Fixed libldap global_opt failure Fixed libldap schema handling Fixed libldap secprops parsing (ITS#3955) + Fixed libldap_r tpool (ITS#3925) Updated liblutil password scheme check Updated libldap schema to allow OID macros in syntaxes Removed lint + Documentation + Updated misc. man pages Build Environment Updated build tools (ITS#3928) Fixed tests diff -u usage (ITS#3969) diff --git a/doc/man/man8/slapadd.8 b/doc/man/man8/slapadd.8 index bc496a3c54..03412881d7 100644 --- a/doc/man/man8/slapadd.8 +++ b/doc/man/man8/slapadd.8 @@ -25,8 +25,11 @@ is used to add entries specified in LDAP Directory Interchange Format database. It opens the given database determined by the database number or suffix and adds entries corresponding to the provided LDIF to -the database. The LDIF input is read from standard input or -the specified file. +the database. +Subordinate databases glued with +.BR slapo-glue (5) +are also updated. +The LDIF input is read from standard input or the specified file. .LP As .B slapadd diff --git a/doc/man/man8/slapcat.8 b/doc/man/man8/slapcat.8 index d6eb2ff77f..70954fe663 100644 --- a/doc/man/man8/slapcat.8 +++ b/doc/man/man8/slapcat.8 @@ -27,6 +27,9 @@ database. It opens the given database determined by the database number or suffix and writes the corresponding LDIF to standard output or the specified file. +Subordinate databases glued with +.BR slapo-glue (5) +are also output. .LP The LDIF generated by this tool is suitable for use with .BR slapadd (8). diff --git a/doc/man/man8/slapindex.8 b/doc/man/man8/slapindex.8 index 453735c024..63f7d1a17d 100644 --- a/doc/man/man8/slapindex.8 +++ b/doc/man/man8/slapindex.8 @@ -24,6 +24,9 @@ indices based upon the current contents of a database. It opens the given database determined by the database number or suffix and updates the indices for all values of all attributes of all entries. +Subordinate databases glued with +.BR slapo-glue (5) +are also re-indexed. .SH OPTIONS .TP .B \-v diff --git a/libraries/libldap_r/tpool.c b/libraries/libldap_r/tpool.c index 440b5a75e5..d65d9c40b6 100644 --- a/libraries/libldap_r/tpool.c +++ b/libraries/libldap_r/tpool.c @@ -29,12 +29,12 @@ #ifndef LDAP_THREAD_HAVE_TPOOL -enum ldap_int_thread_pool_state { +typedef enum ldap_int_thread_pool_state_e { LDAP_INT_THREAD_POOL_RUNNING, LDAP_INT_THREAD_POOL_FINISHING, LDAP_INT_THREAD_POOL_STOPPING, LDAP_INT_THREAD_POOL_PAUSING -}; +} ldap_int_thread_pool_state_t; typedef struct ldap_int_thread_key_s { void *ltk_key; @@ -79,7 +79,7 @@ struct ldap_int_thread_pool_s { LDAP_STAILQ_HEAD(tcq, ldap_int_thread_ctx_s) ltp_pending_list; LDAP_SLIST_HEAD(tcl, ldap_int_thread_ctx_s) ltp_free_list; LDAP_SLIST_HEAD(tclq, ldap_int_thread_ctx_s) ltp_active_list; - long ltp_state; + ldap_int_thread_pool_state_t ltp_state; long ltp_max_count; long ltp_max_pending; long ltp_pending_count; @@ -193,7 +193,7 @@ ldap_pvt_thread_pool_init ( return(0); } -#define TID_HASH(tid, hash) do { int i; \ +#define TID_HASH(tid, hash) do { unsigned i; \ unsigned char *ptr = (unsigned char *)&(tid); \ for (i=0, hash=0; iltp_state == LDAP_INT_THREAD_POOL_RUNNING) + if (pool->ltp_state == LDAP_INT_THREAD_POOL_RUNNING + || pool->ltp_state == LDAP_INT_THREAD_POOL_PAUSING) + { ldap_pvt_thread_cond_wait(&pool->ltp_cond, &pool->ltp_mutex); + } continue; } @@ -540,7 +543,7 @@ ldap_pvt_thread_pool_pause ( ldap_pvt_thread_mutex_lock(&pool->ltp_mutex); /* If someone else has already requested a pause, we have to wait */ - if (pool->ltp_state == LDAP_INT_THREAD_POOL_PAUSING) { + while (pool->ltp_state == LDAP_INT_THREAD_POOL_PAUSING) { pool->ltp_pending_count++; pool->ltp_active_count--; ldap_pvt_thread_cond_wait(&pool->ltp_cond, &pool->ltp_mutex); diff --git a/servers/slapd/slapacl.c b/servers/slapd/slapacl.c index 925127d057..7e2b50e58d 100644 --- a/servers/slapd/slapacl.c +++ b/servers/slapd/slapacl.c @@ -237,7 +237,7 @@ slapacl( int argc, char **argv ) if ( !be->be_entry_open || !be->be_entry_close || !be->be_dn2id_get || - !be->be_entry_get ) + !be->be_id2entry_get ) { fprintf( stderr, "%s: target database " "doesn't support necessary operations; " diff --git a/servers/slapd/slapadd.c b/servers/slapd/slapadd.c index e4190eac3b..23d3c0b2af 100644 --- a/servers/slapd/slapadd.c +++ b/servers/slapd/slapadd.c @@ -74,7 +74,11 @@ slapadd( int argc, char **argv ) if( !be->be_entry_open || !be->be_entry_close || - !be->be_entry_put ) + !be->be_entry_put || + (update_ctxcsn && + (!be->be_dn2id_get || + !be->be_id2entry_get || + !be->be_entry_modify)) ) { fprintf( stderr, "%s: database doesn't support necessary operations.\n", progname ); -- 2.39.5