From fedora-directory-commits at redhat.com Wed Jun 4 21:51:38 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 4 Jun 2008 17:51:38 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/schema_reload - New directory Message-ID: <200806042151.m54Lpcka024394@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/schema_reload In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24375/schema_reload Log Message: Directory /cvs/dirsec/ldapserver/ldap/servers/plugins/schema_reload added to the repository From fedora-directory-commits at redhat.com Wed Jun 4 22:22:59 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 4 Jun 2008 18:22:59 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/ldif template-dse.ldif.in, 1.5, 1.6 Message-ID: <200806042222.m54MMxq5000420@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32401/ldap/ldif Modified Files: template-dse.ldif.in Log Message: Resolves: #436837 Summary: Dynamically reload schema via task interface Description: implemented task based schema file reloading (see also http://directory.fedoraproject.org/wiki/Dynamically_Reload_Schema) Index: template-dse.ldif.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- template-dse.ldif.in 18 Oct 2007 01:22:29 -0000 1.5 +++ template-dse.ldif.in 4 Jun 2008 22:22:56 -0000 1.6 @@ -200,6 +200,16 @@ nsslapd-plugintype: syntax nsslapd-pluginenabled: on +dn: cn=Schema Reload,cn=plugins,cn=config +objectclass: top +objectclass: nsSlapdPlugin +objectclass: extensibleObject +cn: Schema Reload +nsslapd-pluginpath: libschemareload-plugin +nsslapd-plugininitfunc: schemareload_init +nsslapd-plugintype: object +nsslapd-pluginenabled: on + dn: cn=Space Insensitive String Syntax,cn=plugins,cn=config objectclass: top objectclass: nsSlapdPlugin From fedora-directory-commits at redhat.com Wed Jun 4 22:22:58 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 4 Jun 2008 18:22:58 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd attrsyntax.c, 1.6, 1.7 backend.c, 1.6, 1.7 backend_manager.c, 1.9, 1.10 dse.c, 1.8, 1.9 entry.c, 1.14, 1.15 mapping_tree.c, 1.12, 1.13 pblock.c, 1.12, 1.13 proto-slap.h, 1.32, 1.33 schema.c, 1.11, 1.12 schemaparse.c, 1.5, 1.6 slap.h, 1.32, 1.33 slapi-plugin.h, 1.21, 1.22 slapi-private.h, 1.21, 1.22 Message-ID: <200806042222.m54MMwNe000405@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32401/ldap/servers/slapd Modified Files: attrsyntax.c backend.c backend_manager.c dse.c entry.c mapping_tree.c pblock.c proto-slap.h schema.c schemaparse.c slap.h slapi-plugin.h slapi-private.h Log Message: Resolves: #436837 Summary: Dynamically reload schema via task interface Description: implemented task based schema file reloading (see also http://directory.fedoraproject.org/wiki/Dynamically_Reload_Schema) Index: attrsyntax.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/attrsyntax.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- attrsyntax.c 4 Oct 2007 16:27:47 -0000 1.6 +++ attrsyntax.c 4 Jun 2008 22:22:55 -0000 1.7 @@ -452,6 +452,7 @@ if((asi=attr_syntax_get_by_name_locking_optional(s, PR_TRUE, PR_FALSE)) != NULL ) { r = slapi_ch_strdup(asi->asi_name); + attr_syntax_return( asi ); } if ( NULL == asi ) { r = attr_syntax_normalize_no_lookup( s ); @@ -501,6 +502,7 @@ } if ( NULL != asi ) { plugin = asi->asi_plugin; + attr_syntax_return( asi ); } return( plugin ); } @@ -890,6 +892,19 @@ } } +static int +attr_syntax_force_to_delete(struct asyntaxinfo *asip, void *arg) +{ + struct attr_syntax_enum_flaginfo *fi; + + PR_ASSERT( asip != NULL ); + fi = (struct attr_syntax_enum_flaginfo *)arg; + PR_ASSERT( fi != NULL ); + + attr_syntax_delete_no_lock( asip, PR_FALSE ); + return ATTR_SYNTAX_ENUM_REMOVE; +} + /* * Clear 'flag' within all attribute definitions. @@ -921,6 +936,19 @@ (void *)&fi, PR_TRUE ); } +/* + * Delete all attribute definitions + */ +void +attr_syntax_delete_all() +{ + struct attr_syntax_enum_flaginfo fi; + + memset( &fi, 0, sizeof(fi)); + attr_syntax_enumerate_attrs( attr_syntax_force_to_delete, + (void *)&fi, PR_TRUE ); +} + static int attr_syntax_init(void) { Index: backend.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/backend.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- backend.c 10 Nov 2006 23:45:40 -0000 1.6 +++ backend.c 4 Jun 2008 22:22:55 -0000 1.7 @@ -48,52 +48,52 @@ be_init( Slapi_Backend *be, const char *type, const char *name, int isprivate, int logchanges, int sizelimit, int timelimit ) { char text[128]; - slapdFrontendConfig_t *fecfg; - be->be_suffix = NULL; + slapdFrontendConfig_t *fecfg; + be->be_suffix = NULL; be->be_suffixlock= PR_NewLock(); be->be_suffixcount= 0; - /* e.g. dn: cn=config,cn=NetscapeRoot,cn=ldbm database,cn=plugins,cn=config */ - PR_snprintf(text, sizeof(text),"cn=%s,cn=%s,cn=plugins,cn=config", name, type); + /* e.g. dn: cn=config,cn=NetscapeRoot,cn=ldbm database,cn=plugins,cn=config */ + PR_snprintf(text, sizeof(text),"cn=%s,cn=%s,cn=plugins,cn=config", name, type); be->be_basedn= slapi_ch_strdup(slapi_dn_normalize(text)); - PR_snprintf(text, sizeof(text), "cn=config,cn=%s,cn=%s,cn=plugins,cn=config", name, type); - be->be_configdn= slapi_ch_strdup(slapi_dn_normalize(text)); - PR_snprintf(text, sizeof(text), "cn=monitor,cn=%s,cn=%s,cn=plugins,cn=config", name, type); - be->be_monitordn= slapi_ch_strdup(slapi_dn_normalize(text)); - be->be_sizelimit = sizelimit; - be->be_timelimit = timelimit; - /* maximum group nesting level before giving up */ - be->be_maxnestlevel = SLAPD_DEFAULT_GROUPNESTLEVEL; - be->be_noacl= 0; + PR_snprintf(text, sizeof(text), "cn=config,cn=%s,cn=%s,cn=plugins,cn=config", name, type); + be->be_configdn= slapi_ch_strdup(slapi_dn_normalize(text)); + PR_snprintf(text, sizeof(text), "cn=monitor,cn=%s,cn=%s,cn=plugins,cn=config", name, type); + be->be_monitordn= slapi_ch_strdup(slapi_dn_normalize(text)); + be->be_sizelimit = sizelimit; + be->be_timelimit = timelimit; + /* maximum group nesting level before giving up */ + be->be_maxnestlevel = SLAPD_DEFAULT_GROUPNESTLEVEL; + be->be_noacl= 0; be->be_flags=0; - if (( fecfg = getFrontendConfig()) != NULL ) - { - if ( fecfg->backendconfig != NULL && fecfg->backendconfig[ 0 ] != NULL ) - { - be->be_backendconfig = slapi_ch_strdup( fecfg->backendconfig[0] ); - } - else - { - be->be_backendconfig= NULL; - } - be->be_readonly = fecfg->readonly; - } - else - { - be->be_readonly= 0; - be->be_backendconfig= NULL; - } - be->be_lastmod = LDAP_UNDEFINED; - be->be_type = slapi_ch_strdup(type); - be->be_include = NULL; - be->be_private = isprivate; + if (( fecfg = getFrontendConfig()) != NULL ) + { + if ( fecfg->backendconfig != NULL && fecfg->backendconfig[ 0 ] != NULL ) + { + be->be_backendconfig = slapi_ch_strdup( fecfg->backendconfig[0] ); + } + else + { + be->be_backendconfig= NULL; + } + be->be_readonly = fecfg->readonly; + } + else + { + be->be_readonly= 0; + be->be_backendconfig= NULL; + } + be->be_lastmod = LDAP_UNDEFINED; + be->be_type = slapi_ch_strdup(type); + be->be_include = NULL; + be->be_private = isprivate; be->be_logchanges = logchanges; - be->be_database = NULL; - be->be_writeconfig = NULL; + be->be_database = NULL; + be->be_writeconfig = NULL; be->be_delete_on_exit = 0; - be->be_state = BE_STATE_STOPPED; - be->be_state_lock = PR_NewLock(); - be->be_name = slapi_ch_strdup(name); - be->be_mapped = 0; + be->be_state = BE_STATE_STOPPED; + be->be_state_lock = PR_NewLock(); + be->be_name = slapi_ch_strdup(name); + be->be_mapped = 0; } void @@ -115,12 +115,17 @@ /* JCM char **be_include; ??? */ slapi_ch_free((void **)&be->be_name); PR_DestroyLock(be->be_state_lock); + if (be->be_lock != NULL) + { + PR_DestroyRWLock(be->be_lock); + be->be_lock = NULL; + } } void slapi_be_delete_onexit (Slapi_Backend *be) { - be->be_delete_on_exit = 1; + be->be_delete_on_exit = 1; } void @@ -161,6 +166,12 @@ return r; } +int +be_isdeleted( const Slapi_Backend *be ) +{ + return BE_STATE_DELETED == be->be_state; +} + void be_addsuffix(Slapi_Backend *be,const Slapi_DN *suffix) { Index: backend_manager.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/backend_manager.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- backend_manager.c 9 Apr 2007 23:02:41 -0000 1.9 +++ backend_manager.c 4 Jun 2008 22:22:55 -0000 1.10 @@ -149,6 +149,15 @@ return be; } +/* + * Rule: before coming to this point, slapi_be_Wlock(be) must be acquired. + */ +void +be_replace_dse_internal(Slapi_Backend *be, struct dse *pdse) +{ + be->be_database->plg_private= (void*)pdse; +} + Slapi_Backend* slapi_get_first_backend (char **cookie) { @@ -341,8 +350,7 @@ slapi_pblock_set( &pb, SLAPI_BACKEND, backends[i] ); (*backends[i]->be_cleanup)( &pb ); - be_done(backends[i]); - slapi_ch_free((void **)&backends[i]); + slapi_be_free(&backends[i]); } } slapi_ch_free((void**)&backends); Index: dse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/dse.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- dse.c 18 Oct 2007 00:08:34 -0000 1.8 +++ dse.c 4 Jun 2008 22:22:55 -0000 1.9 @@ -210,7 +210,7 @@ Slapi_Entry *e= NULL; struct dse_node *n; - if (use_lock == DSE_USE_LOCK) + if (use_lock == DSE_USE_LOCK && pdse->dse_rwlock) PR_RWLock_Rlock(pdse->dse_rwlock); n = dse_find_node( pdse, dn ); @@ -219,7 +219,7 @@ e = slapi_entry_dup(n->entry); } - if (use_lock == DSE_USE_LOCK) + if (use_lock == DSE_USE_LOCK && pdse->dse_rwlock) PR_RWLock_Unlock(pdse->dse_rwlock); return e; @@ -444,6 +444,31 @@ * Get rid of a dse structure. */ int +dse_destroy(struct dse *pdse) +{ + int nentries = 0; + if (pdse->dse_rwlock) + PR_RWLock_Wlock(pdse->dse_rwlock); + slapi_ch_free((void **)&(pdse->dse_filename)); + slapi_ch_free((void **)&(pdse->dse_tmpfile)); + slapi_ch_free((void **)&(pdse->dse_fileback)); + slapi_ch_free((void **)&(pdse->dse_filestartOK)); + dse_callback_deletelist(&pdse->dse_callback); + charray_free(pdse->dse_filelist); + nentries = avl_free(pdse->dse_tree, dse_internal_delete_entry); + if (pdse->dse_rwlock) { + PR_RWLock_Unlock(pdse->dse_rwlock); + PR_DestroyRWLock(pdse->dse_rwlock); + } + slapi_ch_free((void **)&pdse); + LDAPDebug( SLAPI_DSE_TRACELEVEL, "Removed [%d] entries from the dse tree.\n", + nentries,0,0 ); +} + +/* + * Get rid of a dse structure. + */ +int dse_deletedse(Slapi_PBlock *pb) { struct dse *pdse = NULL; @@ -452,22 +477,10 @@ if (pdse) { - int nentries = 0; - PR_RWLock_Wlock(pdse->dse_rwlock); - slapi_ch_free((void **)&(pdse->dse_filename)); - slapi_ch_free((void **)&(pdse->dse_tmpfile)); - slapi_ch_free((void **)&(pdse->dse_fileback)); - slapi_ch_free((void **)&(pdse->dse_filestartOK)); - dse_callback_deletelist(&pdse->dse_callback); - nentries = avl_free(pdse->dse_tree, dse_internal_delete_entry); - PR_RWLock_Unlock(pdse->dse_rwlock); - PR_DestroyRWLock(pdse->dse_rwlock); - slapi_ch_free((void **)&pdse); - LDAPDebug( SLAPI_DSE_TRACELEVEL, "Removed [%d] entries from the dse tree.\n", - nentries,0,0 ); + dse_destroy(pdse); } - /* data is freed, so make sure no one tries to use it */ + /* data is freed, so make sure no one tries to use it */ slapi_pblock_set(pb, SLAPI_PLUGIN_PRIVATE, NULL); return 0; @@ -633,9 +646,9 @@ static int dse_read_one_file(struct dse *pdse, const char *filename, Slapi_PBlock *pb, - int primary_file ) + int primary_file ) { - Slapi_Entry *e= NULL; + Slapi_Entry *e= NULL; char *entrystr= NULL; char *buf = NULL; char *lastp = NULL; @@ -643,44 +656,47 @@ PRInt32 nr = 0; PRFileInfo prfinfo; PRFileDesc *prfd = 0; + int schema_flags = 0; + + slapi_pblock_get(pb, SLAPI_SCHEMA_FLAGS, &schema_flags); if ( (NULL != pdse) && (NULL != filename) ) { if ( (rc = PR_GetFileInfo( filename, &prfinfo )) != PR_SUCCESS ) { - /* the "real" file does not exist; see if there is a tmpfile */ - if ( pdse->dse_tmpfile && - PR_GetFileInfo( pdse->dse_tmpfile, &prfinfo ) == PR_SUCCESS ) { - rc = PR_Rename(pdse->dse_tmpfile, filename); - if (rc == PR_SUCCESS) { - slapi_log_error(SLAPI_LOG_FATAL, "dse", - "The configuration file %s was restored from backup %s\n", - filename, pdse->dse_tmpfile); - rc = 1; - } else { - slapi_log_error(SLAPI_LOG_FATAL, "dse", - "The configuration file %s was not restored from backup %s, error %d\n", - filename, pdse->dse_tmpfile, rc); - rc = 0; - } - } else { - rc = 0; /* fail */ - } + /* the "real" file does not exist; see if there is a tmpfile */ + if ( pdse->dse_tmpfile && + PR_GetFileInfo( pdse->dse_tmpfile, &prfinfo ) == PR_SUCCESS ) { + rc = PR_Rename(pdse->dse_tmpfile, filename); + if (rc == PR_SUCCESS) { + slapi_log_error(SLAPI_LOG_FATAL, "dse", + "The configuration file %s was restored from backup %s\n", + filename, pdse->dse_tmpfile); + rc = 1; + } else { + slapi_log_error(SLAPI_LOG_FATAL, "dse", + "The configuration file %s was not restored from backup %s, error %d\n", + filename, pdse->dse_tmpfile, rc); + rc = 0; + } + } else { + rc = 0; /* fail */ + } } if ( (rc = PR_GetFileInfo( filename, &prfinfo )) != PR_SUCCESS ) { - slapi_log_error(SLAPI_LOG_FATAL, "dse", - "The configuration file %s could not be accessed, error %d\n", - filename, rc); + slapi_log_error(SLAPI_LOG_FATAL, "dse", + "The configuration file %s could not be accessed, error %d\n", + filename, rc); rc = 0; /* Fail */ } else if (( prfd = PR_Open( filename, PR_RDONLY, SLAPD_DEFAULT_FILE_MODE )) == NULL ) { - slapi_log_error(SLAPI_LOG_FATAL, "dse", - "The configuration file %s could not be read. " - SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n", - filename, - PR_GetError(), slapd_pr_strerror(PR_GetError())); + slapi_log_error(SLAPI_LOG_FATAL, "dse", + "The configuration file %s could not be read. " + SLAPI_COMPONENT_NAME_NSPR " %d (%s)\n", + filename, + PR_GetError(), slapd_pr_strerror(PR_GetError())); rc = 0; /* Fail */ } else @@ -690,9 +706,9 @@ buf = slapi_ch_malloc( prfinfo.size + 1 ); if (( nr = slapi_read_buffer( prfd, buf, prfinfo.size )) < 0 ) { - slapi_log_error(SLAPI_LOG_FATAL, "dse", - "Could only read %d of %d bytes from config file %s\n", - nr, prfinfo.size, filename); + slapi_log_error(SLAPI_LOG_FATAL, "dse", + "Could only read %d of %d bytes from config file %s\n", + nr, prfinfo.size, filename); rc = 0; /* Fail */ done= 1; } @@ -702,16 +718,18 @@ if(!done) { - int dont_check_dups = 0; - int str2entry_flags = SLAPI_STR2ENTRY_EXPAND_OBJECTCLASSES | - SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF ; - - PR_ASSERT(pb); - slapi_pblock_get(pb, SLAPI_DSE_DONT_CHECK_DUPS, &dont_check_dups); - if ( !dont_check_dups ) { - str2entry_flags |= SLAPI_STR2ENTRY_REMOVEDUPVALS; - } - + int dont_check_dups = 0; + int str2entry_flags = SLAPI_STR2ENTRY_EXPAND_OBJECTCLASSES | + SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF ; + if (schema_flags & DSE_SCHEMA_LOCKED) + str2entry_flags |= SLAPI_STR2ENTRY_NO_SCHEMA_LOCK; + + PR_ASSERT(pb); + slapi_pblock_get(pb, SLAPI_DSE_DONT_CHECK_DUPS, &dont_check_dups); + if ( !dont_check_dups ) { + str2entry_flags |= SLAPI_STR2ENTRY_REMOVEDUPVALS; + } + /* Convert LDIF to entry structures */ rc= 1; /* assume we will succeed */ while (( entrystr = dse_read_next_entry( buf, &lastp )) != NULL ) @@ -722,47 +740,47 @@ int returncode = 0; char returntext[SLAPI_DSE_RETURNTEXT_SIZE]= {0}; - LDAPDebug(SLAPI_DSE_TRACELEVEL, "dse_read_one_file" - " processing entry \"%s\" in file %s%s\n", - slapi_entry_get_dn_const(e), filename, - primary_file ? " (primary file)" : "" ); + LDAPDebug(SLAPI_DSE_TRACELEVEL, "dse_read_one_file" + " processing entry \"%s\" in file %s%s\n", + slapi_entry_get_dn_const(e), filename, + primary_file ? " (primary file)" : "" ); - /* remove the numsubordinates attr, which may be bogus */ - slapi_entry_attr_delete(e, subordinatecount); + /* remove the numsubordinates attr, which may be bogus */ + slapi_entry_attr_delete(e, subordinatecount); - /* set the "primary file" flag if appropriate */ - slapi_pblock_set( pb, SLAPI_DSE_IS_PRIMARY_FILE, &primary_file ); + /* set the "primary file" flag if appropriate */ + slapi_pblock_set( pb, SLAPI_DSE_IS_PRIMARY_FILE, &primary_file ); if(dse_call_callback(pdse, pb, DSE_OPERATION_READ, - DSE_FLAG_PREOP, e, NULL, &returncode, - returntext) == SLAPI_DSE_CALLBACK_OK) + DSE_FLAG_PREOP, e, NULL, &returncode, + returntext) == SLAPI_DSE_CALLBACK_OK) { - /* this will free the entry if not added, so it is - definitely consumed by this call */ - dse_add_entry_pb(pdse, e, pb); + /* this will free the entry if not added, so it is + definitely consumed by this call */ + dse_add_entry_pb(pdse, e, pb); + } + else /* free entry if not used */ + { + slapi_log_error(SLAPI_LOG_FATAL, "dse", + "The entry %s in file %s is invalid, error code %d (%s) - %s\n", + slapi_entry_get_dn_const(e), + filename, returncode, + ldap_err2string(returncode), + returntext); + slapi_entry_free(e); + rc = 0; /* failure */ } - else /* free entry if not used */ - { - slapi_log_error(SLAPI_LOG_FATAL, "dse", - "The entry %s in file %s is invalid, error code %d (%s) - %s\n", - slapi_entry_get_dn_const(e), - filename, returncode, - ldap_err2string(returncode), - returntext); - slapi_entry_free(e); - rc = 0; /* failure */ - } } else { - slapi_log_error( SLAPI_LOG_FATAL, "dse", - "parsing dse entry [%s]\n", entrystr ); - rc = 0; /* failure */ - } + slapi_log_error( SLAPI_LOG_FATAL, "dse", + "parsing dse entry [%s]\n", entrystr ); + rc = 0; /* failure */ + } } } - slapi_ch_free((void **)&buf); + slapi_ch_free((void **)&buf); } } - return rc; + return rc; } /* @@ -892,7 +910,8 @@ { int rc = 0; /* default: no error */ - PR_RWLock_Rlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Rlock(pdse->dse_rwlock); if ( !pdse->dse_is_updateable ) { if ( !pdse->dse_readonly_error_reported ) { @@ -908,7 +927,8 @@ rc = 1; /* return an error to the client */ } - PR_RWLock_Unlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Unlock(pdse->dse_rwlock); if ( rc != 0 ) { slapi_send_ldap_result( pb, LDAP_UNWILLING_TO_PERFORM, NULL, @@ -1056,7 +1076,8 @@ slapi_pblock_get(pb, SLAPI_DSE_MERGE_WHEN_ADDING, &merge); /* keep write lock during both tree update and file write operations */ - PR_RWLock_Wlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Wlock(pdse->dse_rwlock); if (merge) { rc= avl_insert( &(pdse->dse_tree), n, entry_dn_cmp, dupentry_merge ); @@ -1079,7 +1100,8 @@ } else { /* duplicate entry ignored */ dse_node_delete(&n); /* This also deletes the contained entry */ } - PR_RWLock_Unlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Unlock(pdse->dse_rwlock); if (rc == -1) { @@ -1254,7 +1276,7 @@ if ( NULL != e ) { struct dse_node *n= dse_node_new(e); - if (use_lock) + if (use_lock && pdse->dse_rwlock) PR_RWLock_Wlock(pdse->dse_rwlock); rc = avl_insert( &(pdse->dse_tree), n, entry_dn_cmp, dupentry_replace ); if (write_file) @@ -1265,7 +1287,7 @@ dse_node_delete(&n); rc = 0; /* for return to caller */ } - if (use_lock) + if (use_lock && pdse->dse_rwlock) PR_RWLock_Unlock(pdse->dse_rwlock); } return rc; @@ -1366,7 +1388,8 @@ slapi_pblock_get(pb, SLAPI_DSE_DONT_WRITE_WHEN_ADDING, &dont_write_file); /* keep write lock for both tree deleting and file writing */ - PR_RWLock_Wlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Wlock(pdse->dse_rwlock); if ((deleted_node = (struct dse_node *)avl_delete(&pdse->dse_tree, n, entry_dn_cmp))) dse_node_delete(&deleted_node); @@ -1379,7 +1402,8 @@ SLAPI_OPERATION_DELETE); dse_write_file_nolock(pdse); } - PR_RWLock_Unlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Unlock(pdse->dse_rwlock); return 1; } @@ -1555,9 +1579,11 @@ */ if ( pb->pb_op == NULL || !operation_is_flag_set( pb->pb_op, OP_FLAG_PS_CHANGESONLY )) { - PR_RWLock_Rlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Rlock(pdse->dse_rwlock); dse_apply_nolock(pdse,dse_search_filter_entry,(caddr_t)&stuff); - PR_RWLock_Unlock(pdse->dse_rwlock); + if (pdse->dse_rwlock) + PR_RWLock_Unlock(pdse->dse_rwlock); } if (stuff.ss) /* something was found which matched our criteria */ Index: entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- entry.c 18 Oct 2007 00:08:34 -0000 1.14 +++ entry.c 4 Jun 2008 22:22:55 -0000 1.15 @@ -1067,7 +1067,14 @@ if ( flags & SLAPI_STR2ENTRY_EXPAND_OBJECTCLASSES ) { - slapi_schema_expand_objectclasses( e ); + if ( flags & SLAPI_STR2ENTRY_NO_SCHEMA_LOCK ) + { + schema_expand_objectclasses_nolock( e ); + } + else + { + slapi_schema_expand_objectclasses( e ); + } } if ( flags & SLAPI_STR2ENTRY_TOMBSTONE_CHECK ) Index: mapping_tree.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/mapping_tree.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- mapping_tree.c 18 Oct 2007 00:08:34 -0000 1.12 +++ mapping_tree.c 4 Jun 2008 22:22:55 -0000 1.13 @@ -1605,7 +1605,7 @@ mapping_tree_node_add_child(mapping_tree_root, node); node= add_internal_mapping_tree_node("cn=monitor", be, mapping_tree_root); mapping_tree_node_add_child(mapping_tree_root, node); - be= slapi_be_select_by_instance_name( "schema-internal" ); + be= slapi_be_select_by_instance_name( DSE_SCHEMA ); node= add_internal_mapping_tree_node("cn=schema", be, mapping_tree_root); mapping_tree_node_add_child(mapping_tree_root, node); @@ -2003,7 +2003,7 @@ mtn_unlock(); *be = slapi_be_select_by_instance_name(DSE_BACKEND); - if(*be != NULL) + if(*be != NULL && !be_isdeleted(*be)) { ret = LDAP_SUCCESS; slapi_be_Rlock(*be); /* also done inside mtn_get_be() below */ @@ -2026,7 +2026,7 @@ * fail if the backend is read-only, * or if the whole server is readonly AND backend is public (!private) */ - if ((ret == LDAP_SUCCESS) && *be && + if ((ret == LDAP_SUCCESS) && *be && !be_isdeleted(*be) && ((*be)->be_readonly || (slapi_config_get_readonly() && !slapi_be_private(*be)))) { unsigned long op_type = operation_get_type(op); @@ -2101,7 +2101,7 @@ && (scope == LDAP_SCOPE_BASE) ) { mtn_unlock(); be = slapi_be_select_by_instance_name(DSE_BACKEND); - if(be != NULL) + if(be != NULL && !be_isdeleted(be)) { be_list[0]=be; be_list[1] = NULL; @@ -2128,7 +2128,7 @@ && (scope != LDAP_SCOPE_BASE)) ) && (!be || strncmp(be->be_name, "default", 8))) { - if (be) + if (be && !be_isdeleted(be)) { /* wrong backend or referall, ignore it */ slapi_log_error(SLAPI_LOG_ARGS, NULL, @@ -2139,7 +2139,7 @@ } else { - if (be) + if (be && !be_isdeleted(be)) { be_list[be_index++]=be; } @@ -2285,7 +2285,7 @@ if (ret != LDAP_SUCCESS) { - if (*be) + if (be && !be_isdeleted(be)) { slapi_be_Unlock(*be); *be = NULL; @@ -2521,7 +2521,7 @@ } if (result == LDAP_SUCCESS) { - if (*be) { + if (*be && !be_isdeleted(*be)) { slapi_log_error(SLAPI_LOG_ARGS, NULL, "mapping tree selected backend : %s\n", slapi_be_get_name(*be)); @@ -2790,7 +2790,7 @@ int slapi_on_internal_backends(const Slapi_DN *sdn) { - char *backend_names[] = {"frontend-internal", "schema-internal"}; + char *backend_names[] = {DSE_BACKEND, DSE_SCHEMA}; int internal = 1; int numOfInternalBackends = 2; int count; Index: pblock.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- pblock.c 18 Oct 2007 20:49:01 -0000 1.12 +++ pblock.c 4 Jun 2008 22:22:55 -0000 1.13 @@ -559,9 +559,12 @@ case SLAPI_PLUGIN_POSTSTART_FN: (*(IFP *)value) = pblock->pb_plugin->plg_poststart; break; - case SLAPI_PLUGIN_DB_WIRE_IMPORT_FN: - (*(IFP *)value) = pblock->pb_plugin->plg_wire_import; - break; + case SLAPI_PLUGIN_DB_WIRE_IMPORT_FN: + (*(IFP *)value) = pblock->pb_plugin->plg_wire_import; + break; + case SLAPI_PLUGIN_DB_ADD_SCHEMA_FN: + (*(IFP *)value) = pblock->pb_plugin->plg_add_schema; + break; case SLAPI_PLUGIN_DB_SEQ_FN: if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) { return( -1 ); @@ -1583,9 +1586,9 @@ (*(int *)value) = pblock->pb_dse_is_primary_file; break; - /* used internally by schema code */ - case SLAPI_SCHEMA_USER_DEFINED_ONLY: - (*(int *)value) = pblock->pb_schema_user_defined_only; + /* used internally by schema code (schema.c) */ + case SLAPI_SCHEMA_FLAGS: + (*(int *)value) = pblock->pb_schema_flags; break; case SLAPI_URP_NAMING_COLLISION_DN: @@ -1836,9 +1839,12 @@ case SLAPI_PLUGIN_POSTSTART_FN: pblock->pb_plugin->plg_poststart = (IFP) value; break; - case SLAPI_PLUGIN_DB_WIRE_IMPORT_FN: - pblock->pb_plugin->plg_wire_import = (IFP) value; - break; + case SLAPI_PLUGIN_DB_WIRE_IMPORT_FN: + pblock->pb_plugin->plg_wire_import = (IFP) value; + break; + case SLAPI_PLUGIN_DB_ADD_SCHEMA_FN: + pblock->pb_plugin->plg_add_schema = (IFP) value; + break; case SLAPI_PLUGIN_DB_SEQ_FN: if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) { return( -1 ); @@ -2824,9 +2830,9 @@ pblock->pb_dse_is_primary_file = *((int *)value); break; - /* used internally by schema code only */ - case SLAPI_SCHEMA_USER_DEFINED_ONLY: - pblock->pb_schema_user_defined_only = *((int *)value); + /* used internally by schema code (schema.c) */ + case SLAPI_SCHEMA_FLAGS: + pblock->pb_schema_flags = *((int *)value); break; case SLAPI_URP_NAMING_COLLISION_DN: Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- proto-slap.h 3 Apr 2008 21:07:55 -0000 1.32 +++ proto-slap.h 4 Jun 2008 22:22:55 -0000 1.33 @@ -117,6 +117,7 @@ */ void attr_syntax_return( struct asyntaxinfo *asi ); void attr_syntax_return_locking_optional( struct asyntaxinfo *asi, PRBool use_lock ); +void attr_syntax_delete_all(void); /* * value.c @@ -192,6 +193,7 @@ * backend_manager.c */ Slapi_Backend *be_new_internal(struct dse *pdse, const char *type, const char *name); +void be_replace_dse_internal(Slapi_Backend *be, struct dse *pdse); int fedse_create_startOK(char *filename, char *startokfilename, const char *configdir); void be_cleanupall(); void be_flushall(); @@ -550,10 +552,12 @@ #define DSE_OPERATION_WRITE 0x200 #define DSE_BACKEND "frontend-internal" +#define DSE_SCHEMA "schema-internal" struct dse *dse_new( char *filename, char *tmpfilename, char *backfilename, char *startokfilename, const char *configdir); struct dse *dse_new_with_filelist(char *filename, char *tmpfilename, char *backfilename, char *startokfilename, const char *configdir, char **filelist); int dse_deletedse(Slapi_PBlock *pb); +int dse_destroy(struct dse *pdse); int dse_read_file(struct dse *pdse, Slapi_PBlock *pb); int dse_bind( Slapi_PBlock *pb ); int dse_unbind( Slapi_PBlock *pb ); @@ -853,11 +857,19 @@ /* csn is consumed. */ void g_set_global_schema_csn(CSN *csn); void slapi_schema_expand_objectclasses( Slapi_Entry *e ); +/* lock to protect both objectclass and schema_dse */ +void slapi_load_schemafile_lock( void ); +void slapi_load_schemafile_unlock( void ); +/* API to validate the schema files */ +int slapi_validate_schema_files(char *schemadir); +/* API to reload the schema files */ +int slapi_reload_schema_files(char *schemadir); /* * schemaparse.c */ void normalize_oc( void ); +void normalize_oc_nolock( void ); /* Note: callers of oc_update_inheritance_nolock() must hold a write lock */ void oc_update_inheritance_nolock( struct objclass *oc ); Index: schema.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/schema.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- schema.c 25 Sep 2007 19:43:50 -0000 1.11 +++ schema.c 4 Jun 2008 22:22:55 -0000 1.12 @@ -111,7 +111,7 @@ static int schema_replace_objectclasses ( Slapi_PBlock *pb, LDAPMod *mod, char *errorbuf, size_t errorbufsize ); static int read_oc_ldif ( const char *input, struct objclass **oc, - char *errorbuf, size_t errorbufsize, int nolock, int is_user_defined, + char *errorbuf, size_t errorbufsize, PRUint32 flags, int is_user_defined, int schema_ds4x_compat ); static int schema_check_name(char *name, PRBool isAttribute, char *errorbuf, size_t errorbufsize ); @@ -122,8 +122,8 @@ static int strip_oc_options ( struct objclass *poc ); static char *stripOption (char *attr); static int read_at_ldif(const char *input, struct asyntaxinfo **asipp, - char *errorbuf, size_t errorbufsize, int nolock, int is_user_defined, - int schema_ds4x_compat, int is_remote); + char *errorbuf, size_t errorbufsize, PRUint32 flags, + int is_user_defined, int schema_ds4x_compat, int is_remote); static char **parse_qdlist(const char *s, int *n, int strip_options); static void free_qdlist(char **vals, int n); static char **parse_qdescrs(const char *s, int *n); @@ -456,6 +456,7 @@ int i, oc_count = 0; int unknown_class = 0; char errtext[ BUFSIZ ]; + PRUint32 schema_flags; /* smart referrals are not allowed in Directory Lite */ if ( config_is_slapd_lite() ) { @@ -468,8 +469,10 @@ * say the schema checked out ok if we're not checking schema at * all, or if this is a replication update. */ - if (pb != NULL) + if (pb != NULL) { slapi_pblock_get(pb, SLAPI_IS_REPLICATED_OPERATION, &is_replicated_operation); + slapi_pblock_get(pb, SLAPI_SCHEMA_FLAGS, &schema_flags); + } if ( schemacheck == 0 || is_replicated_operation ) { return( 0 ); } @@ -504,7 +507,8 @@ /* * Need the read lock to create the oc array and while we use it. */ - oc_lock_read(); + if (!(schema_flags & DSE_SCHEMA_LOCKED)) + oc_lock_read(); oc_count = 0; for (i= slapi_attr_first_value(aoc,&v); i != -1; @@ -623,7 +627,8 @@ out: /* Done with the oc array so can release the lock */ - oc_unlock(); + if (!(schema_flags & DSE_SCHEMA_LOCKED)) + oc_unlock(); slapi_ch_free((void**)&oclist); return( ret ); @@ -686,7 +691,7 @@ { struct objclass *oc; int i, j; - int rc = 1; /* failure */ + int rc = 1; /* failure */ /* always allow objectclass and entryid attributes */ /* MFW XXX THESE SHORTCUTS SHOULD NOT BE NECESSARY BUT THEY MASK @@ -704,43 +709,43 @@ /* does it require the type? */ for ( j = 0; oc->oc_required && oc->oc_required[j] != NULL; j++ ) { - if ( slapi_attr_type_cmp( oc->oc_required[j], - type, SLAPI_TYPE_CMP_SUBTYPE ) == 0 ) { - rc = 0; - break; - } + if ( slapi_attr_type_cmp( oc->oc_required[j], + type, SLAPI_TYPE_CMP_SUBTYPE ) == 0 ) { + rc = 0; + break; + } } - + if ( 0 != rc ) { - /* does it allow the type? */ - for ( j = 0; oc->oc_allowed && oc->oc_allowed[j] != NULL; j++ ) { - if ( slapi_attr_type_cmp( oc->oc_allowed[j], - type, SLAPI_TYPE_CMP_SUBTYPE ) == 0 || - strcmp( oc->oc_allowed[j],"*" ) == 0 ) { - rc = 0; - break; - } - } - /* maybe the next oc allows it */ + /* does it allow the type? */ + for ( j = 0; oc->oc_allowed && oc->oc_allowed[j] != NULL; j++ ) { + if ( slapi_attr_type_cmp( oc->oc_allowed[j], + type, SLAPI_TYPE_CMP_SUBTYPE ) == 0 || + strcmp( oc->oc_allowed[j],"*" ) == 0 ) { + rc = 0; + break; + } + } + /* maybe the next oc allows it */ } - } + } if ( 0 != rc ) { - char errtext[ BUFSIZ ]; + char errtext[ BUFSIZ ]; char ebuf[ BUFSIZ ]; char ebuf2[ BUFSIZ ]; LDAPDebug( LDAP_DEBUG_ANY, - "Entry \"%s\" -- attribute \"%s\" not allowed\n", - escape_string( slapi_entry_get_dn_const(e), ebuf ), - escape_string( type, ebuf2 ), - 0); - - if (pb) { - PR_snprintf( errtext, sizeof( errtext ), - "attribute \"%s\" not allowed\n", - escape_string( type, ebuf2 ) ); - slapi_pblock_set( pb, SLAPI_PB_RESULT_TEXT, errtext ); - } + "Entry \"%s\" -- attribute \"%s\" not allowed\n", + escape_string( slapi_entry_get_dn_const(e), ebuf ), + escape_string( type, ebuf2 ), + 0); + + if (pb) { + PR_snprintf( errtext, sizeof( errtext ), + "attribute \"%s\" not allowed\n", + escape_string( type, ebuf2 ) ); + slapi_pblock_set( pb, SLAPI_PB_RESULT_TEXT, errtext ); + } } return rc; @@ -922,6 +927,19 @@ return rc; } +static void +oc_delete_all_nolock( void ) +{ + struct objclass *oc, *pnext; + + oc = g_get_global_oc_nolock(); + for (pnext = oc->oc_next; oc; + oc = pnext, pnext = oc?oc->oc_next:NULL) { + oc_free( &oc ); + } + g_set_global_oc_nolock ( NULL ); +} + /* * Compare two objectclass definitions for equality. Return PR_TRUE if @@ -1411,6 +1429,7 @@ struct attr_enum_wrapper aew; struct syntax_enum_wrapper sew; int enquote_sup_oc = config_get_enquote_sup_oc(); + PRUint32 schema_flags = 0; int user_defined_only = 0; char **allowed, **required; char *mr_desc, *mr_name, *oc_description; @@ -1420,7 +1439,8 @@ vals[0] = &val; vals[1] = NULL; - slapi_pblock_get(pb, SLAPI_SCHEMA_USER_DEFINED_ONLY, (void*)&user_defined_only); + slapi_pblock_get(pb, SLAPI_SCHEMA_FLAGS, (void*)&schema_flags); + user_defined_only = (schema_flags & DSE_SCHEMA_USER_DEFINED_ONLY) ? 1 : 0; attrlist_delete (&pschema_info_e->e_attrs, "objectclasses"); attrlist_delete (&pschema_info_e->e_attrs, "attributetypes"); @@ -1908,11 +1928,11 @@ static int refresh_user_defined_schema( Slapi_PBlock *pb, Slapi_Entry *pschema_info_e, Slapi_Entry *entryAfter, int *returncode, char *returntext, void *arg /* not used */ ) { - int user_defined_only = 1; int rc; Slapi_PBlock *mypbptr = pb; Slapi_PBlock mypb; const CSN *schema_csn; + PRUint32 schema_flags = DSE_SCHEMA_USER_DEFINED_ONLY; pblock_init(&mypb); @@ -1924,7 +1944,7 @@ mypbptr = &mypb; } - slapi_pblock_set(mypbptr, SLAPI_SCHEMA_USER_DEFINED_ONLY, &user_defined_only); + slapi_pblock_set(mypbptr, SLAPI_SCHEMA_FLAGS, &schema_flags); rc = read_schema_dse(mypbptr, pschema_info_e, NULL, returncode, returntext, NULL); schema_csn = g_get_global_schema_csn(); if (NULL != schema_csn) { @@ -2197,7 +2217,7 @@ int status = 0; for (i = 0; LDAP_SUCCESS == status && mod->mod_bvalues[i]; i++) { - int nolock = 0; /* lock global resources during normal operation */ + PRUint32 nolock = 0; /* lock global resources during normal operation */ attr_ldif = (char *) mod->mod_bvalues[i]->bv_val; status = read_at_ldif(attr_ldif, NULL, errorbuf, errorbufsize, @@ -2221,13 +2241,14 @@ */ static int add_oc_internal(struct objclass *pnew_oc, char *errorbuf, size_t errorbufsize, - int schema_ds4x_compat ) + int schema_ds4x_compat, PRUint32 flags ) { struct objclass *oldoc_by_name, *oldoc_by_oid, *psup_oc = NULL; int redefined_oc = 0, rc=0; asyntaxinfo *pasyntaxinfo = 0; - oc_lock_write(); + if (!(flags & DSE_SCHEMA_LOCKED)) + oc_lock_write(); oldoc_by_name = oc_find_nolock (pnew_oc->oc_name); oldoc_by_oid = oc_find_nolock (pnew_oc->oc_oid); @@ -2296,13 +2317,14 @@ } /* check to see if the objectclass name is valid */ - if (!rc && schema_check_name ( pnew_oc->oc_name, PR_FALSE, - errorbuf, errorbufsize ) == 0 ) { + if (!rc && !(flags & DSE_SCHEMA_NO_CHECK) && + schema_check_name ( pnew_oc->oc_name, PR_FALSE, errorbuf, errorbufsize ) + == 0 ) { rc = schema_ds4x_compat ? LDAP_OPERATIONS_ERROR : LDAP_INVALID_SYNTAX; } /* check to see if the oid is valid */ - if (!rc) + if (!rc && !(flags & DSE_SCHEMA_NO_CHECK)) { struct sizedbuffer *psbOcOid, *psbOcName; @@ -2320,8 +2342,9 @@ } /* check to see if the oc's attributes are valid */ - if (!rc && schema_check_oc_attrs ( pnew_oc, errorbuf, errorbufsize, - 0 /* don't strip options */ ) == 0 ) { + if (!rc && !(flags & DSE_SCHEMA_NO_CHECK) && + schema_check_oc_attrs ( pnew_oc, errorbuf, errorbufsize, + 0 /* don't strip options */ ) == 0 ) { rc = schema_ds4x_compat ? LDAP_OPERATIONS_ERROR : LDAP_INVALID_SYNTAX; } /* insert new objectclass exactly where the old one one in the linked list*/ @@ -2338,7 +2361,8 @@ oc_update_inheritance_nolock( pnew_oc ); } - oc_unlock(); + if (!(flags & DSE_SCHEMA_LOCKED)) + oc_unlock(); return rc; } @@ -2470,7 +2494,7 @@ } if ( LDAP_SUCCESS != (rc = add_oc_internal(pnew_oc, errorbuf, - errorbufsize, schema_ds4x_compat))) { + errorbufsize, schema_ds4x_compat, 0/* no restriction */))) { oc_free( &pnew_oc ); return rc; } @@ -2541,7 +2565,7 @@ struct objclass *addocp = NULL; if ( LDAP_SUCCESS != ( rc = read_oc_ldif( mod->mod_bvalues[i]->bv_val, - &newocp, errorbuf, errorbufsize, 1 /* no locking */, + &newocp, errorbuf, errorbufsize, DSE_SCHEMA_NO_GLOCK, 1 /* user defined */, 0 /* no DS 4.x compat issues */ ))) { rc = LDAP_INVALID_SYNTAX; goto clean_up_and_return; @@ -2695,7 +2719,12 @@ * oc : pointer write the objectclass to * errorbuf : buffer to write any errors to * is_user_defined : if non-zero, force objectclass to be user defined - * nolock : if non-zero, assume oc_lock_*() has been called. + * schema_flags : Any or none of the following bits could be set + * DSE_SCHEMA_NO_CHECK -- schema won't be checked + * DSE_SCHEMA_NO_GLOCK -- don't lock global resources + * DSE_SCHEMA_LOCKED -- already locked with + * slapi_load_schemafile_lock; + * no further lock needed * schema_ds4x_compat: if non-zero, act like Netscape DS 4.x * * Returns: an LDAP error code @@ -2708,8 +2737,9 @@ */ static int read_oc_ldif ( const char *input, struct objclass **oc, char *errorbuf, - size_t errorbufsize, int nolock, int is_user_defined, - int schema_ds4x_compat ) { + size_t errorbufsize, PRUint32 schema_flags, int is_user_defined, + int schema_ds4x_compat ) +{ int i, j, num_origins; const char *pstart, *nextinput; struct objclass *pnew_oc, *psup_oc; @@ -2848,7 +2878,7 @@ flags |= get_flag_keyword( schema_obsolete_with_spaces, OC_FLAG_OBSOLETE, &nextinput, keyword_strstr_fn ); - if (!nolock) { + if (!(schema_flags & DSE_SCHEMA_NO_GLOCK)) { oc_lock_read(); /* needed because we access the superior oc */ } @@ -3005,7 +3035,7 @@ OrigAllowedAttrsArray = charray_dup ( AllowedAttrsArray ); } - if (!nolock) { + if (!(schema_flags & DSE_SCHEMA_NO_GLOCK)) { oc_unlock(); /* we are done accessing superior oc (psup_oc) */ } @@ -3108,9 +3138,14 @@ * if asipp is NULL, the attribute type is added to the global set of schema. * if asipp is not NULL, the AT is not added but *asipp is set. * - * if nolock is true, locking of global resources is turned off; this saves - * time during initialization since the server operates in single threaded - * mode at that time. + * schema_flags: Any or none of the following bits could be set + * DSE_SCHEMA_NO_CHECK -- schema won't be checked + * DSE_SCHEMA_NO_GLOCK -- locking of global resources is turned off; + * this saves time during initialization since + * the server operates in single threaded mode + * at that time or in slapi_load_schemafile_lock. + * DSE_SCHEMA_LOCKED -- already locked with slapi_load_schemafile_lock; + * no further lock needed * * if is_user_defined is true, force attribute type to be user defined. * @@ -3118,26 +3153,26 @@ */ static int read_at_ldif(const char *input, struct asyntaxinfo **asipp, char *errorbuf, - size_t errorbufsize, int nolock, int is_user_defined, - int schema_ds4x_compat, int is_remote) + size_t errorbufsize, PRUint32 schema_flags, int is_user_defined, + int schema_ds4x_compat, int is_remote) { - char *pStart, *pEnd; - char *pOid, *pSyntax, *pSuperior, *pMREquality, *pMROrdering, *pMRSubstring; - const char *nextinput; - struct sizedbuffer *psbAttrName= sizedbuffer_construct(BUFSIZ); - struct sizedbuffer *psbAttrDesc= sizedbuffer_construct(BUFSIZ); - int status = 0; - int syntaxlength; - char **attr_names = NULL; - char *first_attr_name = NULL; - char **attr_origins = NULL; - int num_names = 0; - int num_origins = 0; - unsigned long flags = SLAPI_ATTR_FLAG_OVERRIDE; - const char *ss = 0; - struct asyntaxinfo *tmpasip; - int invalid_syntax_error; - schema_strstr_fn_t keyword_strstr_fn; + char *pStart, *pEnd; + char *pOid, *pSyntax, *pSuperior, *pMREquality, *pMROrdering, *pMRSubstring; + const char *nextinput; + struct sizedbuffer *psbAttrName= sizedbuffer_construct(BUFSIZ); + struct sizedbuffer *psbAttrDesc= sizedbuffer_construct(BUFSIZ); + int status = 0; + int syntaxlength; + char **attr_names = NULL; + char *first_attr_name = NULL; + char **attr_origins = NULL; + int num_names = 0; + int num_origins = 0; + unsigned long flags = SLAPI_ATTR_FLAG_OVERRIDE; + const char *ss = 0; + struct asyntaxinfo *tmpasip; + int invalid_syntax_error; + schema_strstr_fn_t keyword_strstr_fn; /* * From RFC 2252 section 4.2: @@ -3183,174 +3218,174 @@ * 2. use a case-insensitive compare when looking for keywords, e.g., DESC */ - if ( schema_ds4x_compat ) { - keyword_strstr_fn = PL_strcasestr; - invalid_syntax_error = LDAP_OPERATIONS_ERROR; - } else { - keyword_strstr_fn = PL_strstr; - invalid_syntax_error = LDAP_INVALID_SYNTAX; - } + if ( schema_ds4x_compat ) { + keyword_strstr_fn = PL_strcasestr; + invalid_syntax_error = LDAP_OPERATIONS_ERROR; + } else { + keyword_strstr_fn = PL_strstr; + invalid_syntax_error = LDAP_INVALID_SYNTAX; + } - if (nolock) - flags |= SLAPI_ATTR_FLAG_NOLOCKING; + if (schema_flags & DSE_SCHEMA_NO_GLOCK) + flags |= SLAPI_ATTR_FLAG_NOLOCKING; - psbAttrName->buffer[0] = '\0'; - psbAttrDesc->buffer[0] = '\0'; - pOid = pSyntax = pSuperior = NULL; - pMREquality = pMROrdering = pMRSubstring = NULL; + psbAttrName->buffer[0] = '\0'; + psbAttrDesc->buffer[0] = '\0'; + pOid = pSyntax = pSuperior = NULL; + pMREquality = pMROrdering = pMRSubstring = NULL; syntaxlength = SLAPI_SYNTAXLENGTH_NONE; - nextinput = input; + nextinput = input; - /* get the OID */ + /* get the OID */ pOid = get_tagged_oid( "(", &nextinput, keyword_strstr_fn ); - if (NULL == pOid) { - schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, - input, "Missing or invalid OID" ); - status = invalid_syntax_error; - goto done; - } - - if ( schema_ds4x_compat || (strcasecmp(pOid, "NAME") == 0)) - nextinput = input; - - /* look for the NAME (single or list of names) */ - if ( (pStart = (*keyword_strstr_fn) ( nextinput, "NAME ")) != NULL ) { - pStart += 5; - sizedbuffer_allocate(psbAttrName,strlen(pStart)+1); - strcpy ( psbAttrName->buffer, pStart); - if (*pStart == '(') - pEnd = strchr(psbAttrName->buffer, ')'); - else - pEnd = strchr(psbAttrName->buffer+1, '\''); - if (pEnd) - *(pEnd+1) = 0; - nextinput = pStart + strlen(psbAttrName->buffer) + 1; - attr_names = parse_qdescrs(psbAttrName->buffer, &num_names); - if ( NULL != attr_names ) { - first_attr_name = attr_names[0]; - } else { /* NAME followed by nothing violates syntax */ - schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, - input, "Missing or invalid attribute name" ); - status = invalid_syntax_error; - goto done; - } - } + if (NULL == pOid) { + schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, + input, "Missing or invalid OID" ); + status = invalid_syntax_error; + goto done; + } - if ( schema_ds4x_compat ) nextinput = input; + if ( schema_ds4x_compat || (strcasecmp(pOid, "NAME") == 0)) + nextinput = input; - /* - * if the attribute ldif doesn't have an OID, we'll make the oid - * attrname-oid - */ - if ( (strcasecmp ( pOid, "NAME" ) == 0) && (first_attr_name)) { - slapi_ch_free_string( &pOid ); - pOid = slapi_ch_smprintf("%s-oid", first_attr_name ); - } - - /* look for the optional DESCription */ - if ( (pStart = (*keyword_strstr_fn) ( nextinput, "DESC '")) != NULL ) { - pStart += 6; - sizedbuffer_allocate(psbAttrDesc,strlen(pStart)); - strcpy ( psbAttrDesc->buffer, pStart); - if ( (pEnd = strchr (psbAttrDesc->buffer, '\'' )) != NULL ){ - *pEnd ='\0'; - } - nextinput = pStart + strlen(psbAttrDesc->buffer) + 1; - } - - if ( schema_ds4x_compat ) nextinput = input; - - /* look for the optional OBSOLETE marker */ - flags |= get_flag_keyword( schema_obsolete_with_spaces, - SLAPI_ATTR_FLAG_OBSOLETE, &nextinput, keyword_strstr_fn ); - - if ( schema_ds4x_compat ) nextinput = input; - - /* look for the optional SUPerior type */ - pSuperior = get_tagged_oid( "SUP ", &nextinput, keyword_strstr_fn ); - - if ( schema_ds4x_compat ) nextinput = input; - - /* look for the optional matching rules */ - pMREquality = get_tagged_oid( "EQUALITY ", &nextinput, keyword_strstr_fn ); - if ( schema_ds4x_compat ) nextinput = input; - pMROrdering = get_tagged_oid( "ORDERING ", &nextinput, keyword_strstr_fn ); - if ( schema_ds4x_compat ) nextinput = input; - pMRSubstring = get_tagged_oid( "SUBSTR ", &nextinput, keyword_strstr_fn ); - if ( schema_ds4x_compat ) nextinput = input; - - /* look for the optional SYNTAX */ - if ( NULL != ( pSyntax = get_tagged_oid( "SYNTAX ", &nextinput, - keyword_strstr_fn ))) { - /* - * Check for an optional {LEN}, which if present indicates a - * suggested maximum size for values of this attribute type. - * - * XXXmcs: we do not enforce length restrictions, but we do read - * and include them in the subschemasubentry. - */ - if ( (pEnd = strchr ( pSyntax, '{')) != NULL /* balance } */ ) { - *pEnd = '\0'; - syntaxlength = atoi( pEnd + 1 ); - } - } - - if ( schema_ds4x_compat ) nextinput = input; + /* look for the NAME (single or list of names) */ + if ( (pStart = (*keyword_strstr_fn) ( nextinput, "NAME ")) != NULL ) { + pStart += 5; + sizedbuffer_allocate(psbAttrName,strlen(pStart)+1); + strcpy ( psbAttrName->buffer, pStart); + if (*pStart == '(') + pEnd = strchr(psbAttrName->buffer, ')'); + else + pEnd = strchr(psbAttrName->buffer+1, '\''); + if (pEnd) + *(pEnd+1) = 0; + nextinput = pStart + strlen(psbAttrName->buffer) + 1; + attr_names = parse_qdescrs(psbAttrName->buffer, &num_names); + if ( NULL != attr_names ) { + first_attr_name = attr_names[0]; + } else { /* NAME followed by nothing violates syntax */ + schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, + input, "Missing or invalid attribute name" ); + status = invalid_syntax_error; + goto done; + } + } - /* look for the optional SINGLE-VALUE marker */ - flags |= get_flag_keyword( " SINGLE-VALUE ", - SLAPI_ATTR_FLAG_SINGLE, &nextinput, keyword_strstr_fn ); + if ( schema_ds4x_compat ) nextinput = input; - if ( schema_ds4x_compat ) nextinput = input; + /* + * if the attribute ldif doesn't have an OID, we'll make the oid + * attrname-oid + */ + if ( (strcasecmp ( pOid, "NAME" ) == 0) && (first_attr_name)) { + slapi_ch_free_string( &pOid ); + pOid = slapi_ch_smprintf("%s-oid", first_attr_name ); + } - /* look for the optional COLLECTIVE marker */ - flags |= get_flag_keyword( schema_collective_with_spaces, - SLAPI_ATTR_FLAG_COLLECTIVE, &nextinput, keyword_strstr_fn ); + /* look for the optional DESCription */ + if ( (pStart = (*keyword_strstr_fn) ( nextinput, "DESC '")) != NULL ) { + pStart += 6; + sizedbuffer_allocate(psbAttrDesc,strlen(pStart)); + strcpy ( psbAttrDesc->buffer, pStart); + if ( (pEnd = strchr (psbAttrDesc->buffer, '\'' )) != NULL ){ + *pEnd ='\0'; + } + nextinput = pStart + strlen(psbAttrDesc->buffer) + 1; + } - if ( schema_ds4x_compat ) nextinput = input; + if ( schema_ds4x_compat ) nextinput = input; - /* look for the optional NO-USER-MODIFICATION marker */ - flags |= get_flag_keyword( schema_nousermod_with_spaces, - SLAPI_ATTR_FLAG_NOUSERMOD, &nextinput, keyword_strstr_fn ); + /* look for the optional OBSOLETE marker */ + flags |= get_flag_keyword( schema_obsolete_with_spaces, + SLAPI_ATTR_FLAG_OBSOLETE, &nextinput, keyword_strstr_fn ); + + if ( schema_ds4x_compat ) nextinput = input; + + /* look for the optional SUPerior type */ + pSuperior = get_tagged_oid( "SUP ", &nextinput, keyword_strstr_fn ); + + if ( schema_ds4x_compat ) nextinput = input; + + /* look for the optional matching rules */ + pMREquality = get_tagged_oid( "EQUALITY ", &nextinput, keyword_strstr_fn ); + if ( schema_ds4x_compat ) nextinput = input; + pMROrdering = get_tagged_oid( "ORDERING ", &nextinput, keyword_strstr_fn ); + if ( schema_ds4x_compat ) nextinput = input; + pMRSubstring = get_tagged_oid( "SUBSTR ", &nextinput, keyword_strstr_fn ); + if ( schema_ds4x_compat ) nextinput = input; + + /* look for the optional SYNTAX */ + if ( NULL != ( pSyntax = get_tagged_oid( "SYNTAX ", &nextinput, + keyword_strstr_fn ))) { + /* + * Check for an optional {LEN}, which if present indicates a + * suggested maximum size for values of this attribute type. + * + * XXXmcs: we do not enforce length restrictions, but we do read + * and include them in the subschemasubentry. + */ + if ( (pEnd = strchr ( pSyntax, '{')) != NULL /* balance } */ ) { + *pEnd = '\0'; + syntaxlength = atoi( pEnd + 1 ); + } + } - if ( schema_ds4x_compat ) nextinput = input; + if ( schema_ds4x_compat ) nextinput = input; - /* look for the optional USAGE */ - if (NULL != (ss = (*keyword_strstr_fn)(nextinput, " USAGE "))) { - ss += 7; - ss = skipWS(ss); - if (ss) { - if ( !PL_strncmp(ss, "directoryOperation", - strlen("directoryOperation"))) { - flags |= SLAPI_ATTR_FLAG_OPATTR; - } - if ( NULL == ( nextinput = strchr( ss, ' ' ))) { - nextinput = ss + strlen(ss); - } - } - } + /* look for the optional SINGLE-VALUE marker */ + flags |= get_flag_keyword( " SINGLE-VALUE ", + SLAPI_ATTR_FLAG_SINGLE, &nextinput, keyword_strstr_fn ); + + if ( schema_ds4x_compat ) nextinput = input; + + /* look for the optional COLLECTIVE marker */ + flags |= get_flag_keyword( schema_collective_with_spaces, + SLAPI_ATTR_FLAG_COLLECTIVE, &nextinput, keyword_strstr_fn ); + + if ( schema_ds4x_compat ) nextinput = input; + + /* look for the optional NO-USER-MODIFICATION marker */ + flags |= get_flag_keyword( schema_nousermod_with_spaces, + SLAPI_ATTR_FLAG_NOUSERMOD, &nextinput, keyword_strstr_fn ); + + if ( schema_ds4x_compat ) nextinput = input; + + /* look for the optional USAGE */ + if (NULL != (ss = (*keyword_strstr_fn)(nextinput, " USAGE "))) { + ss += 7; + ss = skipWS(ss); + if (ss) { + if ( !PL_strncmp(ss, "directoryOperation", + strlen("directoryOperation"))) { + flags |= SLAPI_ATTR_FLAG_OPATTR; + } + if ( NULL == ( nextinput = strchr( ss, ' ' ))) { + nextinput = ss + strlen(ss); + } + } + } - if ( schema_ds4x_compat ) nextinput = input; + if ( schema_ds4x_compat ) nextinput = input; - /* X-ORIGIN list */ - attr_origins = parse_origin_list( nextinput, &num_origins, - schema_user_defined_origin ); + /* X-ORIGIN list */ + attr_origins = parse_origin_list( nextinput, &num_origins, + schema_user_defined_origin ); - /* Do some sanity checking to make sure everything was read correctly */ - - if (NULL == pOid) { - schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, - first_attr_name, "Missing OID" ); - status = invalid_syntax_error; - } - if (!status && (!attr_names || !num_names)) { - schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, - first_attr_name, - "Missing name (OID is \"%s\")", pOid ); - status = invalid_syntax_error; - } + /* Do some sanity checking to make sure everything was read correctly */ + + if (NULL == pOid) { + schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, + first_attr_name, "Missing OID" ); + status = invalid_syntax_error; + } + if (!status && (!attr_names || !num_names)) { + schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, + first_attr_name, + "Missing name (OID is \"%s\")", pOid ); + status = invalid_syntax_error; + } if (!status && (NULL != pSuperior)) { struct asyntaxinfo *asi_parent; @@ -3369,7 +3404,7 @@ char *pso = plugin_syntax2oid(asi_parent->asi_plugin); if (pso) { - slapi_ch_free ((void **)&pSyntax); + slapi_ch_free ((void **)&pSyntax); pSyntax = slapi_ch_strdup(pso); LDAPDebug (LDAP_DEBUG_TRACE, "Inheriting syntax %s from parent type %s\n", @@ -3380,6 +3415,7 @@ "Missing parent attribute syntax OID"); status = invalid_syntax_error; } + attr_syntax_return( asi_parent ); } } /* @@ -3401,135 +3437,137 @@ } } - if (!status && (NULL == pSyntax)) { - schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, - first_attr_name, "Missing attribute syntax OID"); - status = invalid_syntax_error; + if (!status && (NULL == pSyntax)) { + schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, + first_attr_name, "Missing attribute syntax OID"); + status = invalid_syntax_error; - } - - if (!status && (plugin_syntax_find ( pSyntax ) == NULL) ) { - schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, - first_attr_name, "Unknown attribute syntax OID \"%s\"", - pSyntax ); - status = invalid_syntax_error; - } - - if (!status) { - struct objclass *poc; - /* check to make sure that the OID isn't being used by an objectclass */ - oc_lock_read(); - poc = oc_find_oid_nolock( pOid ); - if ( poc != NULL) { - schema_create_errormsg( errorbuf, errorbufsize, - schema_errprefix_at, first_attr_name, - "The OID \"%s\" is also used by the object class \"%s\"", - pOid, poc->oc_name); - status = LDAP_TYPE_OR_VALUE_EXISTS; - } - oc_unlock(); - } + } + + if (!status && (plugin_syntax_find ( pSyntax ) == NULL) ) { + schema_create_errormsg( errorbuf, errorbufsize, schema_errprefix_at, + first_attr_name, "Unknown attribute syntax OID \"%s\"", + pSyntax ); + status = invalid_syntax_error; + } - if (!status && !element_is_user_defined( attr_origins )) { - if ( is_user_defined ) { - /* add missing user defined origin string */ - charray_add( &attr_origins, - slapi_ch_strdup( schema_user_defined_origin[0] )); - ++num_origins; - } else { - flags |= SLAPI_ATTR_FLAG_STD_ATTR; - } - } + if (!status) { + struct objclass *poc; + /* check to make sure that the OID isn't being used by an objectclass */ + if (!(schema_flags & DSE_SCHEMA_LOCKED)) + oc_lock_read(); + poc = oc_find_oid_nolock( pOid ); + if ( poc != NULL) { + schema_create_errormsg( errorbuf, errorbufsize, + schema_errprefix_at, first_attr_name, + "The OID \"%s\" is also used by the object class \"%s\"", + pOid, poc->oc_name); + status = LDAP_TYPE_OR_VALUE_EXISTS; + } + if (!(schema_flags & DSE_SCHEMA_LOCKED)) + oc_unlock(); + } - if (!status) { - int ii; - /* check to see if the attribute name is valid */ - for (ii = 0; !status && (ii < num_names); ++ii) { - if ( schema_check_name(attr_names[ii], PR_TRUE, errorbuf, - errorbufsize) == 0 ) { - status = invalid_syntax_error; - } - else if (!(flags & SLAPI_ATTR_FLAG_OVERRIDE) && - attr_syntax_exists(attr_names[ii])) { - schema_create_errormsg( errorbuf, errorbufsize, - schema_errprefix_at, attr_names[ii], - "Could not be added because it already exists" ); - status = LDAP_TYPE_OR_VALUE_EXISTS; - } - } - } + if (!status && !element_is_user_defined( attr_origins )) { + if ( is_user_defined ) { + /* add missing user defined origin string */ + charray_add( &attr_origins, + slapi_ch_strdup( schema_user_defined_origin[0] )); + ++num_origins; + } else { + flags |= SLAPI_ATTR_FLAG_STD_ATTR; + } + } - if (!status) { - if ( schema_check_oid ( first_attr_name, pOid, PR_TRUE, errorbuf, - errorbufsize ) == 0 ) { - status = invalid_syntax_error; - } - } + if (!(schema_flags & DSE_SCHEMA_NO_CHECK) && !status) { + int ii; + /* check to see if the attribute name is valid */ + for (ii = 0; !status && (ii < num_names); ++ii) { + if ( schema_check_name(attr_names[ii], PR_TRUE, errorbuf, + errorbufsize) == 0 ) { + status = invalid_syntax_error; + } + else if (!(flags & SLAPI_ATTR_FLAG_OVERRIDE) && + attr_syntax_exists(attr_names[ii])) { + schema_create_errormsg( errorbuf, errorbufsize, + schema_errprefix_at, attr_names[ii], + "Could not be added because it already exists" ); + status = LDAP_TYPE_OR_VALUE_EXISTS; + } + } + } - if (!status) { - struct asyntaxinfo *tmpasi; - - if (!(flags & SLAPI_ATTR_FLAG_OVERRIDE) && - ( NULL != ( tmpasi = attr_syntax_get_by_oid(pOid)))) { - schema_create_errormsg( errorbuf, errorbufsize, - schema_errprefix_at, first_attr_name, - "Could not be added because the OID \"%s\" is already in use", - pOid); - status = LDAP_TYPE_OR_VALUE_EXISTS; - attr_syntax_return( tmpasi ); - } - } + if (!(schema_flags & DSE_SCHEMA_NO_CHECK) && !status) { + if ( schema_check_oid ( first_attr_name, pOid, PR_TRUE, errorbuf, + errorbufsize ) == 0 ) { + status = invalid_syntax_error; + } + } - - if (!status) { - status = attr_syntax_create( pOid, attr_names, num_names, - *psbAttrDesc->buffer == '\0' ? NULL : psbAttrDesc->buffer, - pSuperior, - pMREquality, pMROrdering, pMRSubstring, attr_origins, - pSyntax, syntaxlength, flags, &tmpasip ); - } - - if (!status) { - if ( NULL != asipp ) { - *asipp = tmpasip; /* just return it */ - } else { /* add the new attribute to the global store */ - status = attr_syntax_add( tmpasip ); - if ( LDAP_SUCCESS != status ) { - if ( 0 != (flags & SLAPI_ATTR_FLAG_OVERRIDE) && - LDAP_TYPE_OR_VALUE_EXISTS == status ) { - /* - * This can only occur if the name and OID don't match the - * attribute we are trying to override (all other cases of - * "type or value exists" were trapped above). - */ - schema_create_errormsg( errorbuf, errorbufsize, - schema_errprefix_at, first_attr_name, - "Does not match the OID \"%s\". Another attribute" - " type is already using the name or OID.", pOid); - } else { - schema_create_errormsg( errorbuf, errorbufsize, - schema_errprefix_at, first_attr_name, - "Could not be added (OID is \"%s\")", pOid ); - } - attr_syntax_free( tmpasip ); - } - } - } + if (!status) { + struct asyntaxinfo *tmpasi; + + if (!(flags & SLAPI_ATTR_FLAG_OVERRIDE) && + ( NULL != ( tmpasi = attr_syntax_get_by_oid(pOid)))) { + schema_create_errormsg( errorbuf, errorbufsize, + schema_errprefix_at, first_attr_name, + "Could not be added because the OID \"%s\" is already in use", + pOid); + status = LDAP_TYPE_OR_VALUE_EXISTS; + attr_syntax_return( tmpasi ); + } + } + + + if (!status) { + status = attr_syntax_create( pOid, attr_names, num_names, + *psbAttrDesc->buffer == '\0' ? NULL : psbAttrDesc->buffer, + pSuperior, + pMREquality, pMROrdering, pMRSubstring, attr_origins, + pSyntax, syntaxlength, flags, &tmpasip ); + } + + if (!status) { + if ( NULL != asipp ) { + *asipp = tmpasip; /* just return it */ + } else { /* add the new attribute to the global store */ + status = attr_syntax_add( tmpasip ); + if ( LDAP_SUCCESS != status ) { + if ( 0 != (flags & SLAPI_ATTR_FLAG_OVERRIDE) && + LDAP_TYPE_OR_VALUE_EXISTS == status ) { + /* + * This can only occur if the name and OID don't match the + * attribute we are trying to override (all other cases of + * "type or value exists" were trapped above). + */ + schema_create_errormsg( errorbuf, errorbufsize, + schema_errprefix_at, first_attr_name, + "Does not match the OID \"%s\". Another attribute" + " type is already using the name or OID.", pOid); + } else { + schema_create_errormsg( errorbuf, errorbufsize, + schema_errprefix_at, first_attr_name, + "Could not be added (OID is \"%s\")", pOid ); + } + attr_syntax_free( tmpasip ); + } + } + } done: - /* free everything */ - free_qdlist(attr_names, num_names); - free_qdlist(attr_origins, num_origins); - sizedbuffer_destroy(psbAttrName); - sizedbuffer_destroy(psbAttrDesc); - slapi_ch_free((void **)&pOid); - slapi_ch_free((void **)&pSuperior); - slapi_ch_free((void **)&pMREquality); - slapi_ch_free((void **)&pMROrdering); - slapi_ch_free((void **)&pMRSubstring); - slapi_ch_free((void **)&pSyntax); + /* free everything */ + free_qdlist(attr_names, num_names); + free_qdlist(attr_origins, num_origins); + sizedbuffer_destroy(psbAttrName); + sizedbuffer_destroy(psbAttrDesc); + slapi_ch_free((void **)&pOid); + slapi_ch_free((void **)&pSuperior); + slapi_ch_free((void **)&pMREquality); + slapi_ch_free((void **)&pMROrdering); + slapi_ch_free((void **)&pMRSubstring); + slapi_ch_free((void **)&pSyntax); - return status; + return status; } @@ -3911,96 +3949,122 @@ * Initialize attributes and objectclasses from the schema * * Note that this function removes all values for `attributetypes' - * and `objectclasses' attributes from the entry `e'. + * and `objectclasses' attributes from the entry `e'. * * returntext is always at least SLAPI_DSE_RETURNTEXT_SIZE bytes in size. */ int load_schema_dse(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *ignored, - int *returncode, char *returntext, void *arg) + int *returncode, char *returntext, void *arg) { - Slapi_Attr *attr = 0; - int nolock = 1; /* don't lock global resources during initialization */ - int primary_file = 0; /* this is the primary (writeable) schema file */ - int schema_ds4x_compat = config_get_ds4_compatible_schema(); + Slapi_Attr *attr = 0; + int primary_file = 0; /* this is the primary (writeable) schema file */ + int schema_ds4x_compat = config_get_ds4_compatible_schema(); + PRUint32 flags = *(PRUint32 *)arg; + flags |= DSE_SCHEMA_NO_GLOCK; /* don't lock global resources + during initialization */ - *returncode = 0; + *returncode = 0; - /* - * Note: there is no need to call schema_lock_write() here because this - * function is only called during server startup. - */ + /* + * Note: there is no need to call schema_lock_write() here because this + * function is only called during server startup. + */ - slapi_pblock_get( pb, SLAPI_DSE_IS_PRIMARY_FILE, &primary_file ); + slapi_pblock_get( pb, SLAPI_DSE_IS_PRIMARY_FILE, &primary_file ); - if (!slapi_entry_attr_find(e, "attributetypes", &attr) && attr) - { - /* enumerate the values in attr */ - Slapi_Value *v = 0; - int index = 0; - for (index = slapi_attr_first_value(attr, &v); - v && (index != -1); - index = slapi_attr_next_value(attr, index, &v)) - { - const char *s = slapi_value_get_string(v); - if (!s) - continue; - if ((*returncode = read_at_ldif(s, NULL, returntext, - SLAPI_DSE_RETURNTEXT_SIZE, nolock, - primary_file /* force user defined? */, - schema_ds4x_compat, 0)) != 0) - break; - } - slapi_entry_attr_delete(e, "attributetypes"); - } + if (!slapi_entry_attr_find(e, "attributetypes", &attr) && attr) + { + /* enumerate the values in attr */ + Slapi_Value *v = 0; + int index = 0; + for (index = slapi_attr_first_value(attr, &v); + v && (index != -1); + index = slapi_attr_next_value(attr, index, &v)) + { + const char *s = slapi_value_get_string(v); + if (!s) + continue; + if (flags & DSE_SCHEMA_NO_LOAD) + { + struct asyntaxinfo *tmpasip = NULL; + if ((*returncode = read_at_ldif(s, &tmpasip, returntext, + SLAPI_DSE_RETURNTEXT_SIZE, flags, + primary_file /* force user defined? */, + schema_ds4x_compat, 0)) != 0) + break; + attr_syntax_free( tmpasip ); /* trash it */ + } + else + { + if ((*returncode = read_at_ldif(s, NULL, returntext, + SLAPI_DSE_RETURNTEXT_SIZE, flags, + primary_file /* force user defined? */, + schema_ds4x_compat, 0)) != 0) + break; + } + } + slapi_entry_attr_delete(e, "attributetypes"); + } - if (*returncode) - return SLAPI_DSE_CALLBACK_ERROR; + if (*returncode) + return SLAPI_DSE_CALLBACK_ERROR; - if (!slapi_entry_attr_find(e, "objectclasses", &attr) && attr) - { - /* enumerate the values in attr */ - Slapi_Value *v = 0; - int index = 0; - for (index = slapi_attr_first_value(attr, &v); - v && (index != -1); - index = slapi_attr_next_value(attr, index, &v)) - { - struct objclass *oc = 0; - const char *s = slapi_value_get_string(v); - if (!s) - continue; - if ( LDAP_SUCCESS != (*returncode = read_oc_ldif(s, &oc, returntext, - SLAPI_DSE_RETURNTEXT_SIZE, nolock, - primary_file /* force user defined? */, - schema_ds4x_compat))) { - break; - } - if ( LDAP_SUCCESS != (*returncode = add_oc_internal(oc, returntext, - SLAPI_DSE_RETURNTEXT_SIZE, schema_ds4x_compat))) { - oc_free( &oc ); - break; - } - } - slapi_entry_attr_delete(e, "objectclasses"); - } + if (!slapi_entry_attr_find(e, "objectclasses", &attr) && attr) + { + /* enumerate the values in attr */ + Slapi_Value *v = 0; + int index = 0; + for (index = slapi_attr_first_value(attr, &v); + v && (index != -1); + index = slapi_attr_next_value(attr, index, &v)) + { + struct objclass *oc = 0; + const char *s = slapi_value_get_string(v); + if (!s) + continue; + if ( LDAP_SUCCESS != (*returncode = read_oc_ldif(s, &oc, returntext, + SLAPI_DSE_RETURNTEXT_SIZE, flags, + primary_file /* force user defined? */, + schema_ds4x_compat))) { + break; + } + if (flags & DSE_SCHEMA_NO_LOAD) + { + /* we don't load the objectclase; free it */ + oc_free( &oc ); + } + else + { + if ( LDAP_SUCCESS != + (*returncode = add_oc_internal(oc, returntext, + SLAPI_DSE_RETURNTEXT_SIZE, schema_ds4x_compat, + flags))) { + oc_free( &oc ); + break; + } + } + } + slapi_entry_attr_delete(e, "objectclasses"); + } - /* Set the schema CSN */ - if (!slapi_entry_attr_find(e, "nsschemacsn", &attr) && attr) - { - Slapi_Value *v = NULL; - slapi_attr_first_value(attr, &v); - if (NULL != v) { - const char *s = slapi_value_get_string(v); - if (NULL != s) { - CSN *csn = csn_new_by_string(s); - g_set_global_schema_csn(csn); - } - } - } + /* Set the schema CSN */ + if (!(flags & DSE_SCHEMA_NO_LOAD) && + !slapi_entry_attr_find(e, "nsschemacsn", &attr) && attr) + { + Slapi_Value *v = NULL; + slapi_attr_first_value(attr, &v); + if (NULL != v) { + const char *s = slapi_value_get_string(v); + if (NULL != s) { + CSN *csn = csn_new_by_string(s); + g_set_global_schema_csn(csn); + } + } + } - return (*returncode == LDAP_SUCCESS) ? SLAPI_DSE_CALLBACK_OK - : SLAPI_DSE_CALLBACK_ERROR; + return (*returncode == LDAP_SUCCESS) ? SLAPI_DSE_CALLBACK_OK + : SLAPI_DSE_CALLBACK_ERROR; } /* @@ -4010,30 +4074,51 @@ * schema entry into it. * * Returns 1 for OK, 0 for Fail. + * + * schema_flags: + * DSE_SCHEMA_NO_LOAD -- schema won't get loaded + * DSE_SCHEMA_NO_CHECK -- schema won't be checked + * DSE_SCHEMA_NO_BACKEND -- don't add as backend + * DSE_SCHEMA_LOCKED -- already locked; no further lock needed + */ -int -init_schema_dse(const char *configdir) +static int +init_schema_dse_ext(char *schemadir, Slapi_Backend *be, + struct dse **local_pschemadse, PRUint32 schema_flags) { - int rc= 1; /* OK */ - char *schemadir = 0; + int rc= 1; /* OK */ char *userschemafile = 0; char *userschematmpfile = 0; char **filelist = 0; + char *myschemadir = NULL; Slapi_DN schema; + if (NULL == local_pschemadse) + { + return 0; /* cannot proceed; return failure */ + } + slapi_sdn_init_dn_byref(&schema,"cn=schema"); - schemadir = config_get_schemadir(); - if (NULL == schemadir) { - /* schemadir info is not configured, let's use the default place */ - schemadir = slapi_ch_smprintf("%s/%s", configdir, SCHEMA_SUBDIR_NAME); + /* get schemadir if not given */ + if (NULL == schemadir) + { + myschemadir = config_get_schemadir(); + if (NULL == myschemadir) + { + return 0; /* cannot proceed; return failure */ + } + } + else + { + myschemadir = schemadir; } - filelist = get_priority_filelist(schemadir, ".*ldif$"); + filelist = get_priority_filelist(myschemadir, ".*ldif$"); if (!filelist || !*filelist) { slapi_log_error(SLAPI_LOG_FATAL, "schema", - "No schema files were found in the directory %s\n", schemadir); + "No schema files were found in the directory %s\n", myschemadir); free_filelist(filelist); rc = 0; } @@ -4046,21 +4131,26 @@ userschematmpfile = slapi_ch_smprintf("%s.tmp", userschemafile); } - if(rc && (pschemadse==NULL)) - { - pschemadse= dse_new_with_filelist(userschemafile,userschematmpfile, NULL, NULL, - schemadir,filelist); - PR_ASSERT(pschemadse); - if ((rc= (pschemadse!=NULL)) != 0) - dse_register_callback(pschemadse,DSE_OPERATION_READ,DSE_FLAG_PREOP,&schema, - LDAP_SCOPE_BASE,NULL, - load_schema_dse,NULL); - slapi_ch_free((void**)&userschematmpfile); - } - slapi_ch_free((void**)&schemadir); + if(rc) + { + *local_pschemadse = dse_new_with_filelist(userschemafile, + userschematmpfile, NULL, NULL, myschemadir, filelist); + } + PR_ASSERT(*local_pschemadse); + if ((rc = (*local_pschemadse != NULL)) != 0) + { + /* pass schema_flags as arguments */ + dse_register_callback(*local_pschemadse, + DSE_OPERATION_READ, DSE_FLAG_PREOP, &schema, + LDAP_SCOPE_BASE, NULL, + load_schema_dse, (void *)&schema_flags); + } + slapi_ch_free_string(&userschematmpfile); + if (NULL == schemadir) + slapi_ch_free_string(&myschemadir); /* allocated in this function */ - if(rc) - { + if(rc) + { char errorbuf[SLAPI_DSE_RETURNTEXT_SIZE] = {0}; int dont_write = 1; int merge = 1; @@ -4073,14 +4163,30 @@ slapi_pblock_set(&pb, SLAPI_DSE_MERGE_WHEN_ADDING, (void*)&merge); /* use the non duplicate checking str2entry */ slapi_pblock_set(&pb, SLAPI_DSE_DONT_CHECK_DUPS, (void*)&dont_dup_check); + /* borrow the task flag space */ + slapi_pblock_set(&pb, SLAPI_SCHEMA_FLAGS, (void*)&schema_flags); /* add the objectclass attribute so we can do some basic schema checking during initialization; this will be overridden when its "real" definition is read from the schema conf files */ - rc = read_at_ldif("attributeTypes: ( 2.5.4.0 NAME 'objectClass' " + if (schema_flags & DSE_SCHEMA_NO_LOAD) + { + struct asyntaxinfo *tmpasip = NULL; + rc = read_at_ldif("attributeTypes: ( 2.5.4.0 NAME 'objectClass' " "DESC 'Standard schema for LDAP' SYNTAX " "1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 2252' )", - NULL, errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, 1, 0, 0, 0); + &tmpasip, errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + DSE_SCHEMA_NO_GLOCK|schema_flags, 0, 0, 0); + attr_syntax_free( tmpasip ); /* trash it */ + } + else + { + rc = read_at_ldif("attributeTypes: ( 2.5.4.0 NAME 'objectClass' " + "DESC 'Standard schema for LDAP' SYNTAX " + "1.3.6.1.4.1.1466.115.121.1.15 X-ORIGIN 'RFC 2252' )", + NULL, errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, + DSE_SCHEMA_NO_GLOCK|schema_flags, 0, 0, 0); + } if (rc) { slapi_log_error(SLAPI_LOG_FATAL, "schema", "Could not add" @@ -4088,39 +4194,69 @@ errorbuf); } - rc = dse_read_file(pschemadse, &pb); - } + rc = dse_read_file(*local_pschemadse, &pb); + } - if (rc) + if (rc && !(schema_flags & DSE_SCHEMA_NO_BACKEND)) { /* make sure the schema is normalized */ - normalize_oc(); + if (schema_flags & DSE_SCHEMA_LOCKED) + normalize_oc_nolock(); + else + normalize_oc(); /* register callbacks */ - dse_register_callback(pschemadse,SLAPI_OPERATION_SEARCH,DSE_FLAG_PREOP,&schema, - LDAP_SCOPE_BASE,NULL,read_schema_dse,NULL); - dse_register_callback(pschemadse,SLAPI_OPERATION_MODIFY,DSE_FLAG_PREOP,&schema, - LDAP_SCOPE_BASE,NULL,modify_schema_dse,NULL); - dse_register_callback(pschemadse,SLAPI_OPERATION_DELETE,DSE_FLAG_PREOP,&schema, - LDAP_SCOPE_BASE,NULL,dont_allow_that,NULL); - dse_register_callback(pschemadse,DSE_OPERATION_WRITE,DSE_FLAG_PREOP,&schema, - LDAP_SCOPE_BASE,NULL,refresh_user_defined_schema, - NULL); + dse_register_callback(*local_pschemadse, SLAPI_OPERATION_SEARCH, + DSE_FLAG_PREOP,&schema, LDAP_SCOPE_BASE, + NULL, read_schema_dse, NULL); + dse_register_callback(*local_pschemadse, SLAPI_OPERATION_MODIFY, + DSE_FLAG_PREOP,&schema, LDAP_SCOPE_BASE, + NULL, modify_schema_dse, NULL); + dse_register_callback(*local_pschemadse, SLAPI_OPERATION_DELETE, + DSE_FLAG_PREOP, &schema, LDAP_SCOPE_BASE, + NULL,dont_allow_that,NULL); + dse_register_callback(*local_pschemadse, DSE_OPERATION_WRITE, + DSE_FLAG_PREOP, &schema, LDAP_SCOPE_BASE, + NULL, refresh_user_defined_schema, NULL); if (rc) { - Slapi_Backend *be; - - /* add as a backend */ - be= be_new_internal(pschemadse,"DSE", "schema-internal"); /* JCM - should be a #define */ - be_addsuffix(be,&schema); + if (NULL == be) { /* be is not given. select it */ + be = slapi_be_select_by_instance_name( DSE_SCHEMA ); + } + if (NULL == be) { /* first time */ + /* add as a backend */ + be = be_new_internal(*local_pschemadse, "DSE", DSE_SCHEMA); + be_addsuffix(be, &schema); + } else { /* schema file reload */ + struct slapdplugin *backend_plugin = NULL; + be_replace_dse_internal(be, *local_pschemadse); + + /* ldbm has some internal attributes to be added */ + backend_plugin = plugin_get_by_name("ldbm database"); + if (backend_plugin) { + (backend_plugin->plg_add_schema)( NULL ); + } + } } } slapi_sdn_done(&schema); - return rc; + return rc; } - +int +init_schema_dse(const char *configdir) +{ + char *schemadir = config_get_schemadir(); + int rc = 0; + if (NULL == schemadir) + { + schemadir = slapi_ch_smprintf("%s/%s", configdir, SCHEMA_SUBDIR_NAME); + } + rc = init_schema_dse_ext(schemadir, NULL, &pschemadse, 0); + slapi_ch_free_string(&schemadir); + return rc; +} /* * Look for `keyword' within `*inputp' and return the flag_value if found @@ -4713,3 +4849,115 @@ oc_unlock(); } + +void +schema_expand_objectclasses_nolock( Slapi_Entry *e ) +{ + Slapi_Attr *sa; + Slapi_Value **va; + const char *dn = slapi_entry_get_dn_const( e ); + int i; + + if ( 0 != slapi_entry_attr_find( e, SLAPI_ATTR_OBJECTCLASS, &sa )) { + return; /* no OC values -- nothing to do */ + } + + va = attr_get_present_values( sa ); + + if ( va == NULL || va[0] == NULL ) { + return; /* no OC values -- nothing to do */ + } + + /* + * This loop relies on the fact that bv_expand_one_oc() + * always adds to the end + */ + for ( i = 0; va[i] != NULL; ++i ) { + if ( NULL != slapi_value_get_string(va[i]) ) { + va_expand_one_oc( dn, &va, slapi_value_get_string(va[i]) ); + } + } + + /* top must always be present */ + va_expand_one_oc( dn, &va, "top" ); + + /* + * Reset the present values in the set because we may have realloc'd it. + * Note that this is the counterpart to the attr_get_present_values() + * call we made above... nothing new has been allocated, but sa holds + * a pointer to the original (pre realloc) va. + */ + sa->a_present_values.va = va; +} + +/* lock to protect both objectclass and schema_dse */ +static void +slapi_load_schemafile_lock() +{ + oc_lock_write(); + schema_dse_lock_write(); +} + +static void +slapi_load_schemafile_unlock() +{ + schema_dse_unlock(); + oc_unlock(); +} + +/* API to validate the schema files */ +int +slapi_validate_schema_files(char *schemadir) +{ + struct dse *my_pschemadse = NULL; + int rc = init_schema_dse_ext(schemadir, NULL, &my_pschemadse, + DSE_SCHEMA_NO_LOAD | DSE_SCHEMA_NO_BACKEND); + dse_destroy(my_pschemadse); + if (rc) + return LDAP_SUCCESS; + else { + slapi_log_error( SLAPI_LOG_FATAL, "schema_reload", + "schema file validation failed\n" ); + return LDAP_OBJECT_CLASS_VIOLATION; + } +} + +/* + * API to reload the schema files. + * Rule: this function is called when slapi_validate_schema_files is passed. + * Schema checking is skipped in this function. + */ +int +slapi_reload_schema_files(char *schemadir) +{ + int rc = LDAP_SUCCESS; + struct dse *my_pschemadse = NULL; + /* get be to lock */ + Slapi_Backend *be = slapi_be_select_by_instance_name( DSE_SCHEMA ); + + if (NULL == be) + { + slapi_log_error( SLAPI_LOG_FATAL, "schema_reload", + "schema file reload failed\n" ); + return LDAP_LOCAL_ERROR; + } + slapi_be_Wlock(be); /* be lock must be outer of schemafile lock */ + slapi_load_schemafile_lock(); + attr_syntax_delete_all(); + oc_delete_all_nolock(); + rc = init_schema_dse_ext(schemadir, be, &my_pschemadse, + DSE_SCHEMA_NO_CHECK | DSE_SCHEMA_LOCKED); + if (rc) { + dse_destroy(pschemadse); + pschemadse = my_pschemadse; + slapi_load_schemafile_unlock(); + slapi_be_Unlock(be); + return LDAP_SUCCESS; + } else { + slapi_load_schemafile_unlock(); + slapi_be_Unlock(be); + slapi_log_error( SLAPI_LOG_FATAL, "schema_reload", + "schema file reload failed\n" ); + return LDAP_LOCAL_ERROR; + } +} Index: schemaparse.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/schemaparse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- schemaparse.c 10 Nov 2006 23:45:40 -0000 1.5 +++ schemaparse.c 4 Jun 2008 22:22:55 -0000 1.6 @@ -254,6 +254,24 @@ oc_unlock(); } +void +normalize_oc_nolock( void ) +{ + struct objclass *oc; + + for ( oc = g_get_global_oc_nolock(); oc != NULL; oc = oc->oc_next ) { + LDAPDebug (LDAP_DEBUG_PARSE, + "normalize_oc: normalizing '%s'\n", oc->oc_name, 0, 0); + /* required attributes */ + normalize_list( oc->oc_required ); + normalize_list( oc->oc_orig_required ); + + /* optional attributes */ + normalize_list( oc->oc_allowed ); + normalize_list( oc->oc_orig_allowed ); + } +} + /* * oc_update_inheritance_nolock: * If an objectclass is redefined, we need to make sure that any objectclasses Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- slap.h 16 May 2008 16:46:49 -0000 1.32 +++ slap.h 4 Jun 2008 22:22:55 -0000 1.33 @@ -776,7 +776,8 @@ IFP plg_un_db_register_oc_callback; /* Register a function to call when a operation is applied to a given ObjectClass */ IFP plg_un_db_init_instance; /* initializes new db instance */ IFP plg_un_db_wire_import; /* fast replica update */ - IFP plg_un_db_verify; /* verify db files */ + IFP plg_un_db_add_schema; /* add schema */ + IFP plg_un_db_verify; /* verify db files */ } plg_un_db; #define plg_bind plg_un.plg_un_db.plg_un_db_bind #define plg_unbind plg_un.plg_un_db.plg_un_db_unbind @@ -808,6 +809,7 @@ #define plg_rmdb plg_un.plg_un_db.plg_un_db_rmdb #define plg_init_instance plg_un.plg_un_db.plg_un_db_init_instance #define plg_wire_import plg_un.plg_un_db.plg_un_db_wire_import +#define plg_add_schema plg_un.plg_un_db.plg_un_db_add_schema /* extended operation plugin structure */ struct plg_un_protocol_extension { @@ -1414,7 +1416,9 @@ after the schema and syntax and matching rule plugins are running */ int pb_dse_is_primary_file; /* for read callbacks: non-zero for primary file */ - int pb_schema_user_defined_only; /* return user defined schema only */ + int pb_schema_flags; /* schema flags */ + /* . check/load info (schema reload task) */ + /* . refresh user defined schema */ /* NEW in 5.0 for getting back the backend result in frontend */ int pb_result_code; /* operation result code */ Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- slapi-plugin.h 30 May 2008 15:39:00 -0000 1.21 +++ slapi-plugin.h 4 Jun 2008 22:22:55 -0000 1.22 @@ -217,6 +217,7 @@ has the RDN as an attribute of the entry, and has all values for a given attribute type listed contiguously. */ #define SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF 128 +#define SLAPI_STR2ENTRY_NO_SCHEMA_LOCK 256 char *slapi_entry2str_with_options( Slapi_Entry *e, int *len, int options ); /* Options for slapi_entry2str_with_options() */ @@ -1431,7 +1432,7 @@ #define SLAPI_DSE_IS_PRIMARY_FILE 289 /* internal schema flags */ -#define SLAPI_SCHEMA_USER_DEFINED_ONLY 285 +#define SLAPI_SCHEMA_FLAGS 285 /* urp flags */ #define SLAPI_URP_NAMING_COLLISION_DN 286 Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- slapi-private.h 3 Apr 2008 16:52:46 -0000 1.21 +++ slapi-private.h 4 Jun 2008 22:22:55 -0000 1.22 @@ -648,6 +648,8 @@ void be_set_sizelimit(Slapi_Backend * be, int sizelimit); void be_set_timelimit(Slapi_Backend * be, int timelimit); +int be_isdeleted( const Slapi_Backend *be ); + /* used by mapping tree to delay sending of result code when several * backend are parsed @@ -857,6 +859,7 @@ #define SLAPI_PLUGIN_DB_WIRE_IMPORT_FN 234 #define SLAPI_PLUGIN_DB_UPGRADEDB_FN 235 #define SLAPI_PLUGIN_DB_DBVERIFY_FN 236 +#define SLAPI_PLUGIN_DB_ADD_SCHEMA_FN 237 /* database plugin-specific parameters */ #define SLAPI_PLUGIN_DB_NO_ACL 250 #define SLAPI_PLUGIN_DB_RMDB_FN 280 @@ -1073,6 +1076,17 @@ int slapi_config_register_callback(int operation, int flags, const char *base, int scope, const char *filter, dseCallbackFn fn, void *fn_arg); int slapi_config_remove_callback(int operation, int flags, const char *base, int scope, const char *filter, dseCallbackFn fn); int config_is_slapd_lite( void ); +void schema_expand_objectclasses_nolock( Slapi_Entry *e ); + +#define DSE_SCHEMA_NO_LOAD 0x0001 /* schema won't get loaded */ +#define DSE_SCHEMA_NO_CHECK 0x0002 /* schema won't be checked */ +#define DSE_SCHEMA_NO_BACKEND 0x0004 /* don't add as backend */ + +#define DSE_SCHEMA_NO_GLOCK 0x0010 /* don't lock global resources */ +#define DSE_SCHEMA_LOCKED 0x0020 /* already locked with + * slapi_load_schemafile_lock; + * no further lock needed */ +#define DSE_SCHEMA_USER_DEFINED_ONLY 0x0100 /* refresh user defined schema */ #define SLAPI_RTN_BIT_FETCH_EXISTING_DN_ENTRY 0 #define SLAPI_RTN_BIT_FETCH_PARENT_ENTRY 1 From fedora-directory-commits at redhat.com Wed Jun 4 22:23:00 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 4 Jun 2008 18:23:00 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/schema_reload schema_reload.c, NONE, 1.1 Message-ID: <200806042223.m54MN0HN000437@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/schema_reload In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32401/ldap/servers/plugins/schema_reload Added Files: schema_reload.c Log Message: Resolves: #436837 Summary: Dynamically reload schema via task interface Description: implemented task based schema file reloading (see also http://directory.fedoraproject.org/wiki/Dynamically_Reload_Schema) --- NEW FILE schema_reload.c --- /** BEGIN COPYRIGHT BLOCK * This Program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation; version 2 of the License. * * This Program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA. * * In addition, as a special exception, Red Hat, Inc. gives You the additional * right to link the code of this Program with code not covered under the GNU * General Public License ("Non-GPL Code") and to distribute linked combinations * including the two, subject to the limitations in this paragraph. Non-GPL Code * permitted under this exception must only link to the code of this Program * through those well defined interfaces identified in the file named EXCEPTION * found in the source code files (the "Approved Interfaces"). The files of * Non-GPL Code may instantiate templates or use macros or inline functions from * the Approved Interfaces without causing the resulting work to be covered by * the GNU General Public License. Only Red Hat, Inc. may make changes or * additions to the list of Approved Interfaces. You must obey the GNU General * Public License in all respects for all of the Program code and other code used * in conjunction with the Program except the Non-GPL Code covered by this * exception. If you modify this file, you may extend this exception to your * version of the file, but you are not obligated to do so. If you do not wish to * provide this exception without modification, you must delete this exception * statement from your version and license this file solely under the GPL without * exception. * * Copyright (C) 2008 Red Hat, Inc. * All rights reserved. * END COPYRIGHT BLOCK **/ #ifdef HAVE_CONFIG_H # include #endif /* * Dynamic schema file reload plugin * * plugin entry in dse.ldif * dn: cn=Schema Reload,cn=plugins,cn=config * objectClass: top * objectClass: nsSlapdPlugin * objectClass: extensibleObject * cn: Schema Reload * nsslapd-pluginPath: libschemareload-plugin * nsslapd-pluginInitfunc: schemareload_init * nsslapd-pluginType: object * nsslapd-pluginEnabled: on * nsslapd-pluginId: schemareload * nsslapd-pluginVersion: * nsslapd-pluginVendor: * nsslapd-pluginDescription: task plugin to reload schema files * * config task entry in dse.ldif (registered in schemareload_start) * dn: cn=schema reload task, cn=tasks, cn=config * objectClass: top * objectClass: extensibleObject * cn: schema reload task * * To invoke the sample task, run the command line: * $ ldapmodify -h -p -D "cn=Directory Manager" -w -a * dn: cn=schema reload task 0, cn=schema reload task, cn=tasks, cn=config * objectClass: top * objectClass: extensibleObject * cn: schema reload task 0 * [ schemadir: path to reload files from ] */ #include "slapi-plugin.h" #include "nspr.h" #include "dirver.h" /* PRODUCTTEXT */ #include /* PLUGIN_MAGIC_VENDOR_STR */ static PRLock *schemareload_lock = NULL; static Slapi_PluginDesc pdesc = { "schemareload", PLUGIN_MAGIC_VENDOR_STR, PRODUCTTEXT, "task plugin to reload schema files" }; static int schemareload_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *returncode, char *returntext, void *arg); static int schemareload_start(Slapi_PBlock *pb); /* * Init function * Specified in the plugin entry as "nsslapd-pluginInitfunc: schemareload_init" */ int schemareload_init( Slapi_PBlock *pb ) { int rc = 0; schemareload_lock = PR_NewLock(); if (NULL == schemareload_lock) { slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Failed to create global schema reload lock."); return rc; } rc = slapi_pblock_set( pb, SLAPI_PLUGIN_VERSION, (void *) SLAPI_PLUGIN_VERSION_03 ); rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DESCRIPTION, (void *)&pdesc ); rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_START_FN, (void *) schemareload_start ); return rc; } /* * Task start function * Register the function schemareload_add, which invokes the task on demand. */ static int schemareload_start(Slapi_PBlock *pb) { int rc = slapi_task_register_handler("schema reload task", schemareload_add); return rc; } /* * Task thread * This is the heart of the reload-schema-file task: * - calling the schema APIs to validate the schema files, * - reloading them if the files are valid. * Not necessary be a thread, but it'd not disturb the server's other jobs. */ static void schemareload_thread(void *arg) { Slapi_Task *task = (Slapi_Task *)arg; int i, rv = 0; int total_work = 2; /* fetch our argument from the task */ char *schemadir = (char *)slapi_task_get_data(task); /* update task state to show it's running */ slapi_task_begin(task, total_work); PR_Lock(schemareload_lock); /* make schema reload serialized */ slapi_task_log_notice(task, "Schema reload task starts (schema dir: %s) ...\n", schemadir?schemadir:"default"); slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema reload task starts (schema dir: %s) ...\n", schemadir?schemadir:"default"); rv = slapi_validate_schema_files(schemadir); slapi_task_inc_progress(task); if (LDAP_SUCCESS == rv) { slapi_task_log_notice(task, "Schema validation passed."); slapi_task_log_status(task, "Schema validation passed."); slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema validation passed.\n"); rv = slapi_reload_schema_files(schemadir); slapi_task_inc_progress(task); /* update task state to say we're finished */ if (LDAP_SUCCESS == rv) { slapi_task_log_notice(task, "Schema reload task finished."); slapi_task_log_status(task, "Schema reload task finished."); slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema reload task finished.\n"); } else { slapi_task_log_notice(task, "Schema reload task failed."); slapi_task_log_status(task, "Schema reload task failed."); slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema reload task failed.\n"); } PR_Unlock(schemareload_lock); } else { slapi_task_log_notice(task, "Schema validation failed."); slapi_task_log_status(task, "Schema validation failed."); slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "Schema validation failed.\n"); PR_Unlock(schemareload_lock); } /* this will queue the destruction of the task */ slapi_task_finish(task, rv); } /* extract a single value from the entry (as a string) -- if it's not in the * entry, the default will be returned (which can be NULL). * you do not need to free anything returned by this. */ static const char *fetch_attr(Slapi_Entry *e, const char *attrname, const char *default_val) { Slapi_Attr *attr; Slapi_Value *val = NULL; if (slapi_entry_attr_find(e, attrname, &attr) != 0) return default_val; slapi_attr_first_value(attr, &val); return slapi_value_get_string(val); } static void schemareload_destructor(Slapi_Task *task) { if (task) { char *schemadir = (char *)slapi_task_get_data(task); slapi_ch_free_string(&schemadir); } } /* * Invoked when the task instance is added by the client (step 5 of the comment) * Get the necessary attributes from the task entry, and spawns a thread to do * the task. */ static int schemareload_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *returncode, char *returntext, void *arg) { PRThread *thread = NULL; const char *cn; int rv = SLAPI_DSE_CALLBACK_OK; Slapi_PBlock *mypb = NULL; Slapi_Task *task = NULL; char *schemadir = NULL; *returncode = LDAP_SUCCESS; if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { *returncode = LDAP_OBJECT_CLASS_VIOLATION; rv = SLAPI_DSE_CALLBACK_ERROR; goto out; } /* get arg(s) */ schemadir = fetch_attr(e, "schemadir", NULL); /* allocate new task now */ task = slapi_new_task(slapi_entry_get_ndn(e)); if (task == NULL) { slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "unable to allocate new task!\n"); *returncode = LDAP_OPERATIONS_ERROR; rv = SLAPI_DSE_CALLBACK_ERROR; goto out; } /* set a destructor that will clean up schemadir for us when the task is complete */ slapi_task_set_destructor_fn(task, schemareload_destructor); /* Stash our argument in the task for use by the task thread */ slapi_task_set_data(task, slapi_ch_strdup(schemadir)); /* start the schema reload task as a separate thread */ thread = PR_CreateThread(PR_USER_THREAD, schemareload_thread, (void *)task, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, SLAPD_DEFAULT_THREAD_STACKSIZE); if (thread == NULL) { slapi_log_error(SLAPI_LOG_FATAL, "schemareload", "unable to create schema reload task thread!\n"); *returncode = LDAP_OPERATIONS_ERROR; rv = SLAPI_DSE_CALLBACK_ERROR; slapi_task_finish(task, *returncode); } else { /* thread successful */ rv = SLAPI_DSE_CALLBACK_OK; } out: return rv; } From fedora-directory-commits at redhat.com Wed Jun 4 22:22:59 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 4 Jun 2008 18:22:59 -0400 Subject: [Fedora-directory-commits] ldapserver aclocal.m4, 1.66, 1.67 configure, 1.83, 1.84 ltmain.sh, 1.24, 1.25 Makefile.am, 1.67, 1.68 Makefile.in, 1.87, 1.88 Message-ID: <200806042222.m54MMx8R000429@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32401 Modified Files: aclocal.m4 configure ltmain.sh Makefile.am Makefile.in Log Message: Resolves: #436837 Summary: Dynamically reload schema via task interface Description: implemented task based schema file reloading (see also http://directory.fedoraproject.org/wiki/Dynamically_Reload_Schema) Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- aclocal.m4 30 May 2008 15:38:59 -0000 1.66 +++ aclocal.m4 4 Jun 2008 22:22:57 -0000 1.67 @@ -1578,27 +1578,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4305,9 +4288,6 @@ # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -4441,11 +4421,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. @@ -4457,7 +4437,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4537,7 +4517,7 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -6373,7 +6353,6 @@ done done done -IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6406,7 +6385,6 @@ done ]) SED=$lt_cv_path_SED -AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.83 retrieving revision 1.84 diff -u -r1.83 -r1.84 --- configure 30 May 2008 15:38:59 -0000 1.83 +++ configure 4 Jun 2008 22:22:57 -0000 1.84 @@ -465,7 +465,7 @@ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP! P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_autobind_TRUE enable_autobind_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CX! XCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE enable_ldapi_TRUE enable_ldapi_FALSE enable_autobind_TRUE enable_autobind_FALSE enable_bitwise_TRUE enable_bitwise_FALSE with_fhs_opt configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir perldir infdir mibdir defaultuser defaultgroup instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir perlexec initconfigdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG PACKAGE_BASE_VERSION nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir sasl_path svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link brand capbrand vendor LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3838,7 +3838,6 @@ done done done -IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -3873,7 +3872,6 @@ fi SED=$lt_cv_path_SED - echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4314,7 +4312,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4317 "configure"' > conftest.$ac_ext + echo '#line 4315 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5449,7 +5447,7 @@ # Provide some information about the compiler. -echo "$as_me:5452:" \ +echo "$as_me:5450:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6512,11 +6510,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6515: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6513: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6519: \$? = $ac_status" >&5 + echo "$as_me:6517: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6780,11 +6778,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6783: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6781: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6787: \$? = $ac_status" >&5 + echo "$as_me:6785: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6884,11 +6882,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6887: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6885: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6891: \$? = $ac_status" >&5 + echo "$as_me:6889: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8349,31 +8347,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 8356 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9250,7 +9227,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11670: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11700: \$? = $ac_status" >&5 + echo "$as_me:11674: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11797,11 +11771,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11800: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11774: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11804: \$? = $ac_status" >&5 + echo "$as_me:11778: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12329,31 +12303,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 12336 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12737,9 +12690,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -12873,11 +12823,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. @@ -12889,7 +12839,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -12969,7 +12919,7 @@ link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -13391,11 +13341,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13394: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13344: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13398: \$? = $ac_status" >&5 + echo "$as_me:13348: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13495,11 +13445,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13498: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13448: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13502: \$? = $ac_status" >&5 + echo "$as_me:13452: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14940,31 +14890,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 14947 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15348,9 +15277,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -15484,11 +15410,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. @@ -15500,7 +15426,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -15580,7 +15506,7 @@ link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -15722,11 +15648,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15725: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15651: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15729: \$? = $ac_status" >&5 + echo "$as_me:15655: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15990,11 +15916,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15993: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15919: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15997: \$? = $ac_status" >&5 + echo "$as_me:15923: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16094,11 +16020,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16097: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16023: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16101: \$? = $ac_status" >&5 + echo "$as_me:16027: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17559,31 +17485,10 @@ # before this can be enabled. hardcode_into_libs=yes - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 17566 "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -17967,9 +17872,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -18103,11 +18005,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. @@ -18119,7 +18021,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18199,7 +18101,7 @@ link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -18451,9 +18353,6 @@ # Is the compiler the GNU C compiler? with_gcc=$GCC_RC -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - # An ERE matcher. EGREP=$lt_EGREP @@ -18587,11 +18486,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. @@ -18603,7 +18502,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18683,7 +18582,7 @@ link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries -sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -26104,7 +26003,6 @@ s, at CCDEPMODE@,$CCDEPMODE,;t t s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s, at SED@,$SED,;t t s, at EGREP@,$EGREP,;t t s, at LN_S@,$LN_S,;t t s, at ECHO@,$ECHO,;t t Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- ltmain.sh 19 Feb 2008 06:04:55 -0000 1.24 +++ ltmain.sh 4 Jun 2008 22:22:57 -0000 1.25 @@ -1,8 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -43,22 +43,14 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.24 -TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" +VERSION=1.5.22 +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -113,14 +105,12 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - fi" -done +if test "${LC_ALL+set}" = set; then + save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL +fi +if test "${LANG+set}" = set; then + save_LANG="$LANG"; LANG=C; export LANG +fi # Make sure IFS has a sensible default lt_nl=' @@ -146,8 +136,6 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 ##################################### # Shell function definitions: @@ -208,13 +196,7 @@ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{ - / I /{ - s,.*,import, - p - q - } - }'` + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -345,17 +327,7 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -482,12 +454,11 @@ ;; --version) - echo "\ -$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP - -Copyright (C) 2007 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; @@ -784,10 +755,9 @@ *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; - *.[fF][09]?) xform=[fF][09]. ;; + *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; - *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1168,9 +1138,8 @@ for arg do case $arg in - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) + -all-static | -static) + if test "X$arg" = "X-all-static"; then if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1178,20 +1147,12 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - ;; - -static) + else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac + fi build_libtool_libs=no build_old_libs=yes break @@ -1639,7 +1600,7 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" @@ -1659,11 +1620,10 @@ # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin + # -pg pass through profiling flag for GCC # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -1691,9 +1651,9 @@ -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. + # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no @@ -1752,7 +1712,7 @@ continue ;; - -static | -static-libtool-libs) + -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2134,7 +2094,7 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -2530,9 +2490,7 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3228,7 +3186,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows|none) + darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3239,10 +3197,9 @@ age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor` + current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" - lt_irix_increment=no ;; esac ;; @@ -3301,8 +3258,7 @@ versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) @@ -3316,11 +3272,8 @@ ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - major=`expr $current - $age` - else - major=`expr $current - $age + 1` - fi + major=`expr $current - $age + 1` + case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; @@ -3457,11 +3410,11 @@ fi # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - #done + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3562,12 +3515,13 @@ int main() { return 0; } EOF $rm conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then + $LTCC $LTCFLAGS -o conftest conftest.c $deplibs + if test "$?" -eq 0 ; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" != "0"; then + if test "$name" != "" && test "$name" -ne "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3606,7 +3560,9 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - if $LTCC $LTCFLAGS -o conftest conftest.c $i; then + $LTCC $LTCFLAGS -o conftest conftest.c $i + # Did it work? + if test "$?" -eq 0 ; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3638,7 +3594,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -3924,10 +3880,7 @@ test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then - case $archive_cmds in - *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; - *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; - esac + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi @@ -4286,14 +4239,12 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. + # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4741,16 +4692,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` fi ;; * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; esac ;; @@ -4765,13 +4716,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4858,7 +4809,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -4895,7 +4846,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. @@ -5302,20 +5253,6 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' -# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5458,7 +5395,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else @@ -5644,7 +5581,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5989,9 +5926,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6200,7 +6137,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6411,10 +6348,8 @@ if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else - if test ! -f "$dir/$dlname"; then - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE fi ;; @@ -6478,12 +6413,12 @@ fi # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - fi" - done + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6840,9 +6775,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6856,11 +6791,9 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- Makefile.am 30 May 2008 15:38:59 -0000 1.67 +++ Makefile.am 4 Jun 2008 22:22:57 -0000 1.68 @@ -117,8 +117,9 @@ libdistrib-plugin.la libhttp-client-plugin.la libcollation-plugin.la \ libmemberof-plugin.la libpassthru-plugin.la libpresence-plugin.la \ libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \ - libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la libsyntax-plugin.la \ - libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN) $(LIBBITWISE_PLUGIN) + libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la \ + libsyntax-plugin.la libviews-plugin.la libschemareload-plugin.la \ + $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN) $(LIBBITWISE_PLUGIN) nodist_property_DATA = ns-slapd.properties @@ -829,6 +830,14 @@ libviews_plugin_la_LDFLAGS = -avoid-version #------------------------ +# libschemareload-plugin +#------------------------ +libschemareload_plugin_la_SOURCES = ldap/servers/plugins/schema_reload/schema_reload.c + +libschemareload_plugin_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) +libschemareload_plugin_la_LDFLAGS = -avoid-version + +#------------------------ # libdna-plugin #------------------------ libdna_plugin_la_SOURCES = ldap/servers/plugins/dna/dna.c Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.87 retrieving revision 1.88 diff -u -r1.87 -r1.88 --- Makefile.in 30 May 2008 15:38:59 -0000 1.87 +++ Makefile.in 4 Jun 2008 22:22:57 -0000 1.88 @@ -426,6 +426,10 @@ ldap/servers/plugins/roles/libroles_plugin_la-roles_cache.lo \ ldap/servers/plugins/roles/libroles_plugin_la-roles_plugin.lo libroles_plugin_la_OBJECTS = $(am_libroles_plugin_la_OBJECTS) +libschemareload_plugin_la_LIBADD = +am_libschemareload_plugin_la_OBJECTS = ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo +libschemareload_plugin_la_OBJECTS = \ + $(am_libschemareload_plugin_la_OBJECTS) libslapd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) @@ -735,7 +739,8 @@ $(libreferint_plugin_la_SOURCES) \ $(libreplication_plugin_la_SOURCES) \ $(libretrocl_plugin_la_SOURCES) $(libroles_plugin_la_SOURCES) \ - $(libslapd_la_SOURCES) $(libstatechange_plugin_la_SOURCES) \ + $(libschemareload_plugin_la_SOURCES) $(libslapd_la_SOURCES) \ + $(libstatechange_plugin_la_SOURCES) \ $(libsyntax_plugin_la_SOURCES) $(libviews_plugin_la_SOURCES) \ $(dbscan_bin_SOURCES) $(dsktune_bin_SOURCES) \ $(infadd_bin_SOURCES) $(ldap_agent_bin_SOURCES) \ @@ -760,7 +765,8 @@ $(libreferint_plugin_la_SOURCES) \ $(libreplication_plugin_la_SOURCES) \ $(libretrocl_plugin_la_SOURCES) $(libroles_plugin_la_SOURCES) \ - $(libslapd_la_SOURCES) $(libstatechange_plugin_la_SOURCES) \ + $(libschemareload_plugin_la_SOURCES) $(libslapd_la_SOURCES) \ + $(libstatechange_plugin_la_SOURCES) \ $(libsyntax_plugin_la_SOURCES) $(libviews_plugin_la_SOURCES) \ $(dbscan_bin_SOURCES) $(dsktune_bin_SOURCES) \ $(infadd_bin_SOURCES) $(ldap_agent_bin_SOURCES) \ @@ -855,7 +861,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ -SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_FALSE = @SOLARIS_FALSE@ @@ -1040,8 +1045,9 @@ libdistrib-plugin.la libhttp-client-plugin.la libcollation-plugin.la \ libmemberof-plugin.la libpassthru-plugin.la libpresence-plugin.la \ libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \ - libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la libsyntax-plugin.la \ - libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN) $(LIBBITWISE_PLUGIN) + libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la \ + libsyntax-plugin.la libviews-plugin.la libschemareload-plugin.la \ + $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN) $(LIBBITWISE_PLUGIN) nodist_property_DATA = ns-slapd.properties noinst_LIBRARIES = libavl.a libldaputil.a @@ -1732,6 +1738,13 @@ libviews_plugin_la_LDFLAGS = -avoid-version #------------------------ +# libschemareload-plugin +#------------------------ +libschemareload_plugin_la_SOURCES = ldap/servers/plugins/schema_reload/schema_reload.c +libschemareload_plugin_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) +libschemareload_plugin_la_LDFLAGS = -avoid-version + +#------------------------ # libdna-plugin #------------------------ libdna_plugin_la_SOURCES = ldap/servers/plugins/dna/dna.c @@ -3087,6 +3100,17 @@ ldap/servers/plugins/roles/$(DEPDIR)/$(am__dirstamp) libroles-plugin.la: $(libroles_plugin_la_OBJECTS) $(libroles_plugin_la_DEPENDENCIES) $(LINK) -rpath $(serverplugindir) $(libroles_plugin_la_LDFLAGS) $(libroles_plugin_la_OBJECTS) $(libroles_plugin_la_LIBADD) $(LIBS) +ldap/servers/plugins/schema_reload/$(am__dirstamp): + @$(mkdir_p) ldap/servers/plugins/schema_reload + @: > ldap/servers/plugins/schema_reload/$(am__dirstamp) +ldap/servers/plugins/schema_reload/$(DEPDIR)/$(am__dirstamp): + @$(mkdir_p) ldap/servers/plugins/schema_reload/$(DEPDIR) + @: > ldap/servers/plugins/schema_reload/$(DEPDIR)/$(am__dirstamp) +ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo: \ + ldap/servers/plugins/schema_reload/$(am__dirstamp) \ + ldap/servers/plugins/schema_reload/$(DEPDIR)/$(am__dirstamp) +libschemareload-plugin.la: $(libschemareload_plugin_la_OBJECTS) $(libschemareload_plugin_la_DEPENDENCIES) + $(LINK) -rpath $(serverplugindir) $(libschemareload_plugin_la_LDFLAGS) $(libschemareload_plugin_la_OBJECTS) $(libschemareload_plugin_la_LIBADD) $(LIBS) ldap/servers/slapd/$(am__dirstamp): @$(mkdir_p) ldap/servers/slapd @: > ldap/servers/slapd/$(am__dirstamp) @@ -4128,6 +4152,8 @@ -rm -f ldap/servers/plugins/roles/libroles_plugin_la-roles_cache.lo -rm -f ldap/servers/plugins/roles/libroles_plugin_la-roles_plugin.$(OBJEXT) -rm -f ldap/servers/plugins/roles/libroles_plugin_la-roles_plugin.lo + -rm -f ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.$(OBJEXT) + -rm -f ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo -rm -f ldap/servers/plugins/shared/libattr_unique_plugin_la-utils.$(OBJEXT) -rm -f ldap/servers/plugins/shared/libattr_unique_plugin_la-utils.lo -rm -f ldap/servers/plugins/statechange/libstatechange_plugin_la-statechange.$(OBJEXT) @@ -4782,6 +4808,7 @@ @AMDEP_TRUE@@am__include@ @am__quote at ldap/servers/plugins/rever/$(DEPDIR)/libdes_plugin_la-rever.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at ldap/servers/plugins/roles/$(DEPDIR)/libroles_plugin_la-roles_cache.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at ldap/servers/plugins/roles/$(DEPDIR)/libroles_plugin_la-roles_plugin.Plo at am__quote@ + at AMDEP_TRUE@@am__include@ @am__quote at ldap/servers/plugins/schema_reload/$(DEPDIR)/libschemareload_plugin_la-schema_reload.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at ldap/servers/plugins/shared/$(DEPDIR)/libattr_unique_plugin_la-utils.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at ldap/servers/plugins/statechange/$(DEPDIR)/libstatechange_plugin_la-statechange.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at ldap/servers/plugins/syntaxes/$(DEPDIR)/libsyntax_plugin_la-bin.Plo at am__quote@ @@ -6719,6 +6746,13 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libroles_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/roles/libroles_plugin_la-roles_plugin.lo `test -f 'ldap/servers/plugins/roles/roles_plugin.c' || echo '$(srcdir)/'`ldap/servers/plugins/roles/roles_plugin.c +ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo: ldap/servers/plugins/schema_reload/schema_reload.c + at am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libschemareload_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo -MD -MP -MF "ldap/servers/plugins/schema_reload/$(DEPDIR)/libschemareload_plugin_la-schema_reload.Tpo" -c -o ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo `test -f 'ldap/servers/plugins/schema_reload/schema_reload.c' || echo '$(srcdir)/'`ldap/servers/plugins/schema_reload/schema_reload.c; \ + at am__fastdepCC_TRUE@ then mv -f "ldap/servers/plugins/schema_reload/$(DEPDIR)/libschemareload_plugin_la-schema_reload.Tpo" "ldap/servers/plugins/schema_reload/$(DEPDIR)/libschemareload_plugin_la-schema_reload.Plo"; else rm -f "ldap/servers/plugins/schema_reload/$(DEPDIR)/libschemareload_plugin_la-schema_reload.Tpo"; exit 1; fi + at AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ldap/servers/plugins/schema_reload/schema_reload.c' object='ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo' libtool=yes @AMDEPBACKSLASH@ + at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + at am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libschemareload_plugin_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ldap/servers/plugins/schema_reload/libschemareload_plugin_la-schema_reload.lo `test -f 'ldap/servers/plugins/schema_reload/schema_reload.c' || echo '$(srcdir)/'`ldap/servers/plugins/schema_reload/schema_reload.c + ldap/servers/slapd/libslapd_la-add.lo: ldap/servers/slapd/add.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libslapd_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ldap/servers/slapd/libslapd_la-add.lo -MD -MP -MF "ldap/servers/slapd/$(DEPDIR)/libslapd_la-add.Tpo" -c -o ldap/servers/slapd/libslapd_la-add.lo `test -f 'ldap/servers/slapd/add.c' || echo '$(srcdir)/'`ldap/servers/slapd/add.c; \ @am__fastdepCC_TRUE@ then mv -f "ldap/servers/slapd/$(DEPDIR)/libslapd_la-add.Tpo" "ldap/servers/slapd/$(DEPDIR)/libslapd_la-add.Plo"; else rm -f "ldap/servers/slapd/$(DEPDIR)/libslapd_la-add.Tpo"; exit 1; fi @@ -8636,6 +8670,7 @@ -rm -rf ldap/servers/plugins/retrocl/.libs ldap/servers/plugins/retrocl/_libs -rm -rf ldap/servers/plugins/rever/.libs ldap/servers/plugins/rever/_libs -rm -rf ldap/servers/plugins/roles/.libs ldap/servers/plugins/roles/_libs + -rm -rf ldap/servers/plugins/schema_reload/.libs ldap/servers/plugins/schema_reload/_libs -rm -rf ldap/servers/plugins/shared/.libs ldap/servers/plugins/shared/_libs -rm -rf ldap/servers/plugins/statechange/.libs ldap/servers/plugins/statechange/_libs -rm -rf ldap/servers/plugins/syntaxes/.libs ldap/servers/plugins/syntaxes/_libs @@ -9016,6 +9051,8 @@ -rm -f ldap/servers/plugins/rever/$(am__dirstamp) -rm -f ldap/servers/plugins/roles/$(DEPDIR)/$(am__dirstamp) -rm -f ldap/servers/plugins/roles/$(am__dirstamp) + -rm -f ldap/servers/plugins/schema_reload/$(DEPDIR)/$(am__dirstamp) + -rm -f ldap/servers/plugins/schema_reload/$(am__dirstamp) -rm -f ldap/servers/plugins/shared/$(DEPDIR)/$(am__dirstamp) -rm -f ldap/servers/plugins/shared/$(am__dirstamp) -rm -f ldap/servers/plugins/statechange/$(DEPDIR)/$(am__dirstamp) @@ -9064,7 +9101,7 @@ distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/memberof/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) ldap/servers/slapd/$(DEPDIR) ldap/servers/slap! d/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR) + -rm -rf ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/memberof/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/schema_reload/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) l! dap/servers/slapd/$(DEPDIR) ldap/servers/slapd/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags @@ -9098,7 +9135,7 @@ maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/memberof/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) ldap/servers/slapd/$(DEPDIR) ldap/servers/slap! d/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR) + -rm -rf ldap/libraries/libavl/$(DEPDIR) ldap/servers/plugins/acl/$(DEPDIR) ldap/servers/plugins/bitwise/$(DEPDIR) ldap/servers/plugins/chainingdb/$(DEPDIR) ldap/servers/plugins/collation/$(DEPDIR) ldap/servers/plugins/cos/$(DEPDIR) ldap/servers/plugins/distrib/$(DEPDIR) ldap/servers/plugins/dna/$(DEPDIR) ldap/servers/plugins/http/$(DEPDIR) ldap/servers/plugins/memberof/$(DEPDIR) ldap/servers/plugins/pam_passthru/$(DEPDIR) ldap/servers/plugins/passthru/$(DEPDIR) ldap/servers/plugins/presence/$(DEPDIR) ldap/servers/plugins/pwdstorage/$(DEPDIR) ldap/servers/plugins/referint/$(DEPDIR) ldap/servers/plugins/replication/$(DEPDIR) ldap/servers/plugins/retrocl/$(DEPDIR) ldap/servers/plugins/rever/$(DEPDIR) ldap/servers/plugins/roles/$(DEPDIR) ldap/servers/plugins/schema_reload/$(DEPDIR) ldap/servers/plugins/shared/$(DEPDIR) ldap/servers/plugins/statechange/$(DEPDIR) ldap/servers/plugins/syntaxes/$(DEPDIR) ldap/servers/plugins/uiduniq/$(DEPDIR) ldap/servers/plugins/views/$(DEPDIR) l! dap/servers/slapd/$(DEPDIR) ldap/servers/slapd/back-ldbm/$(DEPDIR) ldap/servers/slapd/tools/$(DEPDIR) ldap/servers/slapd/tools/ldclt/$(DEPDIR) ldap/servers/slapd/tools/rsearch/$(DEPDIR) ldap/servers/snmp/$(DEPDIR) ldap/systools/$(DEPDIR) lib/base/$(DEPDIR) lib/ldaputil/$(DEPDIR) lib/libaccess/$(DEPDIR) lib/libadmin/$(DEPDIR) lib/libsi18n/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic From fedora-directory-commits at redhat.com Wed Jun 4 23:00:53 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 4 Jun 2008 19:00:53 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm init.c, 1.9, 1.10 Message-ID: <200806042300.m54N0rQ5002093@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2000 Modified Files: init.c Log Message: Resolves: #436837 Summary: Dynamically reload schema via task interface Description: implemented task based schema file reloading (see also http://directory.fedoraproject.org/wiki/Dynamically_Reload_Schema) Index: init.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/init.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- init.c 7 Sep 2007 19:08:45 -0000 1.9 +++ init.c 4 Jun 2008 23:00:48 -0000 1.10 @@ -64,6 +64,29 @@ } #endif +/* pb: not used */ +int +ldbm_back_add_schema( Slapi_PBlock *pb ) +{ + int rc = add_ldbm_internal_attr_syntax( "entrydn", + LDBM_ENTRYDN_OID, DN_SYNTAX_OID, DNMATCH_NAME, + SLAPI_ATTR_FLAG_SINGLE ); + + rc |= add_ldbm_internal_attr_syntax( "dncomp", + LDBM_DNCOMP_OID, DN_SYNTAX_OID, DNMATCH_NAME, + 0 ); + + rc |= add_ldbm_internal_attr_syntax( "parentid", + LDBM_PARENTID_OID, DIRSTRING_SYNTAX_OID, CASEIGNOREMATCH_NAME, + SLAPI_ATTR_FLAG_SINGLE ); + + rc |= add_ldbm_internal_attr_syntax( "entryid", + LDBM_ENTRYID_OID, DIRSTRING_SYNTAX_OID, CASEIGNOREMATCH_NAME, + SLAPI_ATTR_FLAG_SINGLE ); + + return rc; +} + int ldbm_back_init( Slapi_PBlock *pb ) { @@ -114,21 +137,7 @@ } /* add some private attributes */ - rc = add_ldbm_internal_attr_syntax( "entrydn", - LDBM_ENTRYDN_OID, DN_SYNTAX_OID, DNMATCH_NAME, - SLAPI_ATTR_FLAG_SINGLE ); - - rc = add_ldbm_internal_attr_syntax( "dncomp", - LDBM_DNCOMP_OID, DN_SYNTAX_OID, DNMATCH_NAME, - 0 ); - - rc = add_ldbm_internal_attr_syntax( "parentid", - LDBM_PARENTID_OID, DIRSTRING_SYNTAX_OID, CASEIGNOREMATCH_NAME, - SLAPI_ATTR_FLAG_SINGLE ); - - rc = add_ldbm_internal_attr_syntax( "entryid", - LDBM_ENTRYID_OID, DIRSTRING_SYNTAX_OID, CASEIGNOREMATCH_NAME, - SLAPI_ATTR_FLAG_SINGLE ); + rc = ldbm_back_add_schema( pb ); /* set plugin private pointer and initialize locks, etc. */ rc = slapi_pblock_set( pb, SLAPI_PLUGIN_PRIVATE, (void *) li ); @@ -222,10 +231,12 @@ rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_TEST_FN, (void *) ldbm_back_db_test ); rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_INIT_INSTANCE_FN, - (void *) ldbm_back_init ); /* register itself so that the secon instance + (void *) ldbm_back_init ); /* register itself so that the secon instance can be initialized */ - rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_WIRE_IMPORT_FN, - (void *) ldbm_back_wire_import); + rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_WIRE_IMPORT_FN, + (void *) ldbm_back_wire_import ); + rc |= slapi_pblock_set( pb, SLAPI_PLUGIN_DB_ADD_SCHEMA_FN, + (void *) ldbm_back_add_schema ); if ( rc != 0 ) { LDAPDebug( LDAP_DEBUG_ANY, "ldbm_back_init failed\n", 0, 0, 0 ); From fedora-directory-commits at redhat.com Wed Jun 4 23:40:59 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 4 Jun 2008 19:40:59 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd schema.c, 1.12, 1.13 Message-ID: <200806042340.m54Nexxw009941@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9834 Modified Files: schema.c Log Message: Resolves: #436837 Summary: Dynamically reload schema via task interface Description: slapi_validate_schema_files: call dse_destroy only when the previous validation was successful. Index: schema.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/schema.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- schema.c 4 Jun 2008 22:22:55 -0000 1.12 +++ schema.c 4 Jun 2008 23:40:57 -0000 1.13 @@ -4234,7 +4234,12 @@ /* ldbm has some internal attributes to be added */ backend_plugin = plugin_get_by_name("ldbm database"); if (backend_plugin) { - (backend_plugin->plg_add_schema)( NULL ); + if (backend_plugin->plg_add_schema) { + (backend_plugin->plg_add_schema)( NULL ); + } else { + slapi_log_error( SLAPI_LOG_FATAL, "init_schema_dse", + "backend has not set internal schema\n" ); + } } } } @@ -4912,10 +4917,10 @@ struct dse *my_pschemadse = NULL; int rc = init_schema_dse_ext(schemadir, NULL, &my_pschemadse, DSE_SCHEMA_NO_LOAD | DSE_SCHEMA_NO_BACKEND); - dse_destroy(my_pschemadse); - if (rc) + if (rc) { + dse_destroy(my_pschemadse); return LDAP_SUCCESS; - else { + } else { slapi_log_error( SLAPI_LOG_FATAL, "schema_reload", "schema file validation failed\n" ); return LDAP_OBJECT_CLASS_VIOLATION; From fedora-directory-commits at redhat.com Thu Jun 5 19:11:52 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 5 Jun 2008 15:11:52 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/ldif template-dse.ldif.in, 1.6, 1.7 Message-ID: <200806051911.m55JBqWu025965@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25943 Modified Files: template-dse.ldif.in Log Message: Resolves: 450107 Summary: Added memberOf plug-in config entry to dse.ldif template. Index: template-dse.ldif.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- template-dse.ldif.in 4 Jun 2008 22:22:56 -0000 1.6 +++ template-dse.ldif.in 5 Jun 2008 19:11:50 -0000 1.7 @@ -398,6 +398,17 @@ nsslapd-plugin-depends-on-named: Multimaster Replication Plugin nsslapd-plugin-depends-on-named: Class of Service +dn: cn=MemberOf Plugin,cn=plugins,cn=config +objectClass: top +objectClass: nsSlapdPlugin +objectClass: extensibleObject +cn: MemberOf Plugin +nsslapd-pluginpath: libmemberof-plugin +nsslapd-plugininitfunc: memberof_postop_init +nsslapd-plugintype: postoperation +nsslapd-pluginenabled: off +nsslapd-plugin-depends-on-type: database + dn: cn=Multimaster Replication Plugin,cn=plugins,cn=config objectclass: top objectclass: nsSlapdPlugin From fedora-directory-commits at redhat.com Fri Jun 6 17:53:38 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 6 Jun 2008 13:53:38 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slap.h, 1.33, 1.34 backend.c, 1.7, 1.8 Message-ID: <200806061753.m56Hrcsl022728@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22618 Modified Files: slap.h backend.c Log Message: Resolves: #436837 (comment #9) Summary: Dynamically reload schema via task interface Index: slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slap.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- slap.h 4 Jun 2008 22:22:55 -0000 1.33 +++ slap.h 6 Jun 2008 17:53:35 -0000 1.34 @@ -776,8 +776,8 @@ IFP plg_un_db_register_oc_callback; /* Register a function to call when a operation is applied to a given ObjectClass */ IFP plg_un_db_init_instance; /* initializes new db instance */ IFP plg_un_db_wire_import; /* fast replica update */ - IFP plg_un_db_add_schema; /* add schema */ IFP plg_un_db_verify; /* verify db files */ + IFP plg_un_db_add_schema; /* add schema */ } plg_un_db; #define plg_bind plg_un.plg_un_db.plg_un_db_bind #define plg_unbind plg_un.plg_un_db.plg_un_db_unbind Index: backend.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/backend.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- backend.c 4 Jun 2008 22:22:55 -0000 1.7 +++ backend.c 6 Jun 2008 17:53:35 -0000 1.8 @@ -169,7 +169,7 @@ int be_isdeleted( const Slapi_Backend *be ) { - return BE_STATE_DELETED == be->be_state; + return ((be == NULL) || (BE_STATE_DELETED == be->be_state)); } void From fedora-directory-commits at redhat.com Mon Jun 9 15:42:49 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 9 Jun 2008 11:42:49 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cgi-src40 repl-monitor-cgi.pl.in, 1.1, 1.2 Message-ID: <200806091542.m59Fgnf9014600@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cgi-src40 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14565/adminserver/admserv/cgi-src40 Modified Files: repl-monitor-cgi.pl.in Log Message: Resolves: CVE-2008-0892 and 437320 Description: Directory Server: shell command injection in CGI replication monitor Directory Server: unrestricted access to CGI scripts Fix Description: remove ScriptAlias for bin/admin/admin/bin - do not use that directory for CGI URIs - use only protected URIs for CGIs requiring authentication Remove most CGI parameters from repl-monitor-cgi.pl - user must supply replmon.conf in the admin server config directory instead of passing in this pathname - repl-monitor-cgi.pl does not use system to call repl-monitor.pl, it "includes" that script (using perl import). Platforms tested: all supported platforms Flag Day: no Doc impact: release notes are available Resolves: CVE-2008-0892 and 437320 Description: Directory Server: shell command injection in CGI replication monitor Directory Server: unrestricted access to CGI scripts Fix Description: remove ScriptAlias for bin/admin/admin/bin - do not use that directory for CGI URIs - use only protected URIs for CGIs requiring authentication Remove most CGI parameters from repl-monitor-cgi.pl - user must supply replmon.conf in the admin server config directory instead of passing in this pathname - repl-monitor-cgi.pl does not use system to call repl-monitor.pl, it "includes" that script (using perl import). Platforms tested: all supported platforms Flag Day: no Doc impact: release notes are available Index: repl-monitor-cgi.pl.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/repl-monitor-cgi.pl.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- repl-monitor-cgi.pl.in 5 Sep 2007 16:45:59 -0000 1.1 +++ repl-monitor-cgi.pl.in 9 Jun 2008 15:42:47 -0000 1.2 @@ -42,22 +42,25 @@ my $query = CGI->new; -$params = ""; -$params .= " -h " . $query->url_param('servhost') if $query->url_param('servhost'); -$params .= " -p " . $query->url_param('servport') if $query->url_param('servport'); -$params .= " -f " . $query->url_param('configfile') if $query->url_param('configfile'); -$params .= " -t " . $query->url_param('refreshinterval') if $query->url_param('refreshinterval'); -if ($query->url_param('admurl')) { - $admurl = $query->url_param('admurl'); - if ( $ENV{'QUERY_STRING'} ) { - $admurl .= "?$ENV{'QUERY_STRING'}"; - } - elsif ( $ENV{'CONTENT_LENGTH'} ) { - $admurl .= "?$CGI::CONTENT"; - } - $params .= " -u \"$admurl\""; + at ARGV = (); # clear it out +my $configfile; +if ($ENV{DS_CONFIG_DIR} and -d $ENV{DS_CONFIG_DIR}) { + $configfile = "$ENV{DS_CONFIG_DIR}/@instancename@/replmon.conf"; +} elsif ("@instconfigdir@" and -d "@instconfigdir@") { + $configfile = "@instconfigdir@/replmon.conf"; } +push @ARGV, '-f', $configfile; + +my $refreshinterval = $query->url_param('refreshinterval') ? int($query->url_param('refreshinterval')) : "300"; +push @ARGV, '-t', $refreshinterval; + +my $admurl = "http://"; +if ($ENV{HTTPS} and (lc($ENV{HTTPS}) eq "on")) { + $admurl = "https://"; +} +$admurl .= $ENV{HTTP_HOST} . $ENV{SCRIPT_NAME} . "?refreshinterval=$refreshinterval"; +push @ARGV, '-u', $admurl; + # Now the real work -$replmon = "@bindir@/repl-monitor.pl"; -system("$replmon $params"); +require "@bindir@/repl-monitor.pl"; From fedora-directory-commits at redhat.com Mon Jun 9 15:42:49 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 9 Jun 2008 11:42:49 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cfgstuff admserv.conf.in, 1.10, 1.11 Message-ID: <200806091542.m59FgnS3014594@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cfgstuff In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14565/adminserver/admserv/cfgstuff Modified Files: admserv.conf.in Log Message: Resolves: CVE-2008-0892 and 437320 Description: Directory Server: shell command injection in CGI replication monitor Directory Server: unrestricted access to CGI scripts Fix Description: remove ScriptAlias for bin/admin/admin/bin - do not use that directory for CGI URIs - use only protected URIs for CGIs requiring authentication Remove most CGI parameters from repl-monitor-cgi.pl - user must supply replmon.conf in the admin server config directory instead of passing in this pathname - repl-monitor-cgi.pl does not use system to call repl-monitor.pl, it "includes" that script (using perl import). Platforms tested: all supported platforms Flag Day: no Doc impact: release notes are available Resolves: CVE-2008-0892 and 437320 Description: Directory Server: shell command injection in CGI replication monitor Directory Server: unrestricted access to CGI scripts Fix Description: remove ScriptAlias for bin/admin/admin/bin - do not use that directory for CGI URIs - use only protected URIs for CGIs requiring authentication Remove most CGI parameters from repl-monitor-cgi.pl - user must supply replmon.conf in the admin server config directory instead of passing in this pathname - repl-monitor-cgi.pl does not use system to call repl-monitor.pl, it "includes" that script (using perl import). Platforms tested: all supported platforms Flag Day: no Doc impact: release notes are available Index: admserv.conf.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/admserv.conf.in,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- admserv.conf.in 7 Dec 2007 17:43:50 -0000 1.10 +++ admserv.conf.in 9 Jun 2008 15:42:46 -0000 1.11 @@ -25,7 +25,6 @@ ADMServerVersionString "@capbrand at -Administrator/@PACKAGE_VERSION@" ADMConfigDir "@configdir@" -ScriptAlias /bin/admin/admin/bin/ "@cgibindir@/" ScriptAlias /dist/ "@cgibindir@/" ScriptAlias /manual/help/ "@cgibindir@/" @@ -63,7 +62,7 @@ # remap / requests to the download CGI RewriteEngine on -RewriteRule ^/$ /bin/admin/admin/bin/download [R,L,QSA] +RewriteRule ^/$ /dist/download [R,L,QSA] # remap admin server icons Alias /admin-serv/tasks/icons/ @icondir@/ From fedora-directory-commits at redhat.com Mon Jun 9 15:57:15 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 9 Jun 2008 11:57:15 -0400 Subject: [Fedora-directory-commits] adminserver Makefile.am, 1.39, 1.40 configure.ac, 1.25, 1.26 aclocal.m4, 1.39, 1.40 configure, 1.43, 1.44 missing, 1.29, 1.30 install-sh, 1.29, 1.30 depcomp, 1.29, 1.30 config.sub, 1.29, 1.30 config.guess, 1.29, 1.30 compile, 1.28, 1.29 Makefile.in, 1.46, 1.47 Message-ID: <200806091557.m59FvFmr015070@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15042/adminserver Modified Files: Makefile.am configure.ac aclocal.m4 configure missing install-sh depcomp config.sub config.guess compile Makefile.in Log Message: Resolves: bug 448366 Description: icu 4.0 will remove the -p option from genrb Fix Description: we don't need to use the -p option anymore - we can just create the root.res in a unique, program named subdir This also bumps the version to 1.1.5 Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile.am,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- Makefile.am 10 Jan 2008 16:48:38 -0000 1.39 +++ Makefile.am 9 Jun 2008 15:57:12 -0000 1.40 @@ -49,14 +49,18 @@ install-data-hook: @for file in $(RESOURCE_BUNDLES_ROOT) ; do \ basefile=`basename $$file` ; \ - destfile=`basename $$file | sed -e s,_root,/root,` ; \ - destdir=`dirname $$destfile` ; \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$(DESTDIR)$(propertydir)/$$basefile' '$(DESTDIR)$(propertydir)/$$destfile'"; \ - $(mkdir_p) "$(DESTDIR)$(propertydir)/$$destdir" ; \ - mv "$(DESTDIR)$(propertydir)/$$basefile" "$(DESTDIR)$(propertydir)/$$destfile" || exit 1; \ - cp "$(DESTDIR)$(propertydir)/$$destfile" "$(DESTDIR)$(propertydir)/$$destdir/en.res" || exit 1; \ - cp "$(DESTDIR)$(propertydir)/$$destfile" "$(DESTDIR)$(propertydir)/$$destdir/en_US.res" || exit 1; \ + destdir=`dirname $$file` ; \ + progname=`basename $$destdir` ; \ + destfile=$$progname/$$basefile ; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$(DESTDIR)$(propertydir)/$$destfile'"; \ + $(mkdir_p) "$(DESTDIR)$(propertydir)/$$progname" ; \ + cp "$$file" "$(DESTDIR)$(propertydir)/$$destfile" || exit 1; \ + cp "$$file" "$(DESTDIR)$(propertydir)/$$progname/en.res" || exit 1; \ + cp "$$file" "$(DESTDIR)$(propertydir)/$$progname/en_US.res" || exit 1; \ done +# the makefile creates this one, but there seems to be no way to tell it not +# to, so we have to remove it before it causes problems + rm -f $(DESTDIR)$(propertydir)/root.res cgibindir = $(libdir)@cgibindir@ cmdbindir = $(sbindir) @@ -367,14 +371,14 @@ # This bundle must be always distributed and there is no need to have # *_en.properties resource bundle source files. RESOURCE_BUNDLES_ROOT = \ - admserv/cgi-src40/admpw_root.res \ - admserv/cgi-src40/security_root.res admserv/cgi-src40/config_root.res \ - admserv/cgi-src40/stopsrv_root.res \ - admserv/cgi-src40/dsconfig_root.res admserv/cgi-src40/monreplication_root.res \ - admserv/cgi-src40/ugdsconfig_root.res admserv/cgi-src40/htmladmin_root.res \ - admserv/cgi-src40/restartsrv_root.res admserv/cgi-src40/viewdata_root.res \ - admserv/cgi-src40/sec-activate_root.res \ - admserv/cgi-src40/viewlog_root.res + admserv/cgi-src40/admpw/root.res \ + admserv/cgi-src40/security/root.res admserv/cgi-src40/config/root.res \ + admserv/cgi-src40/stopsrv/root.res \ + admserv/cgi-src40/dsconfig/root.res admserv/cgi-src40/monreplication/root.res \ + admserv/cgi-src40/ugdsconfig/root.res admserv/cgi-src40/htmladmin/root.res \ + admserv/cgi-src40/restartsrv/root.res admserv/cgi-src40/viewdata/root.res \ + admserv/cgi-src40/sec-activate/root.res \ + admserv/cgi-src40/viewlog/root.res MOSTLYCLEANFILES += $(RESOURCE_BUNDLES_ROOT) # ICU resource file installation is handled specially @@ -392,8 +396,9 @@ # German resource bundles (for the German localization in the future) #RESOURCE_BUNDLES_DE = foo_de.res -%_root.res : %.properties - $(ICU_GENRB) -s. -d. --encoding 8859-1 --package-name $* $+ +%/root.res : %.properties + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ %_fr.res : %_fr.properties $(ICU_GENRB) -s. -d. --encoding 8859-2 --package-name $* $+ Index: configure.ac =================================================================== RCS file: /cvs/dirsec/adminserver/configure.ac,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- configure.ac 10 Jan 2008 16:48:38 -0000 1.25 +++ configure.ac 9 Jun 2008 15:57:12 -0000 1.26 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([dirsrv-admin], [1.1.2], [http://bugzilla.redhat.com/]) +AC_INIT([dirsrv-admin], [1.1.5], [http://bugzilla.redhat.com/]) AC_CONFIG_SRCDIR([admserv/cgi-src40/viewlog.c]) AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) AM_MAINTAINER_MODE Index: configure =================================================================== RCS file: /cvs/dirsec/adminserver/configure,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- configure 10 Jan 2008 16:48:38 -0000 1.43 +++ configure 9 Jun 2008 15:57:12 -0000 1.44 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dirsrv-admin 1.1.2. +# Generated by GNU Autoconf 2.59 for dirsrv-admin 1.1.5. # # Report bugs to . # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='dirsrv-admin' PACKAGE_TARNAME='dirsrv-admin' -PACKAGE_VERSION='1.1.2' -PACKAGE_STRING='dirsrv-admin 1.1.2' +PACKAGE_VERSION='1.1.5' +PACKAGE_STRING='dirsrv-admin 1.1.5' PACKAGE_BUGREPORT='http://bugzilla.redhat.com/' ac_unique_file="admserv/cgi-src40/viewlog.c" @@ -957,7 +957,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dirsrv-admin 1.1.2 to adapt to many kinds of systems. +\`configure' configures dirsrv-admin 1.1.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1023,7 +1023,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dirsrv-admin 1.1.2:";; + short | recursive ) echo "Configuration of dirsrv-admin 1.1.5:";; esac cat <<\_ACEOF @@ -1202,7 +1202,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dirsrv-admin configure 1.1.2 +dirsrv-admin configure 1.1.5 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1216,7 +1216,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dirsrv-admin $as_me 1.1.2, which was +It was created by dirsrv-admin $as_me 1.1.5, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1860,7 +1860,7 @@ # Define the identity of the package. PACKAGE='dirsrv-admin' - VERSION='1.1.2' + VERSION='1.1.5' cat >>confdefs.h <<_ACEOF @@ -25613,7 +25613,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by dirsrv-admin $as_me 1.1.2, which was +This file was extended by dirsrv-admin $as_me 1.1.5, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25676,7 +25676,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -dirsrv-admin config.status 1.1.2 +dirsrv-admin config.status 1.1.5 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile.in,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- Makefile.in 10 Jan 2008 16:48:38 -0000 1.46 +++ Makefile.in 9 Jun 2008 15:57:12 -0000 1.47 @@ -741,14 +741,14 @@ # This bundle must be always distributed and there is no need to have # *_en.properties resource bundle source files. RESOURCE_BUNDLES_ROOT = \ - admserv/cgi-src40/admpw_root.res \ - admserv/cgi-src40/security_root.res admserv/cgi-src40/config_root.res \ - admserv/cgi-src40/stopsrv_root.res \ - admserv/cgi-src40/dsconfig_root.res admserv/cgi-src40/monreplication_root.res \ - admserv/cgi-src40/ugdsconfig_root.res admserv/cgi-src40/htmladmin_root.res \ - admserv/cgi-src40/restartsrv_root.res admserv/cgi-src40/viewdata_root.res \ - admserv/cgi-src40/sec-activate_root.res \ - admserv/cgi-src40/viewlog_root.res + admserv/cgi-src40/admpw/root.res \ + admserv/cgi-src40/security/root.res admserv/cgi-src40/config/root.res \ + admserv/cgi-src40/stopsrv/root.res \ + admserv/cgi-src40/dsconfig/root.res admserv/cgi-src40/monreplication/root.res \ + admserv/cgi-src40/ugdsconfig/root.res admserv/cgi-src40/htmladmin/root.res \ + admserv/cgi-src40/restartsrv/root.res admserv/cgi-src40/viewdata/root.res \ + admserv/cgi-src40/sec-activate/root.res \ + admserv/cgi-src40/viewlog/root.res # ICU resource file installation is handled specially nodist_property_DATA = $(RESOURCE_BUNDLES_ROOT) @@ -2360,14 +2360,18 @@ install-data-hook: @for file in $(RESOURCE_BUNDLES_ROOT) ; do \ basefile=`basename $$file` ; \ - destfile=`basename $$file | sed -e s,_root,/root,` ; \ - destdir=`dirname $$destfile` ; \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$(DESTDIR)$(propertydir)/$$basefile' '$(DESTDIR)$(propertydir)/$$destfile'"; \ - $(mkdir_p) "$(DESTDIR)$(propertydir)/$$destdir" ; \ - mv "$(DESTDIR)$(propertydir)/$$basefile" "$(DESTDIR)$(propertydir)/$$destfile" || exit 1; \ - cp "$(DESTDIR)$(propertydir)/$$destfile" "$(DESTDIR)$(propertydir)/$$destdir/en.res" || exit 1; \ - cp "$(DESTDIR)$(propertydir)/$$destfile" "$(DESTDIR)$(propertydir)/$$destdir/en_US.res" || exit 1; \ - done + destdir=`dirname $$file` ; \ + progname=`basename $$destdir` ; \ + destfile=$$progname/$$basefile ; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$(DESTDIR)$(propertydir)/$$destfile'"; \ + $(mkdir_p) "$(DESTDIR)$(propertydir)/$$progname" ; \ + cp "$$file" "$(DESTDIR)$(propertydir)/$$destfile" || exit 1; \ + cp "$$file" "$(DESTDIR)$(propertydir)/$$progname/en.res" || exit 1; \ + cp "$$file" "$(DESTDIR)$(propertydir)/$$progname/en_US.res" || exit 1; \ + done +# the makefile creates this one, but there seems to be no way to tell it not +# to, so we have to remove it before it causes problems + rm -f $(DESTDIR)$(propertydir)/root.res # French resource bundles (for the French localization in the future) #RESOURCE_BUNDLES_FR = foo_fr.res @@ -2375,8 +2379,9 @@ # German resource bundles (for the German localization in the future) #RESOURCE_BUNDLES_DE = foo_de.res -%_root.res : %.properties - $(ICU_GENRB) -s. -d. --encoding 8859-1 --package-name $* $+ +%/root.res : %.properties + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ %_fr.res : %_fr.properties $(ICU_GENRB) -s. -d. --encoding 8859-2 --package-name $* $+ From fedora-directory-commits at redhat.com Mon Jun 9 21:44:03 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 9 Jun 2008 17:44:03 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/memberof memberof.c, 1.7, 1.8 Message-ID: <200806092144.m59Li3o1004702@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4675 Modified Files: memberof.c Log Message: Resolves: 443241 Summary: Fixed issues with cleanup task not adding indirect memberships. Index: memberof.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof/memberof.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- memberof.c 21 Apr 2008 17:45:15 -0000 1.7 +++ memberof.c 9 Jun 2008 21:43:59 -0000 1.8 @@ -2188,9 +2188,9 @@ /* memberof_fix_memberof_callback() * Add initial and/or fix up broken group list in entry * - * 1. Make sure direct membership groups are in the entry - * 2. Add all groups that current group list allows through nested membership - * 3. Trim groups that have no relationship to entry + * 1. Remove all present memberOf values + * 2. Add direct group membership memberOf values + * 3. Add indirect group membership memberOf values */ int memberof_fix_memberof_callback(Slapi_Entry *e, void *callback_data) { @@ -2198,14 +2198,12 @@ char *dn = slapi_entry_get_dn(e); memberof_add_groups data = {dn, dn}; - /* step 1. and step 2. */ + /* step 1 */ + slapi_entry_attr_delete(e, MEMBEROF_ATTR); + + /* step 2 and 3 */ rc = memberof_call_foreach_dn(0, dn, MEMBEROF_GROUP_ATTR, memberof_add_groups_search_callback, &data); - if(0 == rc) - { - /* step 3. */ - rc = memberof_test_membership_callback(e, 0); - } return rc; } From fedora-directory-commits at redhat.com Tue Jun 10 18:50:10 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Tue, 10 Jun 2008 14:50:10 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi-private.h, 1.22, 1.23 proto-slap.h, 1.33, 1.34 schema.c, 1.13, 1.14 Message-ID: <200806101850.m5AIoAie023824@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23794 Modified Files: slapi-private.h proto-slap.h schema.c Log Message: Resolves: #436837 Summary: Dynamically reload schema via task interface (comment #15) Description: fixed the broken function declaration. Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- slapi-private.h 4 Jun 2008 22:22:55 -0000 1.22 +++ slapi-private.h 10 Jun 2008 18:50:07 -0000 1.23 @@ -1084,7 +1084,7 @@ #define DSE_SCHEMA_NO_GLOCK 0x0010 /* don't lock global resources */ #define DSE_SCHEMA_LOCKED 0x0020 /* already locked with - * slapi_load_schemafile_lock; + * reload_schemafile_lock; * no further lock needed */ #define DSE_SCHEMA_USER_DEFINED_ONLY 0x0100 /* refresh user defined schema */ Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- proto-slap.h 4 Jun 2008 22:22:55 -0000 1.33 +++ proto-slap.h 10 Jun 2008 18:50:07 -0000 1.34 @@ -857,9 +857,6 @@ /* csn is consumed. */ void g_set_global_schema_csn(CSN *csn); void slapi_schema_expand_objectclasses( Slapi_Entry *e ); -/* lock to protect both objectclass and schema_dse */ -void slapi_load_schemafile_lock( void ); -void slapi_load_schemafile_unlock( void ); /* API to validate the schema files */ int slapi_validate_schema_files(char *schemadir); /* API to reload the schema files */ Index: schema.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/schema.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- schema.c 4 Jun 2008 23:40:57 -0000 1.13 +++ schema.c 10 Jun 2008 18:50:07 -0000 1.14 @@ -2723,7 +2723,7 @@ * DSE_SCHEMA_NO_CHECK -- schema won't be checked * DSE_SCHEMA_NO_GLOCK -- don't lock global resources * DSE_SCHEMA_LOCKED -- already locked with - * slapi_load_schemafile_lock; + * reload_schemafile_lock; * no further lock needed * schema_ds4x_compat: if non-zero, act like Netscape DS 4.x * @@ -3143,8 +3143,8 @@ * DSE_SCHEMA_NO_GLOCK -- locking of global resources is turned off; * this saves time during initialization since * the server operates in single threaded mode - * at that time or in slapi_load_schemafile_lock. - * DSE_SCHEMA_LOCKED -- already locked with slapi_load_schemafile_lock; + * at that time or in reload_schemafile_lock. + * DSE_SCHEMA_LOCKED -- already locked with reload_schemafile_lock; * no further lock needed * * if is_user_defined is true, force attribute type to be user defined. @@ -4897,14 +4897,14 @@ /* lock to protect both objectclass and schema_dse */ static void -slapi_load_schemafile_lock() +reload_schemafile_lock() { oc_lock_write(); schema_dse_lock_write(); } static void -slapi_load_schemafile_unlock() +reload_schemafile_unlock() { schema_dse_unlock(); oc_unlock(); @@ -4947,7 +4947,7 @@ return LDAP_LOCAL_ERROR; } slapi_be_Wlock(be); /* be lock must be outer of schemafile lock */ - slapi_load_schemafile_lock(); + reload_schemafile_lock(); attr_syntax_delete_all(); oc_delete_all_nolock(); rc = init_schema_dse_ext(schemadir, be, &my_pschemadse, @@ -4955,11 +4955,11 @@ if (rc) { dse_destroy(pschemadse); pschemadse = my_pschemadse; - slapi_load_schemafile_unlock(); + reload_schemafile_unlock(); slapi_be_Unlock(be); return LDAP_SUCCESS; } else { - slapi_load_schemafile_unlock(); + reload_schemafile_unlock(); slapi_be_Unlock(be); slapi_log_error( SLAPI_LOG_FATAL, "schema_reload", "schema file reload failed\n" ); From fedora-directory-commits at redhat.com Tue Jun 10 20:24:05 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 10 Jun 2008 16:24:05 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-fixup-memberof.pl.in, NONE, 1.1 Message-ID: <200806102024.m5AKO5XX007653@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7596/ldap/admin/src/scripts Added Files: template-fixup-memberof.pl.in Log Message: Resolves: 450746 Summary: Added CLI for creating memberOf fix-up task entry. --- NEW FILE template-fixup-memberof.pl.in --- #{{PERL-EXEC}} # # BEGIN COPYRIGHT BLOCK # This Program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 2 of the License. # # This Program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA. # # In addition, as a special exception, Red Hat, Inc. gives You the additional # right to link the code of this Program with code not covered under the GNU # General Public License ("Non-GPL Code") and to distribute linked combinations # including the two, subject to the limitations in this paragraph. Non-GPL Code # permitted under this exception must only link to the code of this Program # through those well defined interfaces identified in the file named EXCEPTION # found in the source code files (the "Approved Interfaces"). The files of # Non-GPL Code may instantiate templates or use macros or inline functions from # the Approved Interfaces without causing the resulting work to be covered by # the GNU General Public License. Only Red Hat, Inc. may make changes or # additions to the list of Approved Interfaces. You must obey the GNU General # Public License in all respects for all of the Program code and other code used # in conjunction with the Program except the Non-GPL Code covered by this # exception. If you modify this file, you may extend this exception to your # version of the file, but you are not obligated to do so. If you do not wish to # provide this exception without modification, you must delete this exception # statement from your version and license this file solely under the GPL without # exception. # # # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. # Copyright (C) 2008 Red Hat, Inc. # All rights reserved. # END COPYRIGHT BLOCK # sub usage { print(STDERR "Usage: $0 [-v] -D rootdn { -w password | -w - | -j filename } \n"); print(STDERR " -b baseDN [-f filter]\n"); print(STDERR " Opts: -D rootdn - Directory Manager\n"); print(STDERR " : -w password - Directory Manager's password\n"); print(STDERR " : -w - - Prompt for Directory Manager's password\n"); print(STDERR " : -j filename - Read Directory Manager's password from file\n"); print(STDERR " : -b baseDN - Base DN that contains entries to fix up.\n"); print(STDERR " : -f filter - Filter for entries to fix up\n"); print(STDERR " If omitted, all entries under the specified\n"); print(STDERR " base will have their memberOf attribute\n"); print(STDERR " regenerated.\n"); print(STDERR " : -v - verbose\n"); } $rootdn = ""; $passwd = ""; $passwdfile = ""; $basedn_arg = ""; $filter_arg = ""; $filter = ""; $verbose = 0; $prefix = "{{DS-ROOT}}"; $ENV{'PATH'} = "$prefix at ldapsdk_bindir@:$prefix/usr/bin:@ldapsdk_bindir@:/usr/bin"; $ENV{'LD_LIBRARY_PATH'} = "$prefix at nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib"; $ENV{'SHLIB_PATH'} = "$prefix at nss_libdir@:$prefix/usr/lib:@nss_libdir@:/usr/lib"; $i = 0; while ($i <= $#ARGV) { if ("$ARGV[$i]" eq "-b") { # base DN $i++; $basedn_arg = $ARGV[$i]; } elsif ("$ARGV[$i]" eq "-f") { # filter $i++; $filter_arg = $ARGV[$i]; } elsif ("$ARGV[$i]" eq "-D") { # Directory Manager $i++; $rootdn = $ARGV[$i]; } elsif ("$ARGV[$i]" eq "-w") { # Directory Manager's password $i++; $passwd = $ARGV[$i]; } elsif ("$ARGV[$i]" eq "-j") { # Read Directory Manager's password from a file $i++; $passwdfile = $ARGV[$i]; } elsif ("$ARGV[$i]" eq "-v") { # verbose $verbose = 1; } else { &usage; exit(1); } $i++; } if ($passwdfile ne ""){ # Open file and get the password unless (open (RPASS, $passwdfile)) { die "Error, cannot open password file $passwdfile\n"; } $passwd = ; chomp($passwd); close(RPASS); } elsif ($passwd eq "-"){ # Read the password from terminal die "The '-w -' option requires an extension library (Term::ReadKey) which is not\n", "part of the standard perl distribution. If you want to use it, you must\n", "download and install the module. You can find it at\n", "http://www.perl.com/CPAN/CPAN.html\n"; # Remove the previous line and uncomment the following 6 lines once you have installed Term::ReadKey module. # use Term::ReadKey; # print "Bind Password: "; # ReadMode('noecho'); # $passwd = ReadLine(0); # chomp($passwd); # ReadMode('normal'); } if ( $rootdn eq "" || $passwd eq "" || $basedn_arg eq "" ) { &usage; exit(1); } $vstr = ""; if ($verbose != 0) { $vstr = "-v"; } # Use a timestamp as part of the task entry name ($s, $m, $h, $dy, $mn, $yr, $wdy, $ydy, $r) = localtime(time); $mn++; $yr += 1900; $taskname = "memberOf_fixup_${yr}_${mn}_${dy}_${h}_${m}_${s}"; # Build the task entry to add $dn = "dn: cn=$taskname, cn=memberOf task, cn=tasks, cn=config\n"; $misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n"; $cn = "cn: $taskname\n"; $basedn = "basedn: $basedn_arg\n"; if ( $filter_arg ne "" ) { $filter = "filter: $filter_arg\n"; } $entry = "${dn}${misc}${cn}${basedn}${filter}"; open(FOO, "| ldapmodify $vstr -h {{SERVER-NAME}} -p {{SERVER-PORT}} -D \"$rootdn\" -w \"$passwd\" -a" ); print(FOO "$entry"); close(FOO); From fedora-directory-commits at redhat.com Tue Jun 10 20:24:05 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 10 Jun 2008 16:24:05 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.68, 1.69 Makefile.in, 1.88, 1.89 aclocal.m4, 1.67, 1.68 config.guess, 1.49, 1.50 config.h.in, 1.16, 1.17 config.sub, 1.49, 1.50 configure, 1.84, 1.85 depcomp, 1.50, 1.51 install-sh, 1.50, 1.51 ltmain.sh, 1.25, 1.26 missing, 1.50, 1.51 Message-ID: <200806102024.m5AKO5PS007650@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7596 Modified Files: Makefile.am Makefile.in aclocal.m4 config.guess config.h.in config.sub configure depcomp install-sh ltmain.sh missing Log Message: Resolves: 450746 Summary: Added CLI for creating memberOf fix-up task entry. Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- Makefile.am 4 Jun 2008 22:22:57 -0000 1.68 +++ Makefile.am 10 Jun 2008 20:24:01 -0000 1.69 @@ -236,6 +236,7 @@ ldap/admin/src/scripts/template-db2bak.pl \ ldap/admin/src/scripts/template-db2index.pl \ ldap/admin/src/scripts/template-db2ldif.pl \ + ldap/admin/src/scripts/template-fixup-memberof.pl \ ldap/admin/src/scripts/template-ldif2db.pl \ ldap/admin/src/scripts/template-ns-accountstatus.pl \ ldap/admin/src/scripts/template-ns-activate.pl \ View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.88 -r 1.89 Makefile.in Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- Makefile.in 4 Jun 2008 22:22:57 -0000 1.88 +++ Makefile.in 10 Jun 2008 20:24:01 -0000 1.89 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,15 +18,11 @@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -47,11 +43,11 @@ pwdhash-bin$(EXEEXT) rsearch-bin$(EXEEXT) noinst_PROGRAMS = makstrdb$(EXEEXT) @SOLARIS_TRUE at am__append_1 = ldap/servers/slapd/tools/ldclt/opCheck.c +subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure compile config.guess config.sub \ depcomp install-sh ltmain.sh missing -subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/fhs.m4 $(top_srcdir)/m4/nspr.m4 \ $(top_srcdir)/m4/nss.m4 $(top_srcdir)/m4/mozldap.m4 \ @@ -61,7 +57,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = @@ -126,6 +122,9 @@ ldap/servers/plugins/shared/libattr_unique_plugin_la-utils.lo libattr_unique_plugin_la_OBJECTS = \ $(am_libattr_unique_plugin_la_OBJECTS) +libattr_unique_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libattr_unique_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libback_ldbm_la_DEPENDENCIES = libslapd.la $(am__DEPENDENCIES_1) am_libback_ldbm_la_OBJECTS = \ ldap/servers/slapd/back-ldbm/libback_ldbm_la-ancestorid.lo \ @@ -188,10 +187,16 @@ ldap/servers/slapd/back-ldbm/libback_ldbm_la-vlv_key.lo \ ldap/servers/slapd/back-ldbm/libback_ldbm_la-vlv_srch.lo libback_ldbm_la_OBJECTS = $(am_libback_ldbm_la_OBJECTS) +libback_ldbm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libback_ldbm_la_LDFLAGS) $(LDFLAGS) -o $@ libbitwise_plugin_la_LIBADD = am_libbitwise_plugin_la_OBJECTS = \ ldap/servers/plugins/bitwise/libbitwise_plugin_la-bitwise.lo libbitwise_plugin_la_OBJECTS = $(am_libbitwise_plugin_la_OBJECTS) +libbitwise_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libbitwise_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @enable_bitwise_TRUE at am_libbitwise_plugin_la_rpath = -rpath \ @enable_bitwise_TRUE@ $(serverplugindir) libchainingdb_plugin_la_LIBADD = @@ -222,6 +227,9 @@ ldap/servers/plugins/chainingdb/libchainingdb_plugin_la-cb_utils.lo libchainingdb_plugin_la_OBJECTS = \ $(am_libchainingdb_plugin_la_OBJECTS) +libchainingdb_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libchainingdb_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libcollation_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libcollation_plugin_la_OBJECTS = ldap/servers/plugins/collation/libcollation_plugin_la-collate.lo \ @@ -233,28 +241,46 @@ ldap/servers/plugins/cos/libcos_plugin_la-cos.lo \ ldap/servers/plugins/cos/libcos_plugin_la-cos_cache.lo libcos_plugin_la_OBJECTS = $(am_libcos_plugin_la_OBJECTS) +libcos_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libcos_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdes_plugin_la_LIBADD = am_libdes_plugin_la_OBJECTS = \ ldap/servers/plugins/rever/libdes_plugin_la-des.lo \ ldap/servers/plugins/rever/libdes_plugin_la-rever.lo libdes_plugin_la_OBJECTS = $(am_libdes_plugin_la_OBJECTS) +libdes_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libdes_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdistrib_plugin_la_LIBADD = am_libdistrib_plugin_la_OBJECTS = \ ldap/servers/plugins/distrib/libdistrib_plugin_la-distrib.lo libdistrib_plugin_la_OBJECTS = $(am_libdistrib_plugin_la_OBJECTS) +libdistrib_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libdistrib_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libdna_plugin_la_LIBADD = am_libdna_plugin_la_OBJECTS = \ ldap/servers/plugins/dna/libdna_plugin_la-dna.lo libdna_plugin_la_OBJECTS = $(am_libdna_plugin_la_OBJECTS) +libdna_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libdna_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @enable_dna_TRUE at am_libdna_plugin_la_rpath = -rpath $(serverplugindir) libhttp_client_plugin_la_LIBADD = am_libhttp_client_plugin_la_OBJECTS = ldap/servers/plugins/http/libhttp_client_plugin_la-http_client.lo \ ldap/servers/plugins/http/libhttp_client_plugin_la-http_impl.lo libhttp_client_plugin_la_OBJECTS = \ $(am_libhttp_client_plugin_la_OBJECTS) +libhttp_client_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libhttp_client_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libmemberof_plugin_la_LIBADD = am_libmemberof_plugin_la_OBJECTS = ldap/servers/plugins/memberof/libmemberof_plugin_la-memberof.lo libmemberof_plugin_la_OBJECTS = $(am_libmemberof_plugin_la_OBJECTS) +libmemberof_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libmemberof_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libns_dshttpd_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) @@ -326,6 +352,10 @@ ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptpreop.lo libpam_passthru_plugin_la_OBJECTS = \ $(am_libpam_passthru_plugin_la_OBJECTS) +libpam_passthru_plugin_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libpam_passthru_plugin_la_LDFLAGS) \ + $(LDFLAGS) -o $@ @enable_pam_passthru_TRUE at am_libpam_passthru_plugin_la_rpath = -rpath \ @enable_pam_passthru_TRUE@ $(serverplugindir) libpassthru_plugin_la_LIBADD = @@ -337,9 +367,15 @@ ldap/servers/plugins/passthru/libpassthru_plugin_la-ptpreop.lo \ ldap/servers/plugins/passthru/libpassthru_plugin_la-ptutil.lo libpassthru_plugin_la_OBJECTS = $(am_libpassthru_plugin_la_OBJECTS) +libpassthru_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpassthru_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libpresence_plugin_la_LIBADD = am_libpresence_plugin_la_OBJECTS = ldap/servers/plugins/presence/libpresence_plugin_la-presence.lo libpresence_plugin_la_OBJECTS = $(am_libpresence_plugin_la_OBJECTS) +libpresence_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpresence_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libpwdstorage_plugin_la_LIBADD = am_libpwdstorage_plugin_la_OBJECTS = ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-clear_pwd.lo \ ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-crypt_pwd.lo \ @@ -351,9 +387,15 @@ ldap/servers/plugins/pwdstorage/libpwdstorage_plugin_la-ssha_pwd.lo libpwdstorage_plugin_la_OBJECTS = \ $(am_libpwdstorage_plugin_la_OBJECTS) +libpwdstorage_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpwdstorage_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libreferint_plugin_la_LIBADD = am_libreferint_plugin_la_OBJECTS = ldap/servers/plugins/referint/libreferint_plugin_la-referint.lo libreferint_plugin_la_OBJECTS = $(am_libreferint_plugin_la_OBJECTS) +libreferint_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libreferint_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libreplication_plugin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am_libreplication_plugin_la_OBJECTS = ldap/servers/plugins/replication/libreplication_plugin_la-cl5_api.lo \ @@ -412,6 +454,9 @@ ldap/servers/plugins/replication/libreplication_plugin_la-windows_tot_protocol.lo libreplication_plugin_la_OBJECTS = \ $(am_libreplication_plugin_la_OBJECTS) +libreplication_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libreplication_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ libretrocl_plugin_la_LIBADD = am_libretrocl_plugin_la_OBJECTS = \ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl.lo \ @@ -421,15 +466,25 @@ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl_rootdse.lo \ ldap/servers/plugins/retrocl/libretrocl_plugin_la-retrocl_trim.lo libretrocl_plugin_la_OBJECTS = $(am_libretrocl_plugin_la_OBJECTS) +libretrocl_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ [...6010 lines suppressed...] + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -8836,13 +8892,12 @@ CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -8857,24 +8912,22 @@ distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/m4 - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -8888,7 +8941,7 @@ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz @@ -8898,6 +8951,10 @@ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) @@ -8924,6 +8981,8 @@ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ @@ -8963,7 +9022,7 @@ $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -8989,7 +9048,7 @@ $(DATA) config.h installdirs: for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(mibdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am @@ -9123,13 +9182,21 @@ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-taskSCRIPTS +install-dvi: install-dvi-am + install-exec-am: install-binPROGRAMS install-binSCRIPTS \ install-sbinPROGRAMS install-sbinSCRIPTS +install-html: install-html-am + install-info: install-info-am install-man: +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -9153,46 +9220,47 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-configDATA uninstall-infDATA uninstall-info-am \ - uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ - uninstall-mibDATA uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA \ - uninstall-sampledataDATA uninstall-sbinPROGRAMS \ - uninstall-sbinSCRIPTS uninstall-schemaDATA \ - uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ - uninstall-taskSCRIPTS + uninstall-configDATA uninstall-infDATA uninstall-initSCRIPTS \ + uninstall-initconfigSCRIPTS uninstall-mibDATA \ + uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ + uninstall-propertyDATA uninstall-sampledataDATA \ + uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ + uninstall-schemaDATA uninstall-serverLTLIBRARIES \ + uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstPROGRAMS clean-sbinPROGRAMS \ clean-serverLTLIBRARIES clean-serverpluginLTLIBRARIES ctags \ - dist dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ \ - dist-zip distcheck distclean distclean-compile \ + dist dist-all dist-bzip2 dist-gzip dist-lzma dist-shar \ + dist-tarZ dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-configDATA \ - install-data install-data-am install-exec install-exec-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ install-infDATA install-info install-info-am \ install-initSCRIPTS install-initconfigSCRIPTS install-man \ - install-mibDATA install-nodist_propertyDATA \ - install-perlSCRIPTS install-propertyDATA \ - install-sampledataDATA install-sbinPROGRAMS \ - install-sbinSCRIPTS install-schemaDATA \ + install-mibDATA install-nodist_propertyDATA install-pdf \ + install-pdf-am install-perlSCRIPTS install-propertyDATA \ + install-ps install-ps-am install-sampledataDATA \ + install-sbinPROGRAMS install-sbinSCRIPTS install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-strip install-taskSCRIPTS installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ - uninstall-configDATA uninstall-infDATA uninstall-info-am \ - uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ - uninstall-mibDATA uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA \ - uninstall-sampledataDATA uninstall-sbinPROGRAMS \ - uninstall-sbinSCRIPTS uninstall-schemaDATA \ - uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ - uninstall-taskSCRIPTS + uninstall-configDATA uninstall-infDATA uninstall-initSCRIPTS \ + uninstall-initconfigSCRIPTS uninstall-mibDATA \ + uninstall-nodist_propertyDATA uninstall-perlSCRIPTS \ + uninstall-propertyDATA uninstall-sampledataDATA \ + uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS \ + uninstall-schemaDATA uninstall-serverLTLIBRARIES \ + uninstall-serverpluginLTLIBRARIES uninstall-taskSCRIPTS dirver.h: Makefile Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- aclocal.m4 4 Jun 2008 22:22:57 -0000 1.67 +++ aclocal.m4 10 Jun 2008 20:24:01 -0000 1.68 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,9 +11,17 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(AC_AUTOCONF_VERSION, [2.61],, +[m4_warning([this file was generated for autoconf 2.61. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -# serial 48 AC_PROG_LIBTOOL +# serial 51 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -176,7 +184,7 @@ test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -263,8 +271,9 @@ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* @@ -276,8 +285,9 @@ # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext +[AC_REQUIRE([LT_AC_PROG_SED])dnl +ac_outfile=conftest.$ac_objext +echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* @@ -293,12 +303,20 @@ # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], -[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\(.*\)$/\1/ + p + } + }' +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'`; fi],[]) +if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` +fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX @@ -529,13 +547,17 @@ rm -rf conftest* ;; -x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_i386_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; @@ -551,7 +573,11 @@ esac ;; *64-bit*) + libsuff=64 case $host in + x86_64-*kfreebsd*-gnu) + LD="${LD-ld} -m elf_x86_64_fbsd" + ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; @@ -623,7 +649,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. @@ -664,11 +690,12 @@ # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - printf "$lt_simple_link_test_code" > conftest.$ac_ext + echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings @@ -782,24 +809,27 @@ fi ;; *) - # If test is not a shell built-in, we'll probably end up computing a - # maximum length that is only half of the actual maximum length, but - # we can't tell. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` + if test -n "$lt_cv_sys_max_cmd_len"; then + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` + else + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} + while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # Add a significant safety factor because C++ compilers can tack on massive - # amounts of additional arguments before passing them to the linker. - # It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + new_result=`expr "X$teststring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + teststring=$teststring$teststring + done + teststring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + fi ;; esac ]) @@ -1026,7 +1056,8 @@ # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], -[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no @@ -1034,7 +1065,7 @@ mkdir conftest cd conftest mkdir out - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or @@ -1174,6 +1205,7 @@ darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" + old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1191,7 +1223,8 @@ # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= @@ -1205,20 +1238,58 @@ version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" +m4_if($1,[],[ if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + case $host_os in + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; + *) lt_awk_arg="/^libraries:/" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else - sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi + # Ok, now we have the path, separated by spaces, we can step through it + # and add multilib dir if necessary. + lt_tmp_lt_search_path_spec= + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + for lt_sys_path in $lt_search_path_spec; do + if test -d "$lt_sys_path/$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" + else + test -d "$lt_sys_path" && \ + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" + fi + done + lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' +BEGIN {RS=" "; FS="/|\n";} { + lt_foo=""; + lt_count=0; + for (lt_i = NF; lt_i > 0; lt_i--) { + if ($lt_i != "" && $lt_i != ".") { + if ($lt_i == "..") { + lt_count++; + } else { + if (lt_count == 0) { + lt_foo="/" $lt_i lt_foo; + } else { + lt_count--; + } + } + } + } + if (lt_foo != "") { lt_freq[[lt_foo]]++; } + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } +}'` + sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi +fi]) need_lib_prefix=unknown hardcode_into_libs=no @@ -1375,12 +1446,8 @@ shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if test "$GCC" = yes; then - sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` - else - sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' - fi + m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -1397,18 +1464,6 @@ dynamic_linker=no ;; -kfreebsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -1446,7 +1501,7 @@ shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - freebsd*) # from 4.6 on + *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -1509,7 +1564,7 @@ postinstall_cmds='chmod 555 $lib' ;; -interix3*) +interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no @@ -1564,7 +1619,7 @@ ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no @@ -1577,11 +1632,13 @@ # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -1593,18 +1650,6 @@ dynamic_linker='GNU/Linux ld.so' ;; -knetbsd*-gnu) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - dynamic_linker='GNU ld.so' - ;; - netbsd*) version_type=sunos need_lib_prefix=no @@ -1686,6 +1731,10 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; +rdos*) + dynamic_linker=no + ;; + solaris*) version_type=linux need_lib_prefix=no @@ -1791,7 +1840,8 @@ # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_ARG_WITH([tags], +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -2052,7 +2102,7 @@ # AC_PATH_TOOL_PREFIX # ------------------- -# find a file program which can recognise shared library +# find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) @@ -2115,7 +2165,7 @@ # AC_PATH_MAGIC # ------------- -# find a file program which can recognise a shared library +# find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then @@ -2262,7 +2312,7 @@ # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], -[AC_CACHE_CHECK([how to recognise dependent libraries], +[AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -2301,16 +2351,22 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump'. - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' + # func_win32_libid shell function, so use a weaker test based on 'objdump', + # unless we find 'file', for example because we are cross-compiling. + if ( file / ) >/dev/null 2>&1; then + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='func_win32_libid' + else + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | kfreebsd*-gnu | dragonfly*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -2348,7 +2404,7 @@ esac ;; -interix3*) +interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; @@ -2364,7 +2420,7 @@ ;; # This must be Linux ELF. -linux*) +linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -2398,6 +2454,10 @@ lt_cv_deplibs_check_method=pass_all ;; +rdos*) + lt_cv_deplibs_check_method=pass_all + ;; + solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -2450,7 +2510,7 @@ lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do @@ -2666,10 +2726,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}\n' +lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER @@ -2771,10 +2831,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;\n" +lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -2920,7 +2980,7 @@ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -3079,10 +3139,10 @@ case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -3116,7 +3176,7 @@ freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -3165,9 +3225,7 @@ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; + hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; @@ -3235,7 +3293,7 @@ ;; esac ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -3275,7 +3333,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -3355,6 +3413,29 @@ # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + esac + ;; esac ;; lynxos*) @@ -3393,16 +3474,20 @@ _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + fi + output_verbose_link_cmd='echo' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi - output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in @@ -3564,15 +3649,10 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The C++ compiler is used as linker so we must use $wl - # flag to pass the commands to the underlying system - # linker. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes @@ -3619,6 +3699,12 @@ fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac fi ;; esac @@ -3862,7 +3948,7 @@ # PORTME: override above test on systems where it is broken ifelse([$1],[CXX], [case $host_os in -interix3*) +interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_AC_TAGVAR(predep_objects,$1)= @@ -3870,13 +3956,46 @@ _LT_AC_TAGVAR(postdeps,$1)= ;; +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + # + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + solaris*) case $cc_basename in CC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi ;; esac ;; @@ -3925,10 +4044,17 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code=" subroutine t\n return\n end\n" +lt_simple_compile_test_code="\ + subroutine t + return + end +" # Code to be used in simple link tests -lt_simple_link_test_code=" program t\n end\n" +lt_simple_link_test_code="\ + program t + end +" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4007,10 +4133,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}\n" +lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4063,7 +4189,7 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -4152,6 +4278,7 @@ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do @@ -4198,7 +4325,7 @@ # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -4523,7 +4650,7 @@ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" +fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) @@ -4606,6 +4733,7 @@ # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. @@ -4642,7 +4770,7 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; -linux*) +linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" @@ -4832,12 +4960,14 @@ # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | os2* | pw32*) + mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) @@ -4849,7 +4979,7 @@ # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -4915,7 +5045,7 @@ ;; esac ;; - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4958,7 +5088,7 @@ ;; esac ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4985,6 +5115,14 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + esac ;; esac ;; @@ -5105,13 +5243,15 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). + # Although the cygwin gcc ignores -fPIC, still need this for old-style + # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; @@ -5121,7 +5261,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix3*) + interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5179,7 +5319,7 @@ esac ;; - mingw* | pw32* | os2*) + mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' @@ -5212,7 +5352,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - linux*) + linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -5231,6 +5371,22 @@ # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + *Sun\ F*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; + esac + ;; esac ;; @@ -5240,6 +5396,10 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + rdos*) + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -5334,7 +5494,8 @@ # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +[AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in @@ -5351,7 +5512,7 @@ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' @@ -5490,7 +5651,7 @@ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -5508,7 +5669,7 @@ fi ;; - interix3*) + interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' @@ -5523,7 +5684,7 @@ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; - linux*) + gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -5541,13 +5702,22 @@ ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C 5.9 + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + tmp_sharedflag='-G' ;; + *Sun\ F*) # Sun Fortran 8.3 + tmp_sharedflag='-G' ;; + *) + tmp_sharedflag='-shared' ;; + esac + _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no @@ -5587,7 +5757,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 @@ -5706,7 +5876,7 @@ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 - _LT_AC_TAGVAR(hardcode_direct, $1)=yes + : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported @@ -5799,7 +5969,7 @@ # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. - _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; @@ -5841,10 +6011,10 @@ case $cc_basename in xlc*) output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) @@ -5884,7 +6054,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | kfreebsd*-gnu | dragonfly*) + freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes @@ -6006,24 +6176,28 @@ ;; openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + if test -f /usr/libexec/ld.so; then + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac + _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; @@ -6082,17 +6256,16 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. + # The compiler driver will combine and reorder linker options, + # but understands `-z linker_flag'. GCC discards it without `$wl', + # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; + if test "$GCC" = yes; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' + fi + ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -6149,7 +6322,7 @@ fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -6224,7 +6397,7 @@ # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - printf "$lt_simple_compile_test_code" > conftest.$ac_ext + echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest @@ -6327,6 +6500,30 @@ [AC_CHECK_TOOL(RC, windres, no) ]) + +# Cheap backport of AS_EXECUTABLE_P and required macros +# from Autoconf 2.59; we should not use $as_executable_p directly. + +# _AS_TEST_PREPARE +# ---------------- +m4_ifndef([_AS_TEST_PREPARE], +[m4_defun([_AS_TEST_PREPARE], +[if test -x / >/dev/null 2>&1; then + as_executable_p='test -x' +else + as_executable_p='test -f' +fi +])])# _AS_TEST_PREPARE + +# AS_EXECUTABLE_P +# --------------- +# Check whether a file is executable. +m4_ifndef([AS_EXECUTABLE_P], +[m4_defun([AS_EXECUTABLE_P], +[AS_REQUIRE([_AS_TEST_PREPARE])dnl +$as_executable_p $1[]dnl +])])# AS_EXECUTABLE_P + # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # @@ -6347,12 +6544,13 @@ test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done +IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris @@ -6385,10 +6583,11 @@ done ]) SED=$lt_cv_path_SED +AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6398,14 +6597,31 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.10.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -6462,14 +6678,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6478,8 +6694,10 @@ [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -6493,15 +6711,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -6529,6 +6746,7 @@ ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -6594,6 +6812,7 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -6646,7 +6865,8 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -6671,8 +6891,9 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -6719,14 +6940,14 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 +# serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -6743,16 +6964,20 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -6772,6 +6997,9 @@ AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -6807,6 +7035,10 @@ [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -6820,16 +7052,17 @@ # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # @@ -6842,7 +7075,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -6947,13 +7180,14 @@ rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 5 # AM_PROG_CC_C_O # -------------- @@ -6961,6 +7195,7 @@ AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC @@ -6973,18 +7208,22 @@ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi +dnl Make sure AC_PROG_CC is never called again, or it will override our +dnl setting of CC. +m4_define([AC_PROG_CC], + [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -7000,6 +7239,7 @@ # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -7010,7 +7250,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -7018,60 +7258,23 @@ # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- @@ -7183,9 +7386,21 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. Index: config.guess =================================================================== RCS file: /cvs/dirsec/ldapserver/config.guess,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- config.guess 30 May 2008 15:38:59 -0000 1.49 +++ config.guess 10 Jun 2008 20:24:01 -0000 1.50 @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2005-07-08' +timestamp='2008-01-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -55,8 +56,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -106,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -160,6 +161,7 @@ arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -206,8 +208,11 @@ *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -325,7 +330,7 @@ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -527,7 +532,7 @@ echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[45]) + *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -764,12 +769,19 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -779,9 +791,18 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit ;; + *:Interix*:[3456]*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T | authenticamd) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -794,7 +815,7 @@ i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:*) + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) @@ -815,6 +836,16 @@ echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + fi + exit ;; + avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) @@ -851,7 +882,11 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -870,9 +905,16 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; @@ -916,9 +958,15 @@ sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -961,7 +1009,7 @@ LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -971,7 +1019,11 @@ LIBC=dietlibc #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit @@ -1173,6 +1225,15 @@ SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1182,7 +1243,6 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1261,6 +1321,9 @@ i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 Index: config.h.in =================================================================== RCS file: /cvs/dirsec/ldapserver/config.h.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- config.h.in 30 May 2008 15:38:59 -0000 1.16 +++ config.h.in 10 Jun 2008 20:24:02 -0000 1.17 @@ -374,7 +374,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* SunOS5 */ Index: config.sub =================================================================== RCS file: /cvs/dirsec/ldapserver/config.sub,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- config.sub 30 May 2008 15:38:59 -0000 1.49 +++ config.sub 10 Jun 2008 20:24:02 -0000 1.50 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. -timestamp='2005-07-08' +timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -71,8 +72,8 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -119,8 +120,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -171,6 +173,10 @@ -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -187,6 +193,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -231,15 +241,16 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -257,28 +268,27 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | ms1 \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; - m32c) - basic_machine=$basic_machine-unknown - ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -286,6 +296,9 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -305,18 +318,18 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ + | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -336,30 +349,33 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | ms1-* \ + | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; - m32c-*) + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -431,6 +447,14 @@ basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; c90) basic_machine=c90-cray os=-unicos @@ -463,8 +487,8 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -656,6 +680,14 @@ basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -671,6 +703,10 @@ basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -696,6 +732,9 @@ basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -794,6 +833,14 @@ basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -803,6 +850,12 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -859,6 +912,10 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -885,6 +942,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -896,6 +957,9 @@ basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -985,6 +1049,10 @@ basic_machine=tic6x-unknown os=-coff ;; + tile*) + basic_machine=tile-unknown + os=-linux-gnu + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -1101,7 +1169,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1174,21 +1242,23 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1340,6 +1410,12 @@ # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1349,9 +1425,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1377,6 +1453,9 @@ m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.84 -r 1.85 configure Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.84 retrieving revision 1.85 diff -u -r1.84 -r1.85 --- configure 4 Jun 2008 22:22:57 -0000 1.84 +++ configure 10 Jun 2008 20:24:02 -0000 1.85 @@ -1,27 +1,56 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for dirsrv 1.1.1. +# Generated by GNU Autoconf 2.61 for dirsrv 1.1.1. # # Report bugs to . # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -31,8 +60,43 @@ fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -46,18 +110,19 @@ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -65,157 +130,388 @@ # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { [...19288 lines suppressed...] - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -26700,20 +27470,32 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` else continue fi @@ -26735,53 +27517,79 @@ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF Index: depcomp =================================================================== RCS file: /cvs/dirsec/ldapserver/depcomp,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- depcomp 30 May 2008 15:38:59 -0000 1.50 +++ depcomp 10 Jun 2008 20:24:02 -0000 1.51 @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2007-03-29.01 -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -91,7 +92,20 @@ ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -201,34 +215,39 @@ # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -276,6 +295,46 @@ rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +347,13 @@ if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is Index: install-sh =================================================================== RCS file: /cvs/dirsec/ldapserver/install-sh,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- install-sh 30 May 2008 15:38:59 -0000 1.50 +++ install-sh 10 Jun 2008 20:24:02 -0000 1.51 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,38 +39,68 @@ # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 -chmodcmd="$chmodprog 0755" -chowncmd= chgrpcmd= -stripcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -80,81 +110,86 @@ In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; - -d) dir_arg=true - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac + shift done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -164,24 +199,47 @@ exit 0 fi +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do # Protect names starting with `-'. case $src in - -*) src=./$src ;; + -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -190,71 +248,199 @@ exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dstarg + dst=$dst_arg # Protect names starting with `-'. case $dst in - -*) dst=./$dst ;; + -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. + obsolete_mkdir_used=false - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - pathcomp= + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +448,9 @@ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -273,47 +458,58 @@ # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } -done + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- ltmain.sh 4 Jun 2008 22:22:57 -0000 1.25 +++ ltmain.sh 10 Jun 2008 20:24:02 -0000 1.26 @@ -1,8 +1,8 @@ # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify @@ -43,14 +43,22 @@ PROGRAM=ltmain.sh PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" +VERSION=1.5.24 +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)" -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes. -if test -n "${ZSH_VERSION+set}" ; then +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then @@ -105,12 +113,14 @@ # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). # We save the old values to restore during execute mode. -if test "${LC_ALL+set}" = set; then - save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL -fi -if test "${LANG+set}" = set; then - save_LANG="$LANG"; LANG=C; export LANG -fi +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + fi" +done # Make sure IFS has a sensible default lt_nl=' @@ -136,6 +146,8 @@ preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 ##################################### # Shell function definitions: @@ -196,7 +208,13 @@ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + $SED -n -e '1,100{ + / I /{ + s,.*,import, + p + q + } + }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -327,7 +345,17 @@ *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + extracted_serial=`expr $extracted_serial + 1` + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" @@ -454,11 +482,12 @@ ;; --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + echo "\ +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP + +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; @@ -755,9 +784,10 @@ *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; + *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; + *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` @@ -1138,8 +1168,9 @@ for arg do case $arg in - -all-static | -static) - if test "X$arg" = "X-all-static"; then + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 fi @@ -1147,12 +1178,20 @@ dlopen_self=$dlopen_self_static fi prefer_static_libs=yes - else + ;; + -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built - fi + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac build_libtool_libs=no build_old_libs=yes break @@ -1600,7 +1639,7 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" @@ -1620,10 +1659,11 @@ # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC - # -pg pass through profiling flag for GCC + # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC + # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. @@ -1651,9 +1691,9 @@ -no-install) case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. + # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no @@ -1712,7 +1752,7 @@ continue ;; - -static) + -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects @@ -2094,7 +2134,7 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -2490,7 +2530,9 @@ if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. @@ -3186,7 +3228,7 @@ # which has an extra 1 added just for fun # case $version_type in - darwin|linux|osf|windows) + darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" @@ -3197,9 +3239,10 @@ age="0" ;; irix|nonstopux) - current=`expr $number_major + $number_minor - 1` + current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" + lt_irix_increment=no ;; esac ;; @@ -3258,7 +3301,8 @@ versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) @@ -3272,8 +3316,11 @@ ;; irix | nonstopux) - major=`expr $current - $age + 1` - + if test "X$lt_irix_increment" = "Xno"; then + major=`expr $current - $age` + else + major=`expr $current - $age + 1` + fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; @@ -3410,11 +3457,11 @@ fi # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done + #for path in $notinst_path; do + # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. @@ -3515,13 +3562,12 @@ int main() { return 0; } EOF $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $deplibs - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do name=`expr $i : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. - if test "$name" != "" && test "$name" -ne "0"; then + if test "$name" != "" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) @@ -3560,9 +3606,7 @@ # If $name is empty we are operating on a -L argument. if test "$name" != "" && test "$name" != "0"; then $rm conftest - $LTCC $LTCFLAGS -o conftest conftest.c $i - # Did it work? - if test "$?" -eq 0 ; then + if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in @@ -3594,7 +3638,7 @@ droppeddeps=yes $echo $echo "*** Warning! Library $i is needed by this library but I was not able to" - $echo "*** make it link in! You will probably need to install it or some" + $echo "*** make it link in! You will probably need to install it or some" $echo "*** library that it depends on before this library will be fully" $echo "*** functional. Installing it before continuing would be even better." fi @@ -3880,7 +3924,10 @@ test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + case $archive_cmds in + *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; + *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; + esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi @@ -4239,12 +4286,14 @@ reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" @@ -4692,16 +4741,16 @@ case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; @@ -4716,13 +4765,13 @@ # really was required. # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. @@ -4809,7 +4858,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= @@ -4846,7 +4895,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. @@ -5253,6 +5302,20 @@ Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @@ -5395,7 +5458,7 @@ ;; esac $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else @@ -5581,7 +5644,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -5926,9 +5989,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 @@ -6137,7 +6200,7 @@ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : @@ -6348,8 +6411,10 @@ if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE + if test ! -f "$dir/$dlname"; then + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi fi ;; @@ -6413,12 +6478,12 @@ fi # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi + for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + fi" + done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" @@ -6775,9 +6840,9 @@ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE + try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX - try to export only the symbols matching REGEX + try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened @@ -6791,9 +6856,11 @@ -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] + specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Index: missing =================================================================== RCS file: /cvs/dirsec/ldapserver/missing,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- missing 30 May 2008 15:38:59 -0000 1.50 +++ missing 10 Jun 2008 20:24:02 -0000 1.51 @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2006-05-10.23 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -33,6 +33,8 @@ fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. @@ -44,7 +46,7 @@ msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -77,6 +79,7 @@ aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' + autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c @@ -106,7 +109,7 @@ # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). -case "$1" in +case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; @@ -135,7 +138,7 @@ # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if @@ -164,7 +167,7 @@ test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -192,8 +195,8 @@ You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -214,25 +217,25 @@ in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -244,18 +247,18 @@ in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then + if test $# -ne 1; then eval LASTARG="\${$#}" - case "$LASTARG" in + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -267,11 +270,9 @@ \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file @@ -289,11 +290,17 @@ DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -317,13 +324,13 @@ fi firstarg="$1" if shift; then - case "$firstarg" in + case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac - case "$firstarg" in + case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 From fedora-directory-commits at redhat.com Wed Jun 11 21:07:00 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 11 Jun 2008 17:07:00 -0400 Subject: [Fedora-directory-commits] dsmlgw/scripts dsml2ldif.in, 1.2, 1.3 dsmlgw-search.in, 1.3, 1.4 ldif2dsml.in, 1.2, 1.3 Message-ID: <200806112107.m5BL70cl020529@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsmlgw/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20508/dsmlgw/scripts Modified Files: dsml2ldif.in dsmlgw-search.in ldif2dsml.in Log Message: Resolves: bug 449178 Bug Description: Hard-coded java path limitting the installation flexibility Reviewed by: nhosoi (Thanks!) Fix Description: Allow the user to specify JAVA_HOME to override the default javahome location. Platforms tested: RHEL5 Flag Day: no Doc impact: no Index: dsml2ldif.in =================================================================== RCS file: /cvs/dirsec/dsmlgw/scripts/dsml2ldif.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dsml2ldif.in 30 Apr 2008 20:49:22 -0000 1.2 +++ dsml2ldif.in 11 Jun 2008 21:06:58 -0000 1.3 @@ -25,7 +25,7 @@ # END COPYRIGHT BLOCK # -CP=@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/dsmlgw.jar:@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/ldapjdk.jar +CP="@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/dsmlgw.jar:@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/ldapjdk.jar" # it seems that most java 1.5 and later JREs already have a built-in sax implementation # if you need to specify another one, just specify the SAXJARS env var # SAXJARS=/path/to/xml-parser.jar dsml2ldif file.dsml @@ -33,4 +33,8 @@ CP=${CP}:$SAXJARS fi - at runtime_javahome@/bin/java -cp "$CP" com.netscape.xmltools.DSML2LDIF "$@" +DEFAULT_JAVAHOME="@runtime_javahome@" + +JAVA_HOME="${JAVA_HOME:-$DEFAULT_JAVAHOME}" + +"$JAVA_HOME/bin/java" -cp "$CP" com.netscape.xmltools.DSML2LDIF "$@" Index: dsmlgw-search.in =================================================================== RCS file: /cvs/dirsec/dsmlgw/scripts/dsmlgw-search.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dsmlgw-search.in 30 Apr 2008 20:49:22 -0000 1.3 +++ dsmlgw-search.in 11 Jun 2008 21:06:58 -0000 1.4 @@ -99,6 +99,10 @@ fi done - at runtime_javahome@/bin/java -cp "$AXISCP" com.netscape.dsml.test.dsmlSearch http://$hostname:$port/axis/services/dsmlgw $tmpdsml +DEFAULT_JAVAHOME="@runtime_javahome@" + +JAVA_HOME="${JAVA_HOME:-$DEFAULT_JAVAHOME}" + +"$JAVA_HOME/bin/java" -cp "$AXISCP" com.netscape.dsml.test.dsmlSearch http://$hostname:$port/axis/services/dsmlgw $tmpdsml rm -f $tmpdsml Index: ldif2dsml.in =================================================================== RCS file: /cvs/dirsec/dsmlgw/scripts/ldif2dsml.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ldif2dsml.in 30 Apr 2008 20:49:22 -0000 1.2 +++ ldif2dsml.in 11 Jun 2008 21:06:58 -0000 1.3 @@ -25,7 +25,7 @@ # END COPYRIGHT BLOCK # -CP=@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/dsmlgw.jar:@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/ldapjdk.jar +CP="@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/dsmlgw.jar:@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/ldapjdk.jar" # it seems that most java 1.5 and later JREs already have a built-in sax implementation # if you need to specify another one, just specify the SAXJARS env var # SAXJARS=/path/to/xml-parser.jar dsml2ldif file.dsml @@ -33,4 +33,8 @@ CP=${CP}:$SAXJARS fi - at runtime_javahome@/bin/java -cp "$CP" com.netscape.xmltools.LDIF2DSML "$@" +DEFAULT_JAVAHOME="@runtime_javahome@" + +JAVA_HOME="${JAVA_HOME:-$DEFAULT_JAVAHOME}" + +"$JAVA_HOME/bin/java" -cp "$CP" com.netscape.xmltools.LDIF2DSML "$@" From fedora-directory-commits at redhat.com Wed Jun 11 21:12:33 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 11 Jun 2008 17:12:33 -0400 Subject: [Fedora-directory-commits] dsgw htmlout.c,1.6,1.7 Message-ID: <200806112112.m5BLCX4K020698@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20681/dsgw Modified Files: htmlout.c Log Message: Resolves: bug 450134 Bug Description: No text in advance search box does not produce error messages Reviewed by: nhosoi (Thanks!) Fix Description: The old DSGW used to support GET and POST at the same time. This does not work anymore since moving to use adminutil. The solution is to use POST style form arguments with post actions - so lang?file=alert.html becomes inside of a FORM POST. Platforms tested: RHEL5 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: htmlout.c =================================================================== RCS file: /cvs/dirsec/dsgw/htmlout.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- htmlout.c 20 Mar 2008 02:18:39 -0000 1.6 +++ htmlout.c 11 Jun 2008 21:12:31 -0000 1.7 @@ -419,7 +419,8 @@ dsgw_emit_alertForm () { dsgw_form_begin ("alertForm", "action=\"%s\" target=alertWindow", - DSGW_URLPREFIX_MAIN_HTTP "alert.html"); + DSGW_CGINAME_LANG); + dsgw_emits (""); dsgw_emitf ("", XP_GetClientStr(DBT_alertTitle_)); dsgw_emits ("" "\n"); @@ -429,7 +430,8 @@ dsgw_emit_confirmForm () { dsgw_form_begin ("confirmForm", "action=\"%s\" target=confirmWindow", - DSGW_URLPREFIX_MAIN_HTTP "confirm.html"); + DSGW_CGINAME_LANG); + dsgw_emits (""); dsgw_emitf ("", XP_GetClientStr(DBT_confirmTitle_)); dsgw_emits ("" "" From fedora-directory-commits at redhat.com Wed Jun 11 21:19:49 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 11 Jun 2008 17:19:49 -0400 Subject: [Fedora-directory-commits] dsgw/html/manual auth.htm,1.2,1.3 Message-ID: <200806112119.m5BLJnqs020923@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/html/manual In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20906 Modified Files: auth.htm Log Message: Resolves: bug 450588 Description: DSGW Help Page Needs To Reflect the Default Access Permission Fix Description: Improved the wording to make it more clear. Index: auth.htm =================================================================== RCS file: /cvs/dirsec/dsgw/html/manual/auth.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- auth.htm 6 Mar 2008 22:00:38 -0000 1.2 +++ auth.htm 11 Jun 2008 21:19:47 -0000 1.3 @@ -56,7 +56,8 @@ so that permission is not required for some procedures.

By default, access to the directory is denied to all users -with the exception of the directory administrator. The +with the exception of the directory administrator. However, most sites +allow anonymous search access and self update access. The directory administrator defines the permissions that grant or remove access to the directory. Because permissions are determined on a site by site basis, you need to check with your From fedora-directory-commits at redhat.com Wed Jun 11 22:03:54 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 11 Jun 2008 18:03:54 -0400 Subject: [Fedora-directory-commits] dsgw/html/manual add.htm, 1.2, 1.3 attribut.htm, 1.3, 1.4 mod.htm, 1.2, 1.3 objclass.htm, 1.3, 1.4 Message-ID: <200806112203.m5BM3sPj028604@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/html/manual In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28584/dsgw/html/manual Modified Files: add.htm attribut.htm mod.htm objclass.htm Log Message: Resolves: bug 450894 Bug Description: The help page for 'adding entries' does not display appropriate info for nt-person Fix Description: In fact, many of the help pages are not displayed correctly. In an earlier commit I changed the HTML comments based on HTML Tidy feedback. However, the literal string is stripped out by lang and replaced with the correct context string. Platforms tested: RHEL5 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: add.htm =================================================================== RCS file: /cvs/dirsec/dsgw/html/manual/add.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- add.htm 6 Mar 2008 22:00:38 -0000 1.2 +++ add.htm 11 Jun 2008 22:03:52 -0000 1.3 @@ -48,35 +48,35 @@ entries, your Directory Server administrator must have granted you the right to do so. Before you can add an entry, you must authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate to the Directory Server.

Using the Directory Server interface you can add:

Before you add an entry for the first time, read the New + href="/clients/dsgw/bin/lang?&file=.MANUAL/add.htm#guidelines">New Entry Guidelines section for important information about the directory tree structure and naming conventions. @@ -86,13 +86,13 @@ the following directory concepts:

@@ -175,7 +175,7 @@ entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
  • When you add a person to the directory, a form that allows you to edit that person's data is displayed. This form is @@ -185,10 +185,10 @@ The required fields for a person are:
  • You can provide values for the optional fields now, or add them @@ -201,69 +201,69 @@ First + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#givenName">First Name  Phone + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone Email + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mail">Email Address  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#facsimileTelephoneNumber">Fax  User + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#uid">User ID Pager + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#pager">Pager Mobile + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mobile">Mobile Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Title + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#title">Title Organizational + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#ou">Organizational Unit  Manager  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#manager">Manager  Room + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#roomNumber">Room Number  Admin  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#secretary">Admin  Dept#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#departmentNumber">Dept#  Emp#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#employeeNumber">Emp#  Car + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#carLicnese">Car License#  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also  URL  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#labeledUri">URL  Password  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userPassword">Password  @@ -279,10 +279,10 @@ the form. When you are done filling in the form, click the Save New Person button at the top of the form.
  • After saving the entry, you can add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addmanager">add values to the Manager and Admin fields or add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add a See Also value.
  • @@ -305,7 +305,7 @@ entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
  • When you add an NT-person to the directory, a form that allows you to @@ -315,13 +315,13 @@ The required fields for an NT-person are:
  • You can provide values for the optional fields now, or add them @@ -333,69 +333,69 @@ First + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#givenName">First Name  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Email + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mail">Email Address  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Directory + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userPassword">Directory Server Password  Pager  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#pager">Pager  Mobile + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mobile">Mobile Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Title  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#title">Title  Organizational + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#organizationalUnitName">Organizational Unit  Manager  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#manager">Manager  Room + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#roomNumber">Room Number  Admin  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#secretary">Admin  Dept#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#departmentNumber">Dept#  Emp#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#employeeNumber">Emp#  Car + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#carLicnese">Car License#  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also  URL  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#labeledURI">URL  User + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userid">User Id @@ -408,10 +408,10 @@
  • You can also change the value for the following two options:
  • The default value is shown. If you do not change the value, @@ -421,10 +421,10 @@ button at the top of the form. To cancel the entry creation, close the web browser window containing the form.
  • After saving the entry, you can add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addmanager">add values to the Manager and Admin fields or add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add a "See Also" value.
  • @@ -440,16 +440,16 @@ entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
  • When you add a group to the directory, a form that allows you to edit that group's data is displayed. This form is displayed in a new web browser window. You must supply a value for the required field Name.
  • + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#cn">Name.
  • You can provide a value for the optional Description + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description field now, or add it later.
  • Note:

    You cannot enter values into the Owner, Group Members, @@ -461,7 +461,7 @@
    To cancel the entry creation, close the web browser window containing the form.

  • After you have saved the entry, you can add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add values for the Owner, Group Member, and See Also fields.
  • @@ -477,7 +477,7 @@ entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
  • When you add an NT-group to the directory, a form that allows you to edit that group's data is displayed. This form is @@ -487,9 +487,9 @@ The required fields for an NT-group are:
  • You can provide values for the optional fields now, or add them @@ -501,16 +501,16 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Owner  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#owner">Owner  NT + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#uniqueMember">NT Group Members  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also @@ -522,7 +522,7 @@ or See Also fields until you have saved the entry.

  • You may also change the value for the Delete + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#NTGroupDelete">Delete NT Group if Group Deleted option.
  • When you are done filling in the form, click the Save New Group button @@ -530,7 +530,7 @@
    To cancel the entry creation, close the web browser window containing the form.
  • After you save the entry, you can add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add values for the NT Group Members, Owner, and See Also fields.
  • @@ -547,13 +547,13 @@ entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
  • When you add an organizational unit to the directory, a form that allows you to edit that organization's data is displayed. This form is displayed in a new web browser window. You must supply a value for the required field, Unit + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#ou">Unit Name.
  • You can provide values for the optional fields now, or add them later. @@ -564,25 +564,25 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Location  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#localityName">Location  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also      @@ -608,10 +608,10 @@ entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
  • You must supply a value for the required field, dc.
  • + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#dc">dc.
  • You can provide values for the optional fields now, or add them later. The optional fields for a domain are:
  • @@ -621,25 +621,25 @@ Description + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description Phone + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category Fax + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax Location + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#localityName">Location Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also     @@ -665,7 +665,7 @@ entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
  • Adding an organization is supported only when you initially populate @@ -684,7 +684,7 @@
    o=Example.com
    As a result, the Directory Server rejects the operation.
  • You must supply a value for the required field, Organization + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#organizationName">Organization Name.
  • You can provide values for the optional fields now, or add them later. @@ -695,25 +695,25 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Location  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#localityName">Location  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also      View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.3 -r 1.4 attribut.htm Index: attribut.htm =================================================================== RCS file: /cvs/dirsec/dsgw/html/manual/attribut.htm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- attribut.htm 6 Mar 2008 22:00:38 -0000 1.3 +++ attribut.htm 11 Jun 2008 22:03:52 -0000 1.4 @@ -60,7 +60,7 @@ used for, refer to the Directory Server Deployment Guide.

    For information on the object classes in the schema, see Appendix + href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1002619">Appendix A, "Object Classes."

      @@ -69,7 +69,7 @@ The following define the attributes used to describe an entry in the directory tree. To determine which attributes are required and allowed for each object class, see Appendix + href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1002619">Appendix A, "Object Classes."

    Each attribute has a corresponding syntax definition that describes the @@ -128,7 +128,7 @@

    Provides an abstract of a document entry.

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    accountUnlockTime

    @@ -143,9 +143,9 @@ OID: 2.16.840.1.113730.3.1.95

    Syntax: cis + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis operational

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1251525">operational

    aci

    @@ -159,7 +159,7 @@ OID: 2.16.840.1.113730.3.1.55

    Syntax: bin

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">bin

    This attribute is an extension to the standard LDAP schema.

    @@ -169,7 +169,7 @@

    Provides a URL to information about the person responsible for administering the server. This attribute is an extension used by the netscapeServer + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#">netscapeServer object class. Normally this attribute and this attribute value is written to the directory when a server is initially installed. For example:

    @@ -181,7 +181,7 @@ OID: 2.16.840.1.113730.3.1.74

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    adminUrl

    @@ -189,7 +189,7 @@ Provides the URL to the administration server through which you can manage the server. This attribute is an extension used by the netscapeServer + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#">netscapeServer object class. Normally this attribute and this attribute value is written to the directory when a server is initially installed. For example:

    @@ -201,7 +201,7 @@ OID: 2.16.840.1.113730.3.1.75

    Syntax: ces

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004701">ces

    aliasedObjectName

    @@ -217,7 +217,7 @@ OID: 2.5.4.1

    Syntax: dn

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1100403">dn

    altServer

    @@ -227,7 +227,7 @@ OID: 1.3.6.1.4.1.1466.101.120.6

    Syntax: ces

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004701">ces

    associatedDomain

    @@ -245,7 +245,7 @@ OID: 0.9.2342.19200300.100.1.37

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    associatedName

    @@ -260,7 +260,7 @@ OID: 0.9.2342.19200300.100.1.38

    Syntax: dn

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1100403">dn

    attributeTypes

    @@ -271,9 +271,9 @@ OID: 2.5.21.5

    Syntax: cis + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis operational

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1251525">operational

    audio

    @@ -288,7 +288,7 @@ OID: 0.9.2342.19200300.100.1.55

    Syntax: + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">Syntax: bin

    authorCn @@ -302,7 +302,7 @@ Syntax: cis + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    authorSn

    @@ -314,7 +314,7 @@ Syntax: cis + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    authorityRevocationList

    @@ -322,7 +322,7 @@ Not recommended; use authorityRevocationList;binary instead.

    Syntax: + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">Syntax: bin

    authorityRevocationList;binary @@ -338,7 +338,7 @@ OID: 2.5.4.38

    Syntax: + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">Syntax: bin

    buildingName @@ -353,7 +353,7 @@ OID: 0.9.2342.19200300.100.1.48

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    businessCategory

    @@ -371,7 +371,7 @@ OID: 2.5.4.15

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    [...3080 lines suppressed...] supportedExtension

    @@ -5622,7 +5622,7 @@ OID: 1.3.6.1.4.1.1466.101.120.7

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    supportedLDAPVersion

    @@ -5632,7 +5632,7 @@ OID: 1.3.6.1.4.1.1466.101.120.15

    Syntax: int

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1243260">int

    supportedSASLMechanisms

    @@ -5642,7 +5642,7 @@ OID: 1.3.6.1.4.1.1466.101.120.14

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    targetDn

    @@ -5659,7 +5659,7 @@ OID: 2.16.840.1.113730.3.1.6

    Syntax: dn

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1100403">dn

    telephoneNumber

    @@ -5673,7 +5673,7 @@ OID: 2.5.4.20

    Syntax: tel

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004703">tel

    teletexTerminalIdentifier

    @@ -5692,7 +5692,7 @@

    OID: 2.5.4.22

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    telexNumber

    @@ -5712,7 +5712,7 @@

    OID: 2.5.4.21

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    textEncodedORAddress

    @@ -5727,7 +5727,7 @@ OID: 0.9.2342.19200300.100.1.2

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    title

    @@ -5741,7 +5741,7 @@ OID: 2.5.4.12

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    ttl

    @@ -5767,7 +5767,7 @@

    OID: 1.3.6.1.4.1.250.1.60

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    uid

    @@ -5790,7 +5790,7 @@

    OID: 0.9.2342.19200300.100.1.1

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    uniqueIdentifier

    @@ -5807,7 +5807,7 @@ OID: 0.9.2342.19200300.100.1.44

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    uniqueMember

    @@ -5819,7 +5819,7 @@ OID: 2.5.4.50

    Syntax: dn

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1100403">dn

    updatedByDocument

    @@ -5828,7 +5828,7 @@ version of the document entry.

    Syntax: dn

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1100403">dn

    updatesDocument

    @@ -5837,7 +5837,7 @@ is an updated version.

    Syntax: dn

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1100403">dn

    userCertificate

    @@ -5846,7 +5846,7 @@ recommended; use userCertificate;binary instead.

    Syntax: bin

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">bin

    userCertificate;binary

    @@ -5860,7 +5860,7 @@ OID: 2.5.4.36

    Syntax: bin

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">bin

    userClass

    @@ -5877,7 +5877,7 @@ OID: 0.9.2342.19200300.100.1.8

    Syntax: cis

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004702">cis

    userPassword

    @@ -5899,7 +5899,7 @@ OID: 2.5.4.35

    Syntax: bin

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">bin

    userSMIMECertificate;binary

    @@ -5913,7 +5913,7 @@ OID: 2.16.840.1.113730.3.1.40

    Syntax: bin

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">bin

    x121Address

    @@ -5923,7 +5923,7 @@ OID: 2.5.4.24

    Syntax: ces

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004701">ces

    x500UniqueIdentifier

    @@ -5937,7 +5937,7 @@ OID: 2.5.4.45

    Syntax: bin

    + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1004700">bin

    Index: mod.htm =================================================================== RCS file: /cvs/dirsec/dsgw/html/manual/mod.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mod.htm 6 Mar 2008 22:00:38 -0000 1.2 +++ mod.htm 11 Jun 2008 22:03:52 -0000 1.3 @@ -45,12 +45,12 @@ You can modify existing entries in the directory using the Directory Server interface. Modify an entry by searching + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm">searching for the entry, viewing + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">viewing it, and then clicking the edit button.

    If you have not authenticated + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticated before you attempt to edit an entry, or if your authentication has expired, the @@ -60,21 +60,21 @@

    @@ -82,20 +82,20 @@ To edit a person's entry, do the following:
    1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
    2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
    3. Click the Edit Person button.
    4. If you have not authenticated before you attempt to edit an entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
    5. To edit the person's entry, type the value you desire for each field. You must supply values for the required fields. The required @@ -103,10 +103,10 @@ for a person are:
    6. You can provide values for the optional fields now, or edit them @@ -118,80 +118,80 @@ First + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#givenName">First Name  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Email + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mail">Email Address  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  User + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userid">User ID  Pager  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#pager">Pager  Mobile + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mobile">Mobile Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Title  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#title">Title  Organizational + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#organizationalUnitName">Organizational Unit  Manager  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#manager">Manager  Room + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#roomNumber">Room Number  Admin  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#secretary">Admin  Dept#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#departmentNumber">Dept#  Emp#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#employeeNumber">Emp#  Car + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#carLicnese">Car License#  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also  URL  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#labeledURI">URL  Password  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userPassword">Password 

    7. You may add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addmanager">add values to the Manager and Admin fields by clicking the corresponding Edit button.
    8. You may add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add values to the See Also field by clicking the corresponding Edit button.
    9. When you are done editing the fields, click Save Changes.
    10. @@ -199,13 +199,13 @@ From this window you can also:

      Adding Values to the Manager and Admin @@ -245,7 +245,7 @@ residing in your directory.
    11. Any LDAP + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#filter">LDAP search filter. Any string that contains an equal sign (=) is considered to be a search filter.
    12. @@ -265,20 +265,20 @@ To edit an NT person's entry, do the following:
      1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
      2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
      3. Click the Edit NT Person button.
      4. If you have not authenticated before you attempt to edit an entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
      5. To edit the person's entry, type in the new value for each field. You must supply values for the required fields. The required @@ -286,13 +286,13 @@ for an NT person are:
      6. You can provide values for the optional fields now, or add them @@ -304,69 +304,69 @@ First + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#givenName">First Name  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Email + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mail">Email Address  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Directory + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userPassword">Directory Server Password  Pager  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#pager">Pager  Mobile + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#mobile">Mobile Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Title  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#title">Title  Organizational + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#organizationalUnitName">Organizational Unit  Manager  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#manager">Manager  Room + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#roomNumber">Room Number  Admin  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#secretary">Admin  Dept#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#departmentNumber">Dept#  Emp#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#employeeNumber">Emp#  Car + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#carLicnese">Car License#  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also  URL  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#labeledURI">URL  User + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userid">User Id  @@ -374,14 +374,14 @@

      7. You can also change the value for the Delete + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#ntUserDeleteAccount">Delete NT Account if Person deleted option.
      8. To add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addmanager">add values to the Manager and Admin fields, click the corresponding Edit button.
      9. To add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add values to the See Also field, click the corresponding Edit button.
      10. When you are done editing the fields, click Save Changes.
      11. @@ -389,37 +389,37 @@ From this window you can also:

        Editing Groups

        To edit a group entry, do the following:
        1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
        2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
        3. Click the Edit Group button.
        4. If you have not authenticated before you attempt to edit an entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
        5. To edit the group's entry, type the new value for each field. You must supply values for the required field, Name. + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#name">Name.
        6. You can provide values for the optional fields now, or edit them later. @@ -430,16 +430,16 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Owner  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#owner">Owner  Group + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#member">Group Members  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also @@ -447,7 +447,7 @@

        7. To add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add values to the See Also, Owners, and Group Members fields click the corresponding Edit button.
        8. When you are done editing the fields, click Save Changes.
        9. @@ -455,10 +455,10 @@ From this window you can also:

          Adding Values to the Owner, See Also, and @@ -508,7 +508,7 @@ residing in your directory.
        10. Any LDAP + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#filter">LDAP search filter. Any string that contains an equal sign (=) is considered to be a search filter.
        11. @@ -528,20 +528,20 @@ To edit an NT group entry, do the following:
          1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
          2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
          3. Click the Edit NT Group button.
          4. If you have not authenticated before you attempt to edit an entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
          5. To edit the group's entry, type in the value for each field. You must supply values for the required fields. The required @@ -549,9 +549,9 @@ for an NT group are:
          6. You can provide values for the optional fields now, or add them @@ -563,26 +563,26 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Owner  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#owner">Owner  Group + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#uniqueMember">Group Members  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also  
          7. You can also change the value for the Delete + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#ntGroupDeleteGroup">Delete NT Group if Group Deleted option.
          8. You can add + href="/clients/dsgw/bin/lang?&file=.MANUAL/mod.htm#addowner">add values to the See Also, Owners, and Group Members fields by clicking the corresponding "Edit" button.
          9. When you are done editing, click Save Changes.
          10. @@ -590,10 +590,10 @@ From this window you can also:

            @@ -601,26 +601,26 @@ To edit an organizational unit, do the following:
            1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
            2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
            3. Click the Edit Organizational Unit button.
            4. If you have not authenticated before you attempt to edit an entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
            5. To edit the organizational unit's entry, type in the value for each field. You must supply values for the required fields.
            6. The required field for an organizational unit is Unit + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#organizationalUnitName">Unit Name.
            7. You can provide values for the optional fields now, or add them later. @@ -631,25 +631,25 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Location  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#localityName">Location  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also      @@ -663,10 +663,10 @@ From this window you can also:

              @@ -674,26 +674,26 @@ To edit a domain, do the following:
              1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
              2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
              3. Click the Edit Domaincomponent button.
              4. If you have not authenticated before you attempt to edit an entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
              5. To edit the domain's entry, type in the value for each field. You must supply values for the required fields.
              6. The required field for a domain is Domaincomponent + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#name">Domaincomponent Name.
              7. You can provide values for the optional fields now, or add them later. @@ -704,25 +704,25 @@ Description + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description Phone + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category Fax + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax Location + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#localityName">Location Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also     @@ -736,10 +736,10 @@ From this window you can also:

                @@ -747,26 +747,26 @@ To edit an organization entry, do the following:
                1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
                2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
                3. Click the Edit Organization button.
                4. If you have not authenticated before you attempt to edit an entry, or if your authentication has expired, the Directory Server prompts you to authenticate + href="/clients/dsgw/bin/lang?&file=.MANUAL/auth.htm#userauth">authenticate before continuing.
                5. To edit the organizational unit's entry, type in the value for each field. You must supply values for the required fields.
                6. The required fields for an organization is Organization + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#organizationName">Organization Name.
                7. You may provide values for the optional fields now, or edit them later. @@ -777,25 +777,25 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Business + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#businessCategory">Business Category  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Location  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#l">Location  Mailing + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#postalAddress">Mailing Address  See + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#seeAlso">See Also      @@ -809,13 +809,13 @@ To rename an entry, do the following:
                  1. Search for the entry using the Standard + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#standard">Standard Search or Advanced + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#advanced">Advanced Search mechanism.
                  2. View + href="/clients/dsgw/bin/lang?&file=.MANUAL/search.htm#results">View the entry.
                  3. Click the Edit button.
                  4. Enter the new common name for the entry.
                  5. @@ -824,7 +824,7 @@ Note the following rules about renaming an entry: @@ -164,11 +164,11 @@ reference is made to the group. Each object class contains attributes that describe the group and its members. The object classes described here are groupOfNames, + href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1080708">groupOfNames, groupOfUniqueNames, + href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1005294">groupOfUniqueNames, and NTGroup. + href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1100399">NTGroup.

                     

                    groupOfNames

                    @@ -192,7 +192,7 @@ cn + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171494">cn

                    (Required) The group's common name. @@ -201,7 +201,7 @@ member + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171811">member

                    (Required) A group member in distinguished @@ -211,7 +211,7 @@ businessCategory + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171367">businessCategory

                    Type of business in which the group is @@ -221,7 +221,7 @@ description + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171528">description

                    Text description of the group's purpose. @@ -230,7 +230,7 @@ memberURL + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1246271">memberURL

                    URL to information relevant to a group @@ -240,7 +240,7 @@ o + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1281611">o

                    Organization to which the group belongs. @@ -249,7 +249,7 @@ ou + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1241174">ou

                    Organizational unit to which the group @@ -259,7 +259,7 @@ owner + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1005719">owner

                    The group's owner. @@ -268,7 +268,7 @@ seeAlso + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1172500">seeAlso

                    [...5906 lines suppressed...] Preferred method of contact or delivery of @@ -8583,7 +8583,7 @@ registeredAddress + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1202644">registeredAddress

                    Postal address suitable for reception of @@ -8594,7 +8594,7 @@ searchGuide + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1202682">searchGuide

                    Specifies information for suggested search @@ -8605,7 +8605,7 @@ seeAlso + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1172500">seeAlso

                    URL to information relevant to the entry. @@ -8614,7 +8614,7 @@ st + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1203417">st

                    State or province in which the entry @@ -8624,7 +8624,7 @@ street + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1202721">street

                    Street address at which the entry is @@ -8634,7 +8634,7 @@ telephoneNumber + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1230129">telephoneNumber

                    Telephone number associated with the entry. @@ -8643,7 +8643,7 @@ teletexTerminalIdentifier + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1205004">teletexTerminalIdentifier

                    Identifier for the teletex terminal of the @@ -8653,7 +8653,7 @@ telexNumber + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1205120">telexNumber

                    Telex number of the entry. @@ -8662,7 +8662,7 @@ userPassword + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1196547">userPassword

                    The entry's password and encryption method. @@ -8671,7 +8671,7 @@ x121Address + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1281763">x121Address

                    X.121 address of the entry. @@ -8713,7 +8713,7 @@ cn + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171494">cn

                    Common, or given name of the entry. @@ -8722,7 +8722,7 @@ sn + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1290325">sn

                    Surname of the entry. @@ -8763,7 +8763,7 @@ cn + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171494">cn

                    (Required) Common name of the room. @@ -8772,7 +8772,7 @@ description + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171528">description

                    Text description of the room. @@ -8781,7 +8781,7 @@ roomNumber + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1204477">roomNumber

                    The room's number. @@ -8790,7 +8790,7 @@ seeAlso + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1172500">seeAlso

                    URL to information relevant to the room. @@ -8799,7 +8799,7 @@ telephoneNumber + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1230129">telephoneNumber

                    The room's telephone number. @@ -8841,7 +8841,7 @@ userPassword + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1196547">userPassword

                    (Required) The entry's password and @@ -8884,7 +8884,7 @@ userCertificate + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1208938">userCertificate

                    Not used. @@ -8893,7 +8893,7 @@ userCertificate;binary + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1278425">userCertificate;binary

                    (Required) User's certificate in binary @@ -8935,7 +8935,7 @@ objectClass + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1229677">objectClass

                    (Required) Mandatory attribute for all @@ -8945,7 +8945,7 @@ aci + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#1171292">aci

                    Stores the Directory Server access control From fedora-directory-commits at redhat.com Wed Jun 11 22:42:58 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 11 Jun 2008 18:42:58 -0400 Subject: [Fedora-directory-commits] dsgw/html/manual add.htm, 1.3, 1.4 attribut.htm, 1.4, 1.5 mod.htm, 1.3, 1.4 objclass.htm, 1.4, 1.5 search.htm, 1.2, 1.3 Message-ID: <200806112242.m5BMgwtM029842@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/html/manual In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29819/dsgw/html/manual Modified Files: add.htm attribut.htm mod.htm objclass.htm search.htm Log Message: Resolves: bug 450898 Bug Description: Incorrect hyperlink in the dsgw help page Fix Description: Many of the links were incorrect. In addition, there were many places where the HTML entity Acirc was used - these have been removed. Platforms tested: RHEL5 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: add.htm =================================================================== RCS file: /cvs/dirsec/dsgw/html/manual/add.htm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- add.htm 11 Jun 2008 22:03:52 -0000 1.3 +++ add.htm 11 Jun 2008 22:42:54 -0000 1.4 @@ -124,11 +124,11 @@ before creating entries within the subtrees:

                    -
                              o=Example.com
                              ou=Marketing, o=Example.com
                              ...
                              Marketing subtree entries -          ... -          ou=Accounting, o=Example.com -          ... -          Accounting subtree entries +
                              o=Example.com
                              ou=Marketing, o=Example.com
                              ...
                              Marketing subtree entries +          ... +          ou=Accounting, o=Example.com +          ... +          Accounting subtree entries

                    Distinguished Name Syntax

                    @@ -188,13 +188,13 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#cn">Full Name
                  6. Last + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#sn">Last Name
                  7. You can provide values for the optional fields now, or add them later. The optional fields for a person are:
                  8. -  + 

                    @@ -202,16 +202,16 @@ +Name  +Address  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#facsimileTelephoneNumber">Fax  @@ -221,49 +221,49 @@ +Phone  +Category  +Unit  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#manager">Manager  +Number  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#secretary">Admin  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#departmentNumber">Dept#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#employeeNumber">Emp#  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#carLicense">Car +License#  +Address  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  +Also  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#labeledUri">URL  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#userPassword">Password 
                    First -Name  Phone Email -Address 
                    Fax  User ID
                    Mobile -Phone  Business -Category  Title
                    Organizational -Unit  Manager  Room -Number 
                    Admin  Dept#  Emp# 
                    Car -License#  Mailing -Address  Description 
                    See -Also  URL  Password 
                    @@ -315,10 +315,10 @@ The required fields for an NT-person are:
                    - 
                  9. You can also change the value for the You can also change the value for the Delete NT Group if Group Deleted option.
                  10. You can Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Business -Category  +Category  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Location  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#l">Location  Mailing -Address  +Address  See -Also  -   -   +Also  +   +   @@ -715,7 +715,7 @@ Fax Location + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#l">Location Mailing Address @@ -777,33 +777,33 @@ Description  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#description">Description  Phone  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#telephoneNumber">Phone  Business -Category  +Category  Fax  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#fax">Fax  Location  + href="/clients/dsgw/bin/lang?&file=.MANUAL/attribut.htm#l">Location  Mailing -Address  +Address  See -Also  -   -   +Also  +   +   - 
                  11. When you are done editing, click Save Changes.
                  12. When you are done editing, click Save Changes.

                  Renaming Entries

                  To rename an entry, do the following: Index: objclass.htm =================================================================== RCS file: /cvs/dirsec/dsgw/html/manual/objclass.htm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- objclass.htm 11 Jun 2008 22:03:52 -0000 1.4 +++ objclass.htm 11 Jun 2008 22:42:54 -0000 1.5 @@ -152,7 +152,7 @@ 2.16.840.1.113730.3.2 -  + 

                  Groups

                  @@ -169,7 +169,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1005294">groupOfUniqueNames, and NTGroup. -

                    +

                   

                  groupOfNames

                  @@ -286,7 +286,7 @@

                  -

                    +

                   

                  groupOfUniqueNames

                  @@ -393,7 +393,7 @@

                  -

                    +

                   

                  NTGroup

                  @@ -499,7 +499,7 @@

                  -

                    +

                   

                  Replication

                  @@ -512,7 +512,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1005781">LDAPServer, and LDAPReplica. -

                    +

                   

                  cirReplicaSource

                  @@ -709,7 +709,7 @@

                  -

                    +

                   

                  glue

                  @@ -719,7 +719,7 @@ Guide. Reserved. This object class is an extension to the standard LDAP schema.

                  OID: 2.16.840.1.113730.3.2.30

                  -

                    +

                   

                  LDAPServer

                  @@ -825,7 +825,7 @@

                  -

                    +

                   

                  LDAPReplica

                  @@ -1049,7 +1049,7 @@

                  -

                    +

                   

                  Locations

                  @@ -1060,7 +1060,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1005812">country and locality. -

                    +

                   

                  country

                  @@ -1120,7 +1120,7 @@

                  -

                    +

                   

                  locality

                  @@ -1208,7 +1208,7 @@

                  -

                    +

                   

                  Organizations

                  @@ -1219,7 +1219,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1004980">organization and organizationalUnit. -

                    +

                   

                  organization

                  @@ -1435,7 +1435,7 @@

                  -

                    +

                   

                  organizationalUnit

                  @@ -1687,7 +1687,7 @@

                  -

                    +

                   

                  People

                  @@ -1710,7 +1710,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1089681">person, and residentialPerson. -

                    +

                   

                  inetOrgPerson

                  @@ -1978,7 +1978,7 @@

                  -

                    +

                   

                  newPilotPerson

                  @@ -2189,7 +2189,7 @@

                  -

                    +

                   

                  nsLicenseUser

                  @@ -2251,7 +2251,7 @@

                  -

                    +

                   

                  ntUser

                  @@ -2659,7 +2659,7 @@

                  -

                    +

                   

                  organizationalPerson

                  @@ -2856,7 +2856,7 @@

                  -

                    +

                   

                  organizationalRole

                  @@ -3095,7 +3095,7 @@

                  -

                    +

                   

                  person

                  @@ -3184,7 +3184,7 @@

                  -

                    +

                   

                  residentialPerson

                  @@ -3371,7 +3371,7 @@

                  -

                    +

                   

                  Calendar Server Extensions

                  @@ -3384,7 +3384,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1084445">nsCalResource, and nsCalUser. -

                    +

                   

                  netscapeCalendarServer

                  @@ -3427,7 +3427,7 @@

                  -

                    +

                   

                  nsCalAdmin

                  @@ -3714,7 +3714,7 @@

                  -

                    +

                   

                  nsCalResource

                  @@ -4005,7 +4005,7 @@

                  -

                    +

                   

                  nsCalUser

                  @@ -4284,7 +4284,7 @@

                  -

                    +

                   

                  Certificate Server Extensions

                  @@ -4292,7 +4292,7 @@ This section describes the netscapeCertificateServer object class used by the Certificate Server. -

                    +

                   

                  netscapeCertificateServer

                  @@ -4333,7 +4333,7 @@

                  -

                    +

                   

                  News Server Extensions

                  @@ -4342,7 +4342,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1078579">netscapeNewsServer and nginfo. -

                    +

                   

                  netscapeNewsServer

                  @@ -4383,7 +4383,7 @@

                  -

                    +

                   

                  nginfo

                  @@ -4513,7 +4513,7 @@

                  -

                    +

                   

                  Compass Server Extensions

                  @@ -4526,7 +4526,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1080358">PIPUser, and PIPUserInfo. -

                    +

                   

                  netscapeCompassServer

                  @@ -4567,7 +4567,7 @@

                  -

                    +

                   

                  personalInterestProfile

                  @@ -5140,7 +5140,7 @@

                  -

                    +

                   

                  PIPUser

                  @@ -5280,7 +5280,7 @@

                  -

                    +

                   

                  PIPUserInfo

                  @@ -5376,7 +5376,7 @@

                  -

                    +

                   

                  Directory Server Extensions

                  @@ -5405,7 +5405,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1097669">referral, and subschema. -

                    +

                   

                  changeLogEntry

                  @@ -5528,7 +5528,7 @@

                  -

                    +

                   

                  groupOfCertificates

                  @@ -5638,7 +5638,7 @@

                  -

                    +

                   

                  netscapeDirectoryServer

                  @@ -5679,7 +5679,7 @@

                  -

                    +

                   

                  netscapeMachineData

                  @@ -5688,7 +5688,7 @@ filtered out during replication. This object class is an extension to the standard LDAP schema. Reserved.

                  OID: 2.16.840.1.113730.3.2.32

                  -

                    +

                   

                  netscapeServer

                  @@ -5813,7 +5813,7 @@

                  -

                    +

                   

                  passwordObject

                  @@ -5911,7 +5911,7 @@

                  -

                    +

                   

                  passwordPolicy

                  @@ -6088,7 +6088,7 @@

                  -

                    +

                   

                  referral

                  @@ -6130,7 +6130,7 @@

                  -

                    +

                   

                  subschema

                  @@ -6230,14 +6230,14 @@

                  -

                    +

                   

                  Media Server Extensions

                  This section describes the netscapeMediaServer object class used by the Media Server. -

                    +

                   

                  netscapeMediaServer

                  @@ -6278,7 +6278,7 @@

                  -

                    +

                   

                  Messaging Server Extensions

                  @@ -6291,7 +6291,7 @@ href="/clients/dsgw/bin/lang?&file=.MANUAL/objclass.htm#1078007">mailGroup,and netscapeMailServer. -

                    +

                   

                  groupOfMailEnhancedUniqueNames

                  @@ -6406,7 +6406,7 @@

                  -

                    +

                   

                  mailRecipient

                  @@ -6584,7 +6584,7 @@

                  -

                    +

                   

                  mailGroup

                  @@ -6768,7 +6768,7 @@

                  -

                    +

                   

                  netscapeMailServer

                  @@ -6809,14 +6809,14 @@

                  -

                    +

                   

                  Proxy Server Extensions

                  This section describes the netscapeProxyServer object class used by the Proxy Server. -

                    +

                   

                  netscapeProxyServer

                  @@ -6857,14 +6857,14 @@

                  -

                    +

                   

                  Web Server Extensions

                  This section describes the netscapeWebServer object class used by Web servers. -

                    +

                   

                  netscapeWebServer

                  @@ -6905,13 +6905,13 @@

                  -

                    +

                   

                  Reserved Object Classes

                  This section describes object classes that are not defined for this release or are reserved for future use by the Directory Server. -

                    +

                   

                  account

                  @@ -7006,7 +7006,7 @@

                  -

                    +

                   

                  alias

                  @@ -7048,7 +7048,7 @@

                  -

                    +

                   

                  applicationEntity

                  @@ -7153,7 +7153,7 @@

                  -

                    +

                   

                  applicationProcess

                  @@ -7231,7 +7231,7 @@

                  -

                    +

                   

                  cacheObject

                  @@ -7274,7 +7274,7 @@

                  -

                    +

                   

                  certificationAuthority

                  @@ -7346,7 +7346,7 @@

                  -

                    +

                   

                  dcObject

                  @@ -7398,7 +7398,7 @@

                  -

                    +

                   

                  device

                  @@ -7504,7 +7504,7 @@

                  -

                    +

                   

                  DNSDomain

                  @@ -7544,7 +7544,7 @@

                  -

                    +

                   

                  document

                  @@ -7781,7 +7781,7 @@

                  -

                    +

                   

                  documentSeries

                  @@ -7876,7 +7876,7 @@

                  -

                    +

                   

                  domain

                  @@ -8145,7 +8145,7 @@

                  -

                    +

                   

                  domainRelatedObject

                  @@ -8187,7 +8187,7 @@

                  -

                    +

                   

                  dSA

                  @@ -8227,7 +8227,7 @@

                  -

                    +

                   

                  friendlyCountry

                  @@ -8268,7 +8268,7 @@

                  -

                    +

                   

                  labeledURIObject

                  @@ -8311,7 +8311,7 @@

                  -

                    +

                   

                  pilotObject

                  @@ -8427,7 +8427,7 @@

                  -

                    +

                   

                  pilotOrganization

                  @@ -8689,7 +8689,7 @@

                  -

                    +

                   

                  RFC822LocalPart

                  @@ -8740,7 +8740,7 @@

                  -

                    +

                   

                  room

                  @@ -8817,7 +8817,7 @@

                  -

                    +

                   

                  simpleSecurityObject

                  @@ -8860,7 +8860,7 @@

                  -

                    +

                   

                  strongAuthenticationUser

                  @@ -8912,7 +8912,7 @@

                  -

                    +

                   

                  top

                  Index: search.htm =================================================================== RCS file: /cvs/dirsec/dsgw/html/manual/search.htm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- search.htm 6 Mar 2008 22:00:38 -0000 1.2 +++ search.htm 11 Jun 2008 22:42:54 -0000 1.3 @@ -395,7 +395,7 @@ People full name, - last name, last name, phone number, email address, user ID, or Author: rmeggins Update of /cvs/dirsec/dsgw In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13576/dsgw Modified Files: doauth.c newentry.c Log Message: Resolves: bug 450971 Bug Description: Continue after auth for new entry does not work Reviewed by: nkinder (Thanks!) Fix Description: I had previously changed the way authdesturl worked. I wanted to disallow the user to pass in a full URL with host and port because that could lead to XSS attacks. So I introduced authdestdn which just contained the DN of the entry to edit. However, in doing that, I broke new entry creation, because that needs to know what type of entry to create - it cannot guess from the DN or existing entry. Since authdesturl already has that info, I just make sure I strip off everything before the '?' so as to avoid those types of problems. I also changed the URL by default to not have the http:, host, port, etc. - just the name of the command followed by the arguments. Platforms tested: RHEL5 Flag Day: no Doc impact: no Index: doauth.c =================================================================== RCS file: /cvs/dirsec/dsgw/doauth.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- doauth.c 6 Mar 2008 22:00:09 -0000 1.5 +++ doauth.c 12 Jun 2008 14:01:33 -0000 1.6 @@ -197,10 +197,22 @@ " memberof_postop_start\n" ); - memberof_group_filter = memberof_string2filter(MEMBEROF_GROUP_FILTER); - memberof_operation_lock = slapi_new_mutex(); - - if(0 == memberof_group_filter || 0 == memberof_operation_lock) + if(0 == memberof_operation_lock) { rc = -1; goto bail; } + if ( slapi_pblock_get( pb, SLAPI_ADD_ENTRY, &config_e ) != 0 ) { + slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM, + "missing config entry\n" ); + rc = -1; + goto bail; + } + + if (( rc = memberof_config( config_e )) != LDAP_SUCCESS ) { + slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM, + "configuration failed (%s)\n", ldap_err2string( rc )); + return( -1 ); + } + rc = slapi_task_register_handler("memberof task", memberof_task_add); if(rc) { @@ -292,6 +312,7 @@ int memberof_postop_del(Slapi_PBlock *pb) { int ret = 0; + MemberOfConfig configCopy = {0, 0, 0, 0}; char *dn; slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM, @@ -302,22 +323,31 @@ struct slapi_entry *e = NULL; slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &e ); - - memberof_lock(); + /* We need to get the config lock first. Trying to get the + * config lock after we already hold the op lock can cause + * a deadlock. */ + memberof_rlock_config(); + /* copy config so it doesn't change out from under us */ + memberof_copy_config(&configCopy, memberof_get_config()); + memberof_unlock_config(); + + /* get the memberOf operation lock */ + memberof_lock(); + /* remove this group DN from the * membership lists of groups */ - memberof_del_dn_from_groups(pb, dn); + memberof_del_dn_from_groups(pb, &configCopy, dn); /* is the entry of interest as a group? */ - if(e && !slapi_filter_test_simple(e, memberof_group_filter)) + if(e && !slapi_filter_test_simple(e, configCopy.group_filter)) { Slapi_Attr *attr = 0; - if(0 == slapi_entry_attr_find(e, MEMBEROF_GROUP_ATTR, &attr)) + if(0 == slapi_entry_attr_find(e, configCopy.groupattr, &attr)) { - memberof_del_attr_list(pb, dn, attr); + memberof_del_attr_list(pb, &configCopy, dn, attr); } } @@ -335,12 +365,12 @@ char *type; } del_dn_data; -int memberof_del_dn_from_groups(Slapi_PBlock *pb, char *dn) +int memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn) { - del_dn_data data = {dn, MEMBEROF_GROUP_ATTR}; + del_dn_data data = {dn, config->groupattr}; return memberof_call_foreach_dn(pb, dn, - MEMBEROF_GROUP_ATTR, memberof_del_dn_type_callback, &data); + config->groupattr, memberof_del_dn_type_callback, &data); } int memberof_del_dn_type_callback(Slapi_Entry *e, void *callback_data) @@ -408,12 +438,7 @@ if(base_sdn) { - int filter_size = - (strlen(type) + - strlen(dn) + 4); /* 4 for (=) + null */ - filter_str = (char*)slapi_ch_malloc(filter_size); - - sprintf(filter_str, "(%s=%s)", type, dn); + filter_str = slapi_ch_smprintf("(%s=%s)", type, dn); } if(filter_str) @@ -451,10 +476,13 @@ if(memberof_oktodo(pb)) { + MemberOfConfig *mainConfig = 0; + MemberOfConfig configCopy = {0, 0, 0, 0}; struct slapi_entry *pre_e = NULL; struct slapi_entry *post_e = NULL; char *pre_dn = 0; char *post_dn = 0; + int interested = 0; slapi_pblock_get( pb, SLAPI_ENTRY_PRE_OP, &pre_e ); slapi_pblock_get( pb, SLAPI_ENTRY_POST_OP, &post_e ); @@ -466,8 +494,18 @@ } /* is the entry of interest? */ - if(pre_dn && post_dn && - !slapi_filter_test_simple(post_e, memberof_group_filter)) + memberof_rlock_config(); + mainConfig = memberof_get_config(); + if(pre_dn && post_dn && + !slapi_filter_test_simple(post_e, mainConfig->group_filter)) + { + interested = 1; + /* copy config so it doesn't change out from under us */ + memberof_copy_config(&configCopy, mainConfig); + } + memberof_unlock_config(); + + if(interested) { Slapi_Attr *attr = 0; @@ -475,15 +513,15 @@ /* get a list of member attributes present in the group * entry that is being renamed. */ - if(0 == slapi_entry_attr_find(post_e, MEMBEROF_GROUP_ATTR, &attr)) + if(0 == slapi_entry_attr_find(post_e, configCopy.groupattr, &attr)) { - memberof_moddn_attr_list(pb, pre_dn, post_dn, attr); + memberof_moddn_attr_list(pb, &configCopy, pre_dn, post_dn, attr); } /* modrdn must change the dns in groups that have * this group as a member. */ - memberof_replace_dn_from_groups(pb, pre_dn, post_dn); + memberof_replace_dn_from_groups(pb, &configCopy, pre_dn, post_dn); memberof_unlock(); } @@ -492,8 +530,7 @@ slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM, "<-- memberof_postop_modrdn\n" ); - return ret;slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM, - "--> memberof_postop_modify\n" ); + return ret; } typedef struct _replace_dn_data @@ -503,11 +540,12 @@ char *type; } replace_dn_data; -int memberof_replace_dn_from_groups(Slapi_PBlock *pb, char *pre_dn, char *post_dn) +int memberof_replace_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, + char *pre_dn, char *post_dn) { - replace_dn_data data = {pre_dn, post_dn, MEMBEROF_GROUP_ATTR}; + replace_dn_data data = {pre_dn, post_dn, config->groupattr}; - return memberof_call_foreach_dn(pb, pre_dn, MEMBEROF_GROUP_ATTR, + return memberof_call_foreach_dn(pb, pre_dn, config->groupattr, memberof_replace_dn_type_callback, &data); } @@ -588,6 +626,10 @@ if(memberof_oktodo(pb) && (dn = memberof_getdn(pb))) { + int config_copied = 0; + MemberOfConfig *mainConfig = 0; + MemberOfConfig configCopy = {0, 0, 0, 0}; + /* get the mod set */ slapi_pblock_get(pb, SLAPI_MODIFY_MODS, &mods); smods = slapi_mods_new(); @@ -597,10 +639,36 @@ smod = slapi_mods_get_first_smod(smods, next_mod); while(smod) { + int interested = 0; char *type = (char *)slapi_mod_get_type(smod); - /* we only care about the group attribute */ - if(slapi_attr_types_equivalent(type,MEMBEROF_GROUP_ATTR)) + /* We only want to copy the config if we encounter an + * operation that we need to act on. We also want to + * only copy the config the first time it's needed so + * it remains the same for all mods in the operation, + * despite any config changes that may be made. */ + if (!config_copied) + { + memberof_rlock_config(); + mainConfig = memberof_get_config(); + + if(slapi_attr_types_equivalent(type, mainConfig->groupattr)) + { + interested = 1; + /* copy config so it doesn't change out from under us */ + memberof_copy_config(&configCopy, mainConfig); + config_copied = 1; + } + + memberof_unlock_config(); + } else { + if(slapi_attr_types_equivalent(type, configCopy.groupattr)) + { + interested = 1; + } + } + + if(interested) { int op = slapi_mod_get_operation(smod); @@ -612,7 +680,7 @@ case LDAP_MOD_ADD: { /* add group DN to targets */ - memberof_add_smod_list(pb, dn, smod); + memberof_add_smod_list(pb, &configCopy, dn, smod); break; } @@ -624,12 +692,12 @@ * entry, which the replace code deals with. */ if (slapi_mod_get_num_values(smod) == 0) { - memberof_replace_list(pb, dn); + memberof_replace_list(pb, &configCopy, dn); } else { /* remove group DN from target values in smod*/ - memberof_del_smod_list(pb, dn, smod); + memberof_del_smod_list(pb, &configCopy, dn, smod); } break; } @@ -637,7 +705,7 @@ case LDAP_MOD_REPLACE: { /* replace current values */ - memberof_replace_list(pb, dn); + memberof_replace_list(pb, &configCopy, dn); break; } @@ -677,6 +745,7 @@ int memberof_postop_add(Slapi_PBlock *pb) { int ret = 0; + int interested = 0; char *dn = 0; slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM, @@ -684,20 +753,33 @@ if(memberof_oktodo(pb) && (dn = memberof_getdn(pb))) { + MemberOfConfig *mainConfig = 0; + MemberOfConfig configCopy = {0, 0, 0, 0}; struct slapi_entry *e = NULL; slapi_pblock_get( pb, SLAPI_ENTRY_POST_OP, &e ); + /* is the entry of interest? */ - if(e && !slapi_filter_test_simple(e, memberof_group_filter)) + memberof_rlock_config(); + mainConfig = memberof_get_config(); + if(e && !slapi_filter_test_simple(e, mainConfig->group_filter)) + { + interested = 1; + /* copy config so it doesn't change out from under us */ + memberof_copy_config(&configCopy, mainConfig); + } + memberof_unlock_config(); + + if(interested) { Slapi_Attr *attr = 0; memberof_lock(); - if(0 == slapi_entry_attr_find(e, MEMBEROF_GROUP_ATTR, &attr)) + if(0 == slapi_entry_attr_find(e, configCopy.groupattr, &attr)) { - memberof_add_attr_list(pb, dn, attr); + memberof_add_attr_list(pb, &configCopy, dn, attr); } memberof_unlock(); @@ -774,9 +856,10 @@ * * Also, we must not delete entries that are a member of the group */ -int memberof_modop_one(Slapi_PBlock *pb, int mod_op, char *op_this, char *op_to) +int memberof_modop_one(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op, + char *op_this, char *op_to) { - return memberof_modop_one_r(pb, mod_op, op_this, op_this, op_to, 0); + return memberof_modop_one_r(pb, config, mod_op, op_this, op_this, op_to, 0); } /* memberof_modop_one_r() @@ -784,19 +867,20 @@ * recursive function to perform above (most things don't need the replace arg) */ -int memberof_modop_one_r(Slapi_PBlock *pb, int mod_op, char *group_dn, - char *op_this, char *op_to, memberofstringll *stack) +int memberof_modop_one_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod_op, + char *group_dn, char *op_this, char *op_to, memberofstringll *stack) { return memberof_modop_one_replace_r( - pb, mod_op, group_dn, op_this, 0, op_to, stack); + pb, config, mod_op, group_dn, op_this, 0, op_to, stack); } /* memberof_modop_one_replace_r() * * recursive function to perform above (with added replace arg) */ -int memberof_modop_one_replace_r(Slapi_PBlock *pb, int mod_op, char *group_dn, - char *op_this, char *replace_with, char *op_to, memberofstringll *stack) +int memberof_modop_one_replace_r(Slapi_PBlock *pb, MemberOfConfig *config, + int mod_op, char *group_dn, char *op_this, char *replace_with, + char *op_to, memberofstringll *stack) { int rc = 0; LDAPMod mod; @@ -805,7 +889,7 @@ char *val[2]; char *replace_val[2]; Slapi_PBlock *mod_pb = 0; - char *attrlist[2] = {MEMBEROF_GROUP_ATTR,0}; + char *attrlist[2] = {config->groupattr,0}; Slapi_DN *op_to_sdn = 0; Slapi_Entry *e = 0; memberofstringll *ll = 0; @@ -813,7 +897,6 @@ Slapi_Value *to_dn_val = slapi_value_new_string(op_to); Slapi_Value *this_dn_val = slapi_value_new_string(op_this); - /* determine if this is a group op or single entry */ op_to_sdn = slapi_sdn_new_dn_byref(op_to); slapi_search_internal_get_entry( op_to_sdn, attrlist, @@ -831,7 +914,7 @@ * membership given the delete operation that * triggered this operation */ - memberof_test_membership(pb, group_dn); + memberof_test_membership(pb, config, group_dn); } goto bail; @@ -855,10 +938,10 @@ } slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_modop_one_r: %s %s in %s\n" + "memberof_modop_one_replace_r: %s %s in %s\n" ,op_str, op_this, op_to); - if(!slapi_filter_test_simple(e, memberof_group_filter)) + if(!slapi_filter_test_simple(e, config->group_filter)) { /* group */ Slapi_Value *ll_dn_val = 0; @@ -871,7 +954,7 @@ { ll_dn_val = slapi_value_new_string(ll->dn); - if(0 == memberof_compare(&ll_dn_val, &to_dn_val)) + if(0 == memberof_compare(config, &ll_dn_val, &to_dn_val)) { slapi_value_free(&ll_dn_val); @@ -879,7 +962,7 @@ recursive groups - bail out */ slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_modop_one_r: group recursion" + "memberof_modop_one_replace_r: group recursion" " detected in %s\n" ,op_to); goto bail; @@ -892,17 +975,17 @@ /* do op on group */ slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_modop_one_r: descending into group %s\n", + "memberof_modop_one_replace_r: descending into group %s\n", op_to); /* Add the nested group's DN to the stack so we can detect loops later. */ ll = (memberofstringll*)slapi_ch_malloc(sizeof(memberofstringll)); ll->dn = op_to; ll->next = stack; - slapi_entry_attr_find( e, MEMBEROF_GROUP_ATTR, &members ); + slapi_entry_attr_find( e, config->groupattr, &members ); if(members) { - memberof_mod_attr_list_r(pb, mod_op, group_dn, op_this, members, ll); + memberof_mod_attr_list_r(pb, config, mod_op, group_dn, op_this, members, ll); } { @@ -921,11 +1004,11 @@ /* We want to avoid listing a group as a memberOf itself * in case someone set up a circular grouping. */ - if (0 == memberof_compare(&this_dn_val, &to_dn_val)) + if (0 == memberof_compare(config, &this_dn_val, &to_dn_val)) { slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_modop_one_r: not processing memberOf " + "memberof_modop_one_replace_r: not processing memberOf " "operations on self entry: %s\n", this_dn_val); goto bail; } @@ -935,13 +1018,13 @@ * it could still be a member in some other indirect manner. */ if(stack && LDAP_MOD_DELETE == mod_op) { - if(memberof_is_legit_member(pb, group_dn, + if(memberof_is_legit_member(pb, config, group_dn, op_this, op_to, stack)) { /* entry is member some other way too */ slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_modop_one_r: not deleting %s\n" + "memberof_modop_one_replace_r: not deleting %s\n" ,op_to); goto bail; } @@ -949,14 +1032,15 @@ /* Check if the entry is still an indirect member. If it is, we * don't want to remove the memberOf value. */ - if((LDAP_MOD_DELETE != mod_op) || (0 == memberof_is_member(this_dn_val, to_dn_val))) { + if((LDAP_MOD_DELETE != mod_op) || + (0 == memberof_is_member(config, this_dn_val, to_dn_val))) { /* If we're about to add a memberOf value to an entry, we should first check * if the value already exists. */ if((LDAP_MOD_ADD == mod_op) && (slapi_entry_attr_has_syntax_value(e, - MEMBEROF_ATTR, this_dn_val))) + config->memberof_attr, this_dn_val))) { slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_modop_one_r: memberOf value %s already exists in " + "memberof_modop_one_replace_r: memberOf value %s already exists in " "entry %s\n", op_this, op_to); goto bail; } @@ -979,7 +1063,7 @@ val[1] = 0; mod.mod_op = LDAP_MOD_REPLACE == mod_op?LDAP_MOD_DELETE:mod_op; - mod.mod_type = MEMBEROF_ATTR; + mod.mod_type = config->memberof_attr; mod.mod_values = val; if(LDAP_MOD_REPLACE == mod_op) @@ -988,7 +1072,7 @@ replace_val[1] = 0; replace_mod.mod_op = LDAP_MOD_ADD; - replace_mod.mod_type = MEMBEROF_ATTR; + replace_mod.mod_type = config->memberof_attr; replace_mod.mod_values = replace_val; } @@ -1009,7 +1093,7 @@ if(LDAP_MOD_DELETE == mod_op) { /* fix up membership for groups that have been orphaned */ - memberof_test_membership_callback(e, 0); + memberof_test_membership_callback(e, config); } if(LDAP_MOD_ADD == mod_op) @@ -1018,7 +1102,7 @@ * try to fix up membership for parent groups. */ if (rc == 0) { /* fix up membership for groups that are now in scope */ - memberof_add_membership(pb, op_this, op_to); + memberof_add_membership(pb, config, op_this, op_to); } } } @@ -1037,9 +1121,9 @@ * Add addthis DN to the memberof attribute of addto * */ -int memberof_add_one(Slapi_PBlock *pb, char *addthis, char *addto) +int memberof_add_one(Slapi_PBlock *pb, MemberOfConfig *config, char *addthis, char *addto) { - return memberof_modop_one(pb, LDAP_MOD_ADD, addthis, addto); + return memberof_modop_one(pb, config, LDAP_MOD_ADD, addthis, addto); } /* @@ -1048,9 +1132,9 @@ * Delete delthis DN from the memberof attribute of delfrom * */ -int memberof_del_one(Slapi_PBlock *pb, char *delthis, char *delfrom) +int memberof_del_one(Slapi_PBlock *pb, MemberOfConfig *config, char *delthis, char *delfrom) { - return memberof_modop_one(pb, LDAP_MOD_DELETE, delthis, delfrom); + return memberof_modop_one(pb, config, LDAP_MOD_DELETE, delthis, delfrom); } /* @@ -1059,7 +1143,8 @@ * Perform mod for group DN to the memberof attribute of the list of targets * */ -int memberof_mod_smod_list(Slapi_PBlock *pb, int mod, char *group_dn, Slapi_Mod *smod) +int memberof_mod_smod_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod, + char *group_dn, Slapi_Mod *smod) { int rc = 0; struct berval *bv = slapi_mod_get_first_value(smod); @@ -1091,7 +1176,7 @@ strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len); - memberof_modop_one(pb, mod, group_dn, dn_str); + memberof_modop_one(pb, config, mod, group_dn, dn_str); bv = slapi_mod_get_next_value(smod); } @@ -1108,9 +1193,10 @@ * Add group DN to the memberof attribute of the list of targets * */ -int memberof_add_smod_list(Slapi_PBlock *pb, char *groupdn, Slapi_Mod *smod) +int memberof_add_smod_list(Slapi_PBlock *pb, MemberOfConfig *config, + char *groupdn, Slapi_Mod *smod) { - return memberof_mod_smod_list(pb, LDAP_MOD_ADD, groupdn, smod); + return memberof_mod_smod_list(pb, config, LDAP_MOD_ADD, groupdn, smod); } @@ -1120,9 +1206,10 @@ * Remove group DN from the memberof attribute of the list of targets * */ -int memberof_del_smod_list(Slapi_PBlock *pb, char *groupdn, Slapi_Mod *smod) +int memberof_del_smod_list(Slapi_PBlock *pb, MemberOfConfig *config, + char *groupdn, Slapi_Mod *smod) { - return memberof_mod_smod_list(pb, LDAP_MOD_DELETE, groupdn, smod); + return memberof_mod_smod_list(pb, config, LDAP_MOD_DELETE, groupdn, smod); } /** @@ -1145,13 +1232,14 @@ * Perform mod for group DN to the memberof attribute of the list of targets * */ -int memberof_mod_attr_list(Slapi_PBlock *pb, int mod, char *group_dn, Slapi_Attr *attr) +int memberof_mod_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, int mod, + char *group_dn, Slapi_Attr *attr) { - return memberof_mod_attr_list_r(pb, mod, group_dn, group_dn, attr, 0); + return memberof_mod_attr_list_r(pb, config, mod, group_dn, group_dn, attr, 0); } -int memberof_mod_attr_list_r(Slapi_PBlock *pb, int mod, char *group_dn, char *op_this, - Slapi_Attr *attr, memberofstringll *stack) +int memberof_mod_attr_list_r(Slapi_PBlock *pb, MemberOfConfig *config, int mod, + char *group_dn, char *op_this, Slapi_Attr *attr, memberofstringll *stack) { int rc = 0; Slapi_Value *val = 0; @@ -1189,12 +1277,12 @@ * to specify the new group DN value */ if(mod == LDAP_MOD_REPLACE) { - memberof_modop_one_replace_r(pb, mod, group_dn, op_this, group_dn, + memberof_modop_one_replace_r(pb, config, mod, group_dn, op_this, group_dn, dn_str, stack); } else { - memberof_modop_one_r(pb, mod, group_dn, op_this, dn_str, stack); + memberof_modop_one_r(pb, config, mod, group_dn, op_this, dn_str, stack); } hint = slapi_attr_next_value(attr, hint, &val); @@ -1212,9 +1300,10 @@ * Add group DN to the memberof attribute of the list of targets * */ -int memberof_add_attr_list(Slapi_PBlock *pb, char *groupdn, Slapi_Attr *attr) +int memberof_add_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, char *groupdn, + Slapi_Attr *attr) { - return memberof_mod_attr_list(pb, LDAP_MOD_ADD, groupdn, attr); + return memberof_mod_attr_list(pb, config, LDAP_MOD_ADD, groupdn, attr); } /* @@ -1223,9 +1312,10 @@ * Remove group DN from the memberof attribute of the list of targets * */ -int memberof_del_attr_list(Slapi_PBlock *pb, char *groupdn, Slapi_Attr *attr) +int memberof_del_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, char *groupdn, + Slapi_Attr *attr) { - return memberof_mod_attr_list(pb, LDAP_MOD_DELETE, groupdn, attr); + return memberof_mod_attr_list(pb, config, LDAP_MOD_DELETE, groupdn, attr); } /* @@ -1234,7 +1324,8 @@ * Perform mod for group DN to the memberof attribute of the list of targets * */ -int memberof_moddn_attr_list(Slapi_PBlock *pb, char *pre_dn, char *post_dn, Slapi_Attr *attr) +int memberof_moddn_attr_list(Slapi_PBlock *pb, MemberOfConfig *config, + char *pre_dn, char *post_dn, Slapi_Attr *attr) { int rc = 0; Slapi_Value *val = 0; @@ -1268,7 +1359,7 @@ strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len); - memberof_modop_one_replace_r(pb, LDAP_MOD_REPLACE, + memberof_modop_one_replace_r(pb, config, LDAP_MOD_REPLACE, post_dn, pre_dn, post_dn, dn_str, 0); hint = slapi_attr_next_value(attr, hint, &val); @@ -1282,21 +1373,23 @@ typedef struct _memberof_add_groups { + MemberOfConfig *config; char *target_dn; char *group_dn; } memberof_add_groups; -int memberof_add_membership(Slapi_PBlock *pb, char *op_this, char *op_to) +int memberof_add_membership(Slapi_PBlock *pb, MemberOfConfig *config, + char *op_this, char *op_to) { - memberof_add_groups data = {op_to, op_this}; + memberof_add_groups data = {config, op_to, op_this}; - return memberof_call_foreach_dn(pb, op_this, MEMBEROF_GROUP_ATTR, + return memberof_call_foreach_dn(pb, op_this, config->groupattr, memberof_add_groups_search_callback, &data); } int memberof_add_groups_search_callback(Slapi_Entry *e, void *callback_data) { - return memberof_add_one(0, slapi_entry_get_dn(e), + return memberof_add_one(0, ((memberof_add_groups*)callback_data)->config, slapi_entry_get_dn(e), ((memberof_add_groups*)callback_data)->target_dn); } @@ -1305,11 +1398,12 @@ * tests for direct membership of memberdn in group groupdn * returns non-zero when true, zero otherwise */ -int memberof_is_direct_member(Slapi_Value *groupdn, Slapi_Value *memberdn) +int memberof_is_direct_member(MemberOfConfig *config, Slapi_Value *groupdn, + Slapi_Value *memberdn) { int rc = 0; Slapi_DN *sdn = 0; - char *attrlist[2] = {MEMBEROF_GROUP_ATTR,0}; + char *attrlist[2] = {config->groupattr,0}; Slapi_Entry *group_e = 0; Slapi_Attr *attr = 0; @@ -1320,7 +1414,7 @@ if(group_e) { - slapi_entry_attr_find(group_e, MEMBEROF_GROUP_ATTR, &attr ); + slapi_entry_attr_find(group_e, config->groupattr, &attr ); if(attr) { rc = 0 == slapi_attr_value_find( @@ -1339,19 +1433,20 @@ * will check for both direct and indirect membership. * returns non-zero when true, zero otherwise */ -int memberof_is_member(Slapi_Value *groupdn, Slapi_Value *memberdn) +int memberof_is_member(MemberOfConfig *config, Slapi_Value *groupdn, + Slapi_Value *memberdn) { memberofstringll *stack = 0; /* Do a quick check to see if the entry is a direct * member before tracing through nested groups. */ - if(memberof_is_direct_member(groupdn, memberdn)) + if(memberof_is_direct_member(config, groupdn, memberdn)) { /* entry is a direct member */ return 1; } - return memberof_is_member_r(groupdn, memberdn, stack); + return memberof_is_member_r(config, groupdn, memberdn, stack); } /* memberof_is_member_r() @@ -1364,7 +1459,8 @@ * * returns non-zero when true, zero otherwise */ -int memberof_is_member_r(Slapi_Value *groupdn, Slapi_Value *memberdn, memberofstringll *stack) +int memberof_is_member_r(MemberOfConfig *config, Slapi_Value *groupdn, + Slapi_Value *memberdn, memberofstringll *stack) { Slapi_DN *member_sdn = 0; Slapi_DN *base_sdn = 0; @@ -1382,7 +1478,7 @@ { ll_dn_val = slapi_value_new_string(ll->dn); - if(0 == memberof_compare(&ll_dn_val, &memberdn)) + if(0 == memberof_compare(config, &ll_dn_val, &memberdn)) { slapi_value_free(&ll_dn_val); @@ -1393,6 +1489,11 @@ "memberof_is_member_r: group recursion" " detected in %s\n" ,slapi_value_get_string(memberdn)); + /* We set this to null to avoid freeing it twice. + * If we don't do this, we'd free ll in the bail section + * and the caller (ourselves since we're using recursion) + * would free it as well. */ + ll = 0; goto bail; } @@ -1419,11 +1520,8 @@ * and keep looping until we've exhausted it. */ if(base_sdn) { - int filter_size = - (strlen(MEMBEROF_GROUP_ATTR) + - strlen(slapi_value_get_string(memberdn)) + 4); /* 4 for (=) + null */ - filter_str = (char*)slapi_ch_malloc(filter_size); - sprintf(filter_str, "(%s=%s)", MEMBEROF_GROUP_ATTR, slapi_value_get_string(memberdn)); + filter_str = slapi_ch_smprintf("(%s=%s)", config->groupattr, + slapi_value_get_string(memberdn)); } if(filter_str) @@ -1465,7 +1563,7 @@ * see if any of them are the group we are trying to find. * We do this by doing a recursive call on this function. */ Slapi_Value *entrydn = slapi_value_new_string(slapi_entry_get_ndn(entries[i])); - rc = memberof_is_member_r(groupdn, entrydn, ll); + rc = memberof_is_member_r(config, groupdn, entrydn, ll); slapi_value_free(&entrydn); } } @@ -1498,10 +1596,10 @@ * iterate until a pass fails to move a group over to member groups * remaining groups should be deleted */ -int memberof_test_membership(Slapi_PBlock *pb, char *group_dn) +int memberof_test_membership(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn) { - return memberof_call_foreach_dn(pb, group_dn, MEMBEROF_ATTR, - memberof_test_membership_callback ,0); + return memberof_call_foreach_dn(pb, group_dn, config->memberof_attr, + memberof_test_membership_callback , config); } /* @@ -1519,6 +1617,7 @@ Slapi_Value **member_array = 0; Slapi_Value **candidate_array = 0; Slapi_Value *entry_dn = 0; + MemberOfConfig *config = (MemberOfConfig *)callback_data; entry_dn = slapi_value_new_string(slapi_entry_get_dn(e)); @@ -1528,7 +1627,7 @@ } /* divide groups into member and non-member lists */ - slapi_entry_attr_find(e, MEMBEROF_ATTR, &attr ); + slapi_entry_attr_find(e, config->memberof_attr, &attr ); if(attr) { slapi_attr_get_numvalues( attr, &total); @@ -1555,7 +1654,7 @@ while(val) { /* test for direct membership */ - if(memberof_is_direct_member(val, entry_dn)) + if(memberof_is_direct_member(config, val, entry_dn)) { /* it is a member */ member_array[m_index] = val; @@ -1602,6 +1701,7 @@ } if(memberof_is_direct_member( + config, candidate_array[inner_index], member_array[outer_index])) { @@ -1640,7 +1740,7 @@ } memberof_del_one( - 0, + 0, config, (char*)slapi_value_get_string( candidate_array[outer_index]), (char*)slapi_value_get_string(entry_dn)); @@ -1675,7 +1775,7 @@ * Perform replace the group DN list in the memberof attribute of the list of targets * */ -int memberof_replace_list(Slapi_PBlock *pb, char *group_dn) +int memberof_replace_list(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn) { struct slapi_entry *pre_e = NULL; struct slapi_entry *post_e = NULL; @@ -1687,8 +1787,8 @@ if(pre_e && post_e) { - slapi_entry_attr_find( pre_e, MEMBEROF_GROUP_ATTR, &pre_attr ); - slapi_entry_attr_find( post_e, MEMBEROF_GROUP_ATTR, &post_attr ); + slapi_entry_attr_find( pre_e, config->groupattr, &pre_attr ); + slapi_entry_attr_find( post_e, config->groupattr, &post_attr ); } if(pre_attr || post_attr) @@ -1711,6 +1811,14 @@ slapi_attr_get_numvalues( post_attr, &post_total); } + /* Stash a plugin global pointer here and have memberof_qsort_compare + * use it. We have to do this because we use memberof_qsort_compare + * as the comparator function for qsort, which requires the function + * to only take two void* args. This is thread-safe since we only + * store and use the pointer while holding the memberOf operation + * lock. */ + qsortConfig = config; + if(pre_total) { pre_array = @@ -1721,7 +1829,7 @@ pre_array, pre_total, sizeof(Slapi_Value*), - memberof_compare); + memberof_qsort_compare); } if(post_total) @@ -1734,9 +1842,11 @@ post_array, post_total, sizeof(Slapi_Value*), - memberof_compare); + memberof_qsort_compare); } + qsortConfig = 0; + /* work through arrays, following these rules: in pre, in post, do nothing @@ -1749,7 +1859,7 @@ { /* add the rest of post */ memberof_add_one( - pb, + pb, config, group_dn, (char*)slapi_value_get_string( post_array[post_index])); @@ -1760,7 +1870,7 @@ { /* delete the rest of pre */ memberof_del_one( - pb, + pb, config, group_dn, (char*)slapi_value_get_string( pre_array[pre_index])); @@ -1771,6 +1881,7 @@ { /* decide what to do */ int cmp = memberof_compare( + config, &(pre_array[pre_index]), &(post_array[post_index])); @@ -1778,7 +1889,7 @@ { /* delete pre array */ memberof_del_one( - pb, + pb, config, group_dn, (char*)slapi_value_get_string( pre_array[pre_index])); @@ -1789,7 +1900,7 @@ { /* add post array */ memberof_add_one( - pb, + pb, config, group_dn, (char*)slapi_value_get_string( post_array[post_index])); @@ -1832,42 +1943,35 @@ * * compare two attr values */ -int memberof_compare(const void *a, const void *b) +int memberof_compare(MemberOfConfig *config, const void *a, const void *b) { - static Slapi_Attr *attr = 0; - static int first_time = 1; Slapi_Value *val1 = *((Slapi_Value **)a); Slapi_Value *val2 = *((Slapi_Value **)b); - if(first_time) - { - first_time = 0; - attr = slapi_attr_new(); - slapi_attr_init(attr, MEMBEROF_GROUP_ATTR); - } - return slapi_attr_value_cmp( - attr, - slapi_value_get_berval(val1), + config->group_slapiattr, + slapi_value_get_berval(val1), slapi_value_get_berval(val2)); } -/* memberof_string2filter() +/* memberof_qsort_compare() * - * For some reason slapi_str2filter writes to its input - * which means you cannot pass in a string constant - * so this is a fix up function for that + * This is a version of memberof_compare that uses a plugin + * global copy of the config. We'd prefer to pass in a copy + * of config that is local to the running thread, but we can't + * do this since qsort is using us as a comparator function. + * We should only use this function when using qsort, and only + * when the memberOf lock is acquired. */ -Slapi_Filter *memberof_string2filter(char *strfilter) +int memberof_qsort_compare(const void *a, const void *b) { - Slapi_Filter *ret = 0; - char *idontbelieveit = slapi_ch_strdup(strfilter); - - ret = slapi_str2filter( idontbelieveit ); - - slapi_ch_free_string(&idontbelieveit); + Slapi_Value *val1 = *((Slapi_Value **)a); + Slapi_Value *val2 = *((Slapi_Value **)b); - return ret; + return slapi_attr_value_cmp( + qsortConfig->group_slapiattr, + slapi_value_get_berval(val1), + slapi_value_get_berval(val2)); } /* memberof_is_legit_member() @@ -1880,8 +1984,8 @@ * the second from bottom one of our stack do not appear * in the membership attribute of the group */ -int memberof_is_legit_member(Slapi_PBlock *pb, char *group_dn, - char *op_this, char *op_to, memberofstringll *stack) +int memberof_is_legit_member(Slapi_PBlock *pb, MemberOfConfig *config, + char *group_dn, char *op_this, char *op_to, memberofstringll *stack) { int rc = 0; Slapi_DN *group_sdn = 0; @@ -1890,10 +1994,9 @@ Slapi_Entry *opto_e = 0; char *filter_str = 0; Slapi_Filter *filter = 0; - int filter_size = 0; memberofstringll *ll = 0; - char *attrlist[2] = {MEMBEROF_GROUP_ATTR,0}; - char *optolist[2] = {MEMBEROF_ATTR,0}; + char *attrlist[2] = {config->groupattr,0}; + char *optolist[2] = {config->memberof_attr,0}; Slapi_Attr *memberof = 0; Slapi_Value *memberdn = 0; int hint = 0; @@ -1913,14 +2016,8 @@ goto bail; } - filter_size = 2 * - (strlen(MEMBEROF_GROUP_ATTR) + - strlen(op_to) + 4); /* 4 for (=) + null */ - filter_str = (char*)slapi_ch_malloc(filter_size); - - sprintf(filter_str, "(%s=%s)", MEMBEROF_GROUP_ATTR, op_to); - - filter = memberof_string2filter(filter_str); + filter_str = slapi_ch_smprintf("(%s=%s)", config->groupattr, op_to); + filter = slapi_str2filter(filter_str); if(!slapi_filter_test_simple(group_e, filter)) { @@ -1966,7 +2063,7 @@ if(opto_e) { - slapi_entry_attr_find(opto_e, MEMBEROF_ATTR, &memberof); + slapi_entry_attr_find(opto_e, config->memberof_attr, &memberof); } if(0 == memberof) @@ -1981,7 +2078,7 @@ { char *dn = (char*)slapi_value_get_string(memberdn); int current_size = - (strlen(MEMBEROF_GROUP_ATTR) + + (strlen(config->groupattr) + strlen(dn) + 4); /* 4 for (=) + null */ /* disregard the group being removed */ @@ -1991,15 +2088,14 @@ continue; } - if(current_size > filter_size) + if (current_size > strlen(filter_str)) { - filter_size = 2 * current_size; - filter_str = slapi_ch_realloc( - filter_str, filter_size); + int filter_size = 2 * current_size; + filter_str = slapi_ch_realloc(filter_str, filter_size); } - sprintf(filter_str, "(%s=%s)", MEMBEROF_GROUP_ATTR, dn); - filter = memberof_string2filter(filter_str); + sprintf(filter_str, "(%s=%s)", config->groupattr, dn); + filter = slapi_str2filter(filter_str); if(!slapi_filter_test_simple(group_e, filter)) { @@ -2046,6 +2142,7 @@ void memberof_fixup_task_thread(void *arg) { + MemberOfConfig configCopy = {0, 0, 0, 0}; Slapi_Task *task = (Slapi_Task *)arg; task_data *td = NULL; int rc = 0; @@ -2057,8 +2154,22 @@ slapi_task_log_notice(task, "Memberof task starts (arg: %s) ...\n", td->filter_str); + /* We need to get the config lock first. Trying to get the + * config lock after we already hold the op lock can cause + * a deadlock. */ + memberof_rlock_config(); + /* copy config so it doesn't change out from under us */ + memberof_copy_config(&configCopy, memberof_get_config()); + memberof_unlock_config(); + + /* get the memberOf operation lock */ + memberof_lock(); + /* do real work */ - rc = memberof_fix_memberof(td->dn, td->filter_str); + rc = memberof_fix_memberof(&configCopy, td->dn, td->filter_str); + + /* release the memberOf operation lock */ + memberof_unlock(); slapi_task_log_notice(task, "Memberof task finished."); slapi_task_log_status(task, "Memberof task finished."); @@ -2164,7 +2275,7 @@ } } -int memberof_fix_memberof(char *dn, char *filter_str) +int memberof_fix_memberof(MemberOfConfig *config, char *dn, char *filter_str) { int rc = 0; Slapi_PBlock *search_pb = slapi_pblock_new(); @@ -2176,7 +2287,7 @@ 0); rc = slapi_search_internal_callback_pb(search_pb, - 0, + config, 0, memberof_fix_memberof_callback, 0); @@ -2196,13 +2307,14 @@ { int rc = 0; char *dn = slapi_entry_get_dn(e); - memberof_add_groups data = {dn, dn}; + MemberOfConfig *config = (MemberOfConfig *)callback_data; + memberof_add_groups data = {config, dn, dn}; /* step 1 */ - slapi_entry_attr_delete(e, MEMBEROF_ATTR); + slapi_entry_attr_delete(e, config->memberof_attr); /* step 2 and 3 */ - rc = memberof_call_foreach_dn(0, dn, MEMBEROF_GROUP_ATTR, + rc = memberof_call_foreach_dn(0, dn, config->groupattr, memberof_add_groups_search_callback, &data); return rc; From fedora-directory-commits at redhat.com Fri Jun 20 15:10:03 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 20 Jun 2008 11:10:03 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm index.c, 1.13, 1.14 Message-ID: <200806201510.m5KFA3Gq023012@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22962 Modified Files: index.c Log Message: Resolves: 452169 Summary: Indexing code needs to use new entry copy to search for subtypes when deleting an attribute value. Index: index.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/index.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- index.c 4 Oct 2007 03:28:19 -0000 1.13 +++ index.c 20 Jun 2008 15:10:00 -0000 1.14 @@ -652,13 +652,21 @@ * BE_INDEX_EQUALITY flag so the equality index is * removed. */ - slapi_entry_attr_find( olde->ep_entry, mods[i]->mod_type, &curr_attr); - for (j = 0; mods_valueArray[j] != NULL; j++ ) { - if ( valuearray_find(curr_attr, evals, mods_valueArray[j]) == -1 ) { - if (!(flags & BE_INDEX_EQUALITY)) { - flags |= BE_INDEX_EQUALITY; + slapi_entry_attr_find( newe->ep_entry, mods[i]->mod_type, &curr_attr); + if (curr_attr) { + for (j = 0; mods_valueArray[j] != NULL; j++ ) { + if ( valuearray_find(curr_attr, evals, mods_valueArray[j]) == -1 ) { + if (!(flags & BE_INDEX_EQUALITY)) { + flags |= BE_INDEX_EQUALITY; + } } } + } else { + /* If we didn't find the attribute in the new + * entry, we should remove the equality index. */ + if (!(flags & BE_INDEX_EQUALITY)) { + flags |= BE_INDEX_EQUALITY; + } } rc = index_addordel_values_sv( be, basetype, From fedora-directory-commits at redhat.com Mon Jun 23 15:06:13 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Mon, 23 Jun 2008 11:06:13 -0400 Subject: [Fedora-directory-commits] owners owners.list,1.2,1.3 Message-ID: <200806231506.m5NF6D4s018260@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/owners In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18241 Modified Files: owners.list Log Message: Updated owners list. Index: owners.list =================================================================== RCS file: /cvs/dirsec/owners/owners.list,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- owners.list 11 Jul 2005 19:39:00 -0000 1.2 +++ owners.list 23 Jun 2008 15:06:11 -0000 1.3 @@ -8,37 +8,37 @@ # # All e-mail addresses used here MUST correspond to existing bugzilla accounts! -Fedora Directory Server|Admin|Issues with DS admin tools not covered by other categories|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Command Line Utilities|import,export,ldapsearch,etc|nkinder at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Database - General|LDBM/Berkeley DB issues not covered by another category|nhosoi at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Database - Import/Export|Import/Export|nhosoi at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Database - Indexes/Searches|Indexes/Searches|nhosoi at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Database - Performance|Too slow or uses too many resources|nhosoi at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Directory Server|Any issue not covered by another category|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|DSMLGW|DSML Gateway|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Install/Uninstall|Packaging,installation,uninstall,setup|nkinder at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Migration|migration,upgrade|nkinder at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Performance|performance issues|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Personalized Views|Virtual Views|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Replication - Fractional|Fractional Replication issues|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Replication - General|Any replication related issue not covered by another category|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Replication - WAN|Wide Area Network replication issues|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Search Engine|issues relating specifically to DS front end searching|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Security - Access Control (ACL)|General access control issues|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Security - Access Control (GER)|Issues with the Get Effective Rights operation|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Security - General|Any security related issue not covered elsewhere|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Security - Password Policy|Issues related to password policy|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Security - SASL|Issues related to SASL/GSS/Kerberos authentication|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Security - SSL|Issues related to SSL connection and cert based auth|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Server - Plugins|Issues related to server plugins not covered by other categories|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Sync Service|Issues with windows Sync Service|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|TET|Issues related to the TET testing framework|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - Admin Express|Issues with admin express|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - Configuration|Issues with the Configuration parts of the console|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - Dir Browser|Issues with the console directory browser|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - Gateway/Phonebook|Issues with the gateway/phonebook app|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - General UI|Issues with any UI component not covered elsewhere|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - Online Help|Issues with online help|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - Org Chart|Issues with the org chart app|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|UI - Wizards|Issues with console wizard dialogs|rmeggins at redhat.com|ohegarty at redhat.com| -Fedora Directory Server|Unknown|Issues with no apparent source|rmeggins at redhat.com|ohegarty at redhat.com| +Fedora Directory Server|Admin|Issues with DS admin tools not covered by other categories|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Command Line Utilities|import,export,ldapsearch,etc|nkinder at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Database - General|LDBM/Berkeley DB issues not covered by another category|nhosoi at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Database - Import/Export|Import/Export|nhosoi at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Database - Indexes/Searches|Indexes/Searches|nhosoi at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Database - Performance|Too slow or uses too many resources|nhosoi at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Directory Server|Any issue not covered by another category|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|DSMLGW|DSML Gateway|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Install/Uninstall|Packaging,installation,uninstall,setup|nkinder at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Migration|migration,upgrade|nkinder at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Performance|performance issues|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Personalized Views|Virtual Views|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Replication - Fractional|Fractional Replication issues|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Replication - General|Any replication related issue not covered by another category|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Replication - WAN|Wide Area Network replication issues|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Search Engine|issues relating specifically to DS front end searching|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Security - Access Control (ACL)|General access control issues|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Security - Access Control (GER)|Issues with the Get Effective Rights operation|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Security - General|Any security related issue not covered elsewhere|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Security - Password Policy|Issues related to password policy|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Security - SASL|Issues related to SASL/GSS/Kerberos authentication|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Security - SSL|Issues related to SSL connection and cert based auth|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Server - Plugins|Issues related to server plugins not covered by other categories|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Sync Service|Issues with windows Sync Service|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|TET|Issues related to the TET testing framework|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - Admin Express|Issues with admin express|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - Configuration|Issues with the Configuration parts of the console|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - Dir Browser|Issues with the console directory browser|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - Gateway/Phonebook|Issues with the gateway/phonebook app|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - General UI|Issues with any UI component not covered elsewhere|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - Online Help|Issues with online help|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - Org Chart|Issues with the org chart app|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|UI - Wizards|Issues with console wizard dialogs|rmeggins at redhat.com|ckannan at redhat.com| +Fedora Directory Server|Unknown|Issues with no apparent source|rmeggins at redhat.com|ckannan at redhat.com| From fedora-directory-commits at redhat.com Mon Jun 23 18:28:52 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 23 Jun 2008 14:28:52 -0400 Subject: [Fedora-directory-commits] dsgw/config dsgw.tmpl.in,1.4,1.5 Message-ID: <200806231828.m5NISqYY018022@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/config In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17993/dsgw/config Modified Files: dsgw.tmpl.in Log Message: Resolves: bug 452018 Bug Description: The default url for is missing dc=com Reviewed by: nkinder (Thanks!) Fix Description: Several values in the config files needed to be quoted. Platforms tested: RHEL5 Flag Day: no Doc impact: no Index: dsgw.tmpl.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/dsgw.tmpl.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- dsgw.tmpl.in 6 Mar 2008 22:00:10 -0000 1.4 +++ dsgw.tmpl.in 23 Jun 2008 18:28:50 -0000 1.5 @@ -40,11 +40,11 @@ dirmgr "@dirmgr@" -location-suffix @suffix@ +location-suffix "@suffix@" securitypath "@securitydir@" -url-orgchart-base @httpurl@@cgiuri@/org?context=dsgw&data= +url-orgchart-base "@httpurl@@cgiuri@/org?context=dsgw&data=" # The attribute the orgchart uses to search for entries. # This value should correspond to the value of attrib-farleft-rdn @@ -55,16 +55,16 @@ enable-aim-presence true # The htmldir directive tells the CGIs where to find the html files -htmldir @htmldir@ +htmldir "@htmldir@" # The configdir directive tells the CGIs where to find the # templates/configuration files -configdir @configdir@ +configdir "@configdir@" # The gwnametrans directive tells the CGIs what url to output # for http redirection. It should be the same nameTrans set # in the webserver, if any is being is used. -gwnametrans @dsgwuri@/ +gwnametrans "@dsgwuri@/" # The authlifetime directive specifies how long authentication credentials # are valid (in seconds). From fedora-directory-commits at redhat.com Mon Jun 23 18:28:52 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 23 Jun 2008 14:28:52 -0400 Subject: [Fedora-directory-commits] dsgw/pbconfig pb.tmpl.in,1.4,1.5 Message-ID: <200806231828.m5NISqOO018028@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/pbconfig In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17993/dsgw/pbconfig Modified Files: pb.tmpl.in Log Message: Resolves: bug 452018 Bug Description: The default url for is missing dc=com Reviewed by: nkinder (Thanks!) Fix Description: Several values in the config files needed to be quoted. Platforms tested: RHEL5 Flag Day: no Doc impact: no Index: pb.tmpl.in =================================================================== RCS file: /cvs/dirsec/dsgw/pbconfig/pb.tmpl.in,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- pb.tmpl.in 6 Mar 2008 22:00:40 -0000 1.4 +++ pb.tmpl.in 23 Jun 2008 18:28:50 -0000 1.5 @@ -40,11 +40,11 @@ dirmgr "@dirmgr@" -location-suffix @suffix@ +location-suffix "@suffix@" securitypath "@securitydir@" -url-orgchart-base @httpurl@@cgiuri@/org?context=pb&data= +url-orgchart-base "@httpurl@@cgiuri@/org?context=pb&data=" # The attribute the orgchart uses to search for entries. # This value should correspond to the value of attrib-farleft-rdn @@ -55,16 +55,16 @@ enable-aim-presence true # The htmldir directive tells the CGIs where to find the html files -htmldir @pbhtmldir@ +htmldir "@pbhtmldir@" # The configdir directive tells the CGIs where to find the # templates/configuration files -configdir @pbconfigdir@ +configdir "@pbconfigdir@" # The gwnametrans directive tells the CGIs what url to output # for http redirection. It should be the same nameTrans set # in the webserver, if any is being is used. -gwnametrans @pburi@/ +gwnametrans "@pburi@/" # The authlifetime directive specifies how long authentication credentials # are valid (in seconds). From fedora-directory-commits at redhat.com Mon Jun 23 18:32:14 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 23 Jun 2008 14:32:14 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_clcache.c, 1.7, 1.8 Message-ID: <200806231832.m5NIWETr018136@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18117/bug442170/ldap/servers/plugins/replication Modified Files: cl5_clcache.c Log Message: Resolves: bug 442170 Bug Description: "DB_BUFFER_SMALL: User memory too small for return value" error when importing LDIF with replication active Reviewed by: nkinder (Thanks!) Fix Description: BDB 4.3 does not use ENOMEM if the given buffer is too small - it uses DB_BUFFER_SMALL. This fix allows us to use DB_BUFFER_SMALL in BDB 4.2 and earlier too. I also cleaned up some of the cl5 api return codes to return an appropriate error code to the higher levels rather than pass the ENOMEM up. Platforms tested: RHEL5 Flag Day: no Doc impact: no Index: cl5_clcache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_clcache.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cl5_clcache.c 10 Nov 2006 23:45:17 -0000 1.7 +++ cl5_clcache.c 23 Jun 2008 18:32:11 -0000 1.8 @@ -45,6 +45,15 @@ #include "cl5.h" /* changelog5Config */ #include "cl5_clcache.h" +/* newer bdb uses DB_BUFFER_SMALL instead of ENOMEM as the + error return if the given buffer in which to load a + key or value is too small - if it is not defined, define + it here to ENOMEM +*/ +#ifndef DB_BUFFER_SMALL +#define DB_BUFFER_SMALL ENOMEM +#endif + /* * Constants for the buffer pool: * @@ -248,7 +257,7 @@ else { slapi_log_error ( SLAPI_LOG_FATAL, get_thread_private_agmtname(), "clcache_get_buffer: can't allocate new buffer\n" ); - rc = ENOMEM; + rc = CL5_MEMORY_ERROR; } return rc; @@ -379,7 +388,7 @@ * Continue if the error is no-mem since we don't need to * load in the key record anyway with DB_SET. */ - if ( 0 == rc || ENOMEM == rc ) + if ( 0 == rc || DB_BUFFER_SMALL == rc ) rc = clcache_cursor_get ( cursor, buf, flag ); } @@ -852,7 +861,7 @@ if ( NULL == bl ) { if ( NULL == ( bl = clcache_new_busy_list ()) ) { - rc = ENOMEM; + rc = CL5_MEMORY_ERROR; } else { PR_RWLock_Wlock ( _pool->pl_lock ); @@ -898,7 +907,7 @@ & buf->buf_key, & buf->buf_data, buf->buf_load_flag | flag ); - if ( ENOMEM == rc ) { + if ( DB_BUFFER_SMALL == rc ) { /* * The record takes more space than the current size of the * buffer. Fortunately, buf->buf_data.size has been set by @@ -923,7 +932,7 @@ "clcache_cursor_get: invalid parameter\n" ); break; - case ENOMEM: + case DB_BUFFER_SMALL: slapi_log_error ( SLAPI_LOG_FATAL, buf->buf_agmt_name, "clcache_cursor_get: can't allocate %u bytes\n", buf->buf_data.ulen ); break; From fedora-directory-commits at redhat.com Mon Jun 23 18:38:42 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 23 Jun 2008 14:38:42 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5_inc_protocol.c, 1.11, 1.12 Message-ID: <200806231838.m5NIcg7t018541@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18524/bug450973/ldap/servers/plugins/replication Modified Files: repl5_inc_protocol.c Log Message: Resolves: bug 450973 Bug Description: rhds80 account accountunlocktime attribute breaks replication Reviewed by: nhosoi (Thanks!) Fix Description: We were not handling errors returned from the consumer correctly in the async replication code. The problem was that we were exiting the async read results thread immediately. However, we needed to wait for and read all of the outstanding responses, then exit the thread when all of them had been read. The new code handles this case correctly, allowing us to read all of the pending responses before exiting. The flip side of this is that passwordIsGlobalPolicy only works on the _consumer_. It has no effect whatsoever on the _supplier_ side of replication. The fix for this is to configure fractional replication _always_ and to add the password policy op attrs to the list of attrs not to replicate. This should work fine with RHDS 8.0.0-14 and later. Platforms tested: RHEL5 Flag Day: no Doc impact: Yes. We will need to document exactly how passwordIsGlobalPolicy works and how to configure fractional replication. QA impact: Will need to do more testing of MMR with account lockout to make sure this error does not blow up MMR anymore. New Tests integrated into TET: Working on it. Index: repl5_inc_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_inc_protocol.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- repl5_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.11 +++ repl5_inc_protocol.c 23 Jun 2008 18:38:40 -0000 1.12 @@ -294,6 +294,7 @@ while (!finished) { conres = conn_read_result_ex(conn, NULL, NULL, NULL, &message_id, 0); + slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: read result for message_id %d\n", message_id); /* Timeout here means that we didn't block, not a real timeout */ if (CONN_TIMEOUT == conres) { @@ -328,6 +329,7 @@ } if (conres != CONN_TIMEOUT) { + int should_finish = 0; if (message_id) { rd->last_message_id_received = message_id; @@ -344,16 +346,18 @@ } conn_get_error_ex(conn, &operation_code, &connection_error, &ldap_error_string); - slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: result %d, %d, %d, %s\n", operation_code,connection_error,conres,ldap_error_string); - rd->result = repl5_inc_update_from_op_result(rd->prp, conres, connection_error, csn_str, uniqueid, replica_id, &finished, &(rd->num_changes_sent)); - if (rd->result) + slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: result %d, %d, %d, %d, %s\n", operation_code,connection_error,conres,message_id,ldap_error_string); + rd->result = repl5_inc_update_from_op_result(rd->prp, conres, connection_error, csn_str, uniqueid, replica_id, &should_finish, &(rd->num_changes_sent)); + if (rd->result || should_finish) { - slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: got op result %d\n", rd->result); + slapi_log_error(SLAPI_LOG_REPL, NULL, "repl5_inc_result_threadmain: got op result %d should finish %d\n", rd->result, should_finish); /* If so then we need to take steps to abort the update process */ PR_Lock(rd->lock); rd->abort = 1; PR_Unlock(rd->lock); /* We also need to log the error, including details stored from when the operation was sent */ + /* we cannot finish yet - we still need to waitfor the pending results, then + the main repl code will shut down this thread */ } } /* Should we stop ? */ From fedora-directory-commits at redhat.com Mon Jun 23 20:41:38 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 23 Jun 2008 16:41:38 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/retrocl retrocl_create.c, 1.5, 1.6 Message-ID: <200806232041.m5NKfc78011322@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10952 Modified Files: retrocl_create.c Log Message: Resolves: #452328 Summary: range search anomaly on the integer type Description: Retro changelog plugin automatically creates an index for changeNumber, which has an integer type. To support the reange search againt changeNumber, the index should have the matching order "integerOrderingMatch". Index: retrocl_create.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/retrocl/retrocl_create.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- retrocl_create.c 10 Nov 2006 23:45:18 -0000 1.5 +++ retrocl_create.c 23 Jun 2008 20:41:36 -0000 1.6 @@ -166,6 +166,10 @@ val.bv_len = strlen(val.bv_val); slapi_entry_add_values( e, "nsindextype", vals ); + val.bv_val = "integerOrderingMatch"; + val.bv_len = strlen(val.bv_val); + slapi_entry_add_values( e, "nsMatchingRule", vals ); + pb = slapi_pblock_new (); slapi_add_entry_internal_set_pb( pb, e, NULL /* controls */, g_plg_identity[PLUGIN_RETROCL], From fedora-directory-commits at redhat.com Mon Jun 23 23:03:07 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 23 Jun 2008 19:03:07 -0400 Subject: [Fedora-directory-commits] console/src/com/netscape/management/client/console Console.java, 1.12, 1.13 Message-ID: <200806232303.m5NN37QU014597@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/console/src/com/netscape/management/client/console In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14572/bug442187/src/com/netscape/management/client/console Modified Files: Console.java Log Message: Resolves: bug 442187 Description: [PATCH] support for providing console password in STDIN Fix Description: Add support for -w - to read password from stdin, and add a new -y argument to read the password from a password file. Index: Console.java =================================================================== RCS file: /cvs/dirsec/console/src/com/netscape/management/client/console/Console.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Console.java 7 Dec 2007 20:44:38 -0000 1.12 +++ Console.java 23 Jun 2008 23:03:05 -0000 1.13 @@ -1515,7 +1515,7 @@ */ static public void main(String argv[]) { - GetOpt opt = new GetOpt("h:a:A:f:l:u:w:s:D:x:", argv); + GetOpt opt = new GetOpt("h:a:A:f:l:u:w:y:s:D:x:", argv); if (opt.hasOption('f')) { String outFile = opt.getOptionParam('f'); @@ -1594,6 +1594,10 @@ System.err.println(" -f capture stderr and stdout to (like Unix tee command)"); System.err.println(" -s server DN (cn=...) or instance ID (e.g. slapd-host)"); System.err.println(" -x extra options (javalaf,nowinpos,nologo)"); + System.err.println(" -u username"); + System.err.println(" -w password"); + System.err.println(" -w - (read password from standard input)"); + System.err.println(" -y password_file (read password from a file)"); System.err.println("\nExample: Console -a https://hostname:10021 -l en"); waitForKeyPress(); // allow the user to read the msg on Win NT System.exit(0); @@ -1632,7 +1636,34 @@ String password = null; if (opt.hasOption('w')) { password = opt.getOptionParam('w'); + // GetOpt works in such a twisted way that "-" argument values + // result in null values received: + if (password == null || password.equals("-")) { + try { + password = (new BufferedReader(new InputStreamReader( + System.in))).readLine(); + } catch (IOException e) { + System.err + .println("Problem reading password from standard input " + + e.getMessage()); + } + } } + + if (opt.hasOption('y')) { + String passwdFile = opt.getOptionParam('y'); + try { + BufferedReader br = new BufferedReader(new FileReader(passwdFile)); + password = br.readLine(); + br.close(); + } catch (FileNotFoundException e) { + System.err.println("Password file not found: " + e.getMessage()); + } catch (IOException e) { + System.err.println("Problem reading from password file: " + e.getMessage()); + } + } + + _console = new Console(sAdminURL, localAdminURL, sLang, host, uid, password); return; From fedora-directory-commits at redhat.com Tue Jun 24 22:22:12 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 24 Jun 2008 18:22:12 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd csngen.c, 1.7, 1.8 Message-ID: <200806242222.m5OMMCsm014236@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14162/ldapserver/ldap/servers/slapd Modified Files: csngen.c Log Message: Resolves: bug 233642 Bug Description: MMR breaks with time skew errors Reviewed by: nhosoi, nkinder (Thanks!) Fix Description: CSN remote offset generation seems broken. We seem to accumulate a remote offset that keeps growing until we hit the limit of 1 day, then replication stops. The idea behind the remote offset is that servers may be seconds or minutes off. When replication starts, one of the itmes in the payload of the start extop is the latest CSN from the supplier. The CSN timestamp field is (sampled_time + local offset + remote offset). Sampled time comes from the time thread in the server that updates the time once per second. This allows the consumer, if also a master, to adjust its CSN generation so as not to generate duplicates or CSNs less than those from the supplier. However, the logic in csngen_adjust_time appears to be wrong: remote_offset = remote_time - gen->state.sampled_time; That is, remote_offset = (remote sampled_time + remote local offset + remote remote offset) - gen->state.sampled_time It should be remote_offset = remote_time - (sampled_time + local offset + remote offset) Since the sampled time is not the actual current time, it may be off by 1 second. So the new remote_offset will be at least 1 second more than it should be. Since this is the same remote_offset used to generate the CSN to send back to the other master, this offset would keep increasing and increasing over time. The script attached to the bug helps measure this effect. The new code also attempts to refresh the sampled time while adjusting to make sure we have as current a sampled_time as possible. In the old code, the remote_offset is "sent" back and forth between the masters, carried along in the CSN timestamp generation. In the new code, this can happen too, but to a far less extent, and should max out at (real offset + N seconds) where N is the number of masters. In the old code, you could only call csngen_adjust_time if you first made sure the remote timestamp >= local timestamp. I have removed this restriction and moved that logic into csngen_adjust_time. I also cleaned up the code in the consumer extop - I combined the checking of the CSN from the extop with the max CSN from the supplier RUV - now we only adjust the time once based on the max of all of these CSNs sent by the supplier. Finally, I cleaned up the error handling in a few places that assumed all errors were time skew errors. Follow up - I found a bug in my previous patch - _csngen_adjust_local_time must not be called when the sampled time == the current time. So I fixed that where I was calling _csngen_adjust_local_time, and I also changed _csngen_adjust_local_time so that time_diff == 0 is a no-op. Platforms tested: RHEL5, F8, F9 Flag Day: no Doc impact: no QA impact: Should test MMR and use the script to measure the offset effect. Index: csngen.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/csngen.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- csngen.c 10 Nov 2006 23:45:40 -0000 1.7 +++ csngen.c 24 Jun 2008 22:22:10 -0000 1.8 @@ -60,6 +60,9 @@ #define STATE_FORMAT "%8x%8x%8x%4hx%4hx" #define STATE_LENGTH 32 #define MAX_VAL(x,y) ((x)>(y)?(x):(y)) +#define CSN_CALC_TSTAMP(gen) ((gen)->state.sampled_time + \ + (gen)->state.local_offset + \ + (gen)->state.remote_offset) /* * ************************************************************************** @@ -273,8 +276,7 @@ gen->state.seq_num = 0; } - (*csn)->tstamp = gen->state.sampled_time + gen->state.local_offset + - gen->state.remote_offset; + (*csn)->tstamp = CSN_CALC_TSTAMP(gen); (*csn)->seqnum = gen->state.seq_num ++; (*csn)->rid = gen->state.rid; (*csn)->subseqnum = 0; @@ -308,8 +310,9 @@ of time so that it does not generate smaller csns */ int csngen_adjust_time (CSNGen *gen, const CSN* csn) { - time_t remote_time, remote_offset; + time_t remote_time, remote_offset, cur_time; PRUint16 remote_seqnum; + int rc; if (gen == NULL || csn == NULL) return CSN_INVALID_PARAMETER; @@ -319,21 +322,38 @@ PR_RWLock_Wlock (gen->lock); - if (remote_seqnum > gen->state.seq_num ) - { - if (remote_seqnum < CSN_MAX_SEQNUM) - { - gen->state.seq_num = remote_seqnum + 1; - } - else - { - remote_time++; - } - } + /* make sure we have the current time */ + csngen_update_time(); + cur_time = g_sampled_time; + + /* make sure sampled_time is current */ + /* must only call adjust_local_time if the current time is greater than + the generator state time */ + if ((cur_time > gen->state.sampled_time) && + (CSN_SUCCESS != (rc = _csngen_adjust_local_time(gen, cur_time)))) + { + /* _csngen_adjust_local_time will log error */ + PR_RWLock_Unlock (gen->lock); + csngen_dump_state(gen); + return rc; + } - if (remote_time >= gen->state.sampled_time) + cur_time = CSN_CALC_TSTAMP(gen); + if (remote_time >= cur_time) { - remote_offset = remote_time - gen->state.sampled_time; + if (remote_seqnum > gen->state.seq_num ) + { + if (remote_seqnum < CSN_MAX_SEQNUM) + { + gen->state.seq_num = remote_seqnum + 1; + } + else + { + remote_time++; + } + } + + remote_offset = remote_time - cur_time; if (remote_offset > gen->state.remote_offset) { if (remote_offset <= CSN_MAX_TIME_ADJUST) @@ -346,10 +366,18 @@ "adjustment limit exceeded; value - %ld, limit - %ld\n", remote_offset, (long)CSN_MAX_TIME_ADJUST); PR_RWLock_Unlock (gen->lock); + csngen_dump_state(gen); return CSN_LIMIT_EXCEEDED; } } - } + } + else if (gen->state.remote_offset > 0) + { + /* decrease remote offset? */ + /* how to decrease remote offset but ensure that we don't + generate a duplicate CSN, or a CSN smaller than one we've already + generated? */ + } PR_RWLock_Unlock (gen->lock); @@ -576,7 +604,14 @@ { time_t time_diff = cur_time - gen->state.sampled_time; - if (time_diff > 0) + if (time_diff == 0) { + /* This is a no op - _csngen_adjust_local_time should never be called + in this case, because there is nothing to adjust - but just return + here to protect ourselves + */ + return CSN_SUCCESS; + } + else if (time_diff > 0) { gen->state.sampled_time = cur_time; if (time_diff > gen->state.local_offset) @@ -588,7 +623,7 @@ return CSN_SUCCESS; } - else /* time was turend back */ + else /* time was turned back */ { if (abs (time_diff) > CSN_MAX_TIME_ADJUST) { From fedora-directory-commits at redhat.com Tue Jun 24 22:22:12 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 24 Jun 2008 18:22:12 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5.h, 1.10, 1.11 repl5_inc_protocol.c, 1.12, 1.13 repl5_replica.c, 1.16, 1.17 repl_extop.c, 1.12, 1.13 windows_inc_protocol.c, 1.15, 1.16 Message-ID: <200806242222.m5OMMCot014223@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14162/ldapserver/ldap/servers/plugins/replication Modified Files: repl5.h repl5_inc_protocol.c repl5_replica.c repl_extop.c windows_inc_protocol.c Log Message: Resolves: bug 233642 Bug Description: MMR breaks with time skew errors Reviewed by: nhosoi, nkinder (Thanks!) Fix Description: CSN remote offset generation seems broken. We seem to accumulate a remote offset that keeps growing until we hit the limit of 1 day, then replication stops. The idea behind the remote offset is that servers may be seconds or minutes off. When replication starts, one of the itmes in the payload of the start extop is the latest CSN from the supplier. The CSN timestamp field is (sampled_time + local offset + remote offset). Sampled time comes from the time thread in the server that updates the time once per second. This allows the consumer, if also a master, to adjust its CSN generation so as not to generate duplicates or CSNs less than those from the supplier. However, the logic in csngen_adjust_time appears to be wrong: remote_offset = remote_time - gen->state.sampled_time; That is, remote_offset = (remote sampled_time + remote local offset + remote remote offset) - gen->state.sampled_time It should be remote_offset = remote_time - (sampled_time + local offset + remote offset) Since the sampled time is not the actual current time, it may be off by 1 second. So the new remote_offset will be at least 1 second more than it should be. Since this is the same remote_offset used to generate the CSN to send back to the other master, this offset would keep increasing and increasing over time. The script attached to the bug helps measure this effect. The new code also attempts to refresh the sampled time while adjusting to make sure we have as current a sampled_time as possible. In the old code, the remote_offset is "sent" back and forth between the masters, carried along in the CSN timestamp generation. In the new code, this can happen too, but to a far less extent, and should max out at (real offset + N seconds) where N is the number of masters. In the old code, you could only call csngen_adjust_time if you first made sure the remote timestamp >= local timestamp. I have removed this restriction and moved that logic into csngen_adjust_time. I also cleaned up the code in the consumer extop - I combined the checking of the CSN from the extop with the max CSN from the supplier RUV - now we only adjust the time once based on the max of all of these CSNs sent by the supplier. Finally, I cleaned up the error handling in a few places that assumed all errors were time skew errors. Follow up - I found a bug in my previous patch - _csngen_adjust_local_time must not be called when the sampled time == the current time. So I fixed that where I was calling _csngen_adjust_local_time, and I also changed _csngen_adjust_local_time so that time_diff == 0 is a no-op. Platforms tested: RHEL5, F8, F9 Flag Day: no Doc impact: no QA impact: Should test MMR and use the script to measure the offset effect. Index: repl5.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- repl5.h 12 Sep 2007 23:05:24 -0000 1.10 +++ repl5.h 24 Jun 2008 22:22:09 -0000 1.11 @@ -486,6 +486,7 @@ void replica_get_referrals(const Replica *r, char ***referrals); void replica_set_referrals(Replica *r,const Slapi_ValueSet *vs); int replica_update_csngen_state (Replica *r, const RUV *ruv); +int replica_update_csngen_state_ext (Replica *r, const RUV *ruv, const CSN *extracsn); CSN *replica_get_purge_csn(const Replica *r); int replica_log_ruv_elements (const Replica *r); void replica_enumerate_replicas (FNEnumReplica fn, void *arg); Index: repl5_inc_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_inc_protocol.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- repl5_inc_protocol.c 23 Jun 2008 18:38:40 -0000 1.12 +++ repl5_inc_protocol.c 24 Jun 2008 22:22:09 -0000 1.13 @@ -1100,13 +1100,20 @@ rc = replica_update_csngen_state (replica, ruv); object_release (prp->replica_object); replica = NULL; - if (rc != 0) /* too much skew */ + if (rc == CSN_LIMIT_EXCEEDED) /* too much skew */ { slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s: Incremental protocol: fatal error - too much time skew between replicas!\n", agmt_get_long_name(prp->agmt)); next_state = STATE_STOP_FATAL_ERROR; } + else if (rc != 0) /* internal error */ + { + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, + "%s: Incremental protocol: fatal internal error updating the CSN generator!\n", + agmt_get_long_name(prp->agmt)); + next_state = STATE_STOP_FATAL_ERROR; + } else { rc = send_updates(prp, ruv, &num_changes_sent); Index: repl5_replica.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- repl5_replica.c 18 Oct 2007 22:40:17 -0000 1.16 +++ repl5_replica.c 24 Jun 2008 22:22:09 -0000 1.17 @@ -1043,7 +1043,7 @@ } int -replica_update_csngen_state (Replica *r, const RUV *ruv) +replica_update_csngen_state_ext (Replica *r, const RUV *ruv, const CSN *extracsn) { int rc = 0; CSNGen *gen; @@ -1057,34 +1057,42 @@ return -1; } - if (csn == NULL) /* ruv contains no csn - we are done */ + if ((csn == NULL) && (extracsn == NULL)) /* ruv contains no csn and no extra - we are done */ { return 0; } + if (csn_compare(extracsn, csn) > 0) /* extracsn > csn */ + { + csn_free (&csn); /* free */ + csn = (CSN*)extracsn; /* use this csn to do the update */ + } + PR_Lock(r->repl_lock); gen = (CSNGen *)object_get_data (r->repl_csngen); PR_ASSERT (gen); rc = csngen_adjust_time (gen, csn); - if (rc != CSN_SUCCESS) - { - rc = -1; - goto done; - } - - rc = 0; + /* rc will be either CSN_SUCCESS (0) or clock skew */ done: PR_Unlock(r->repl_lock); - if (csn) + if (csn != extracsn) /* do not free the given csn */ + { csn_free (&csn); + } return rc; } +int +replica_update_csngen_state (Replica *r, const RUV *ruv) +{ + return replica_update_csngen_state_ext(r, ruv, NULL); +} + /* * dumps replica state for debugging purpose */ Index: repl_extop.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_extop.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- repl_extop.c 18 Oct 2007 00:08:31 -0000 1.12 +++ repl_extop.c 24 Jun 2008 22:22:09 -0000 1.13 @@ -550,7 +550,6 @@ Replica *replica = NULL; void *conn; consumer_connection_extension *connext = NULL; - CSN *mycsn = NULL; char *replicacsnstr = NULL; CSN *replicacsn = NULL; int zero = 0; @@ -703,55 +702,37 @@ gen = object_get_data(gen_obj); if (NULL != gen) { - if (csngen_new_csn(gen, &mycsn, PR_FALSE /* notify */) == CSN_SUCCESS) + replicacsn = csn_new_by_string(replicacsnstr); + if (NULL != replicacsn) { - replicacsn = csn_new_by_string(replicacsnstr); - if (NULL != replicacsn) + /* ONREPL - we used to manage clock skew here. However, csn generator + code already does it. The csngen also manages local skew caused by + system clock reset, so to keep it consistent, I removed code from here */ + /* update the state of the csn generator */ + rc = replica_update_csngen_state_ext (replica, supplier_ruv, replicacsn); /* too much skew */ + if (rc == CSN_LIMIT_EXCEEDED) { - /* ONREPL - we used to manage clock skew here. However, csn generator - code already does it. The csngen also manages local skew caused by - system clock reset, so to keep it consistent, I removed code from here */ - time_t diff = 0L; - diff = csn_time_difference(mycsn, replicacsn); - if (diff > 0) - { - /* update the state of the csn generator */ - rc = csngen_adjust_time (gen, replicacsn); - if (rc == CSN_LIMIT_EXCEEDED) /* too much skew */ - { - response = NSDS50_REPL_EXCESSIVE_CLOCK_SKEW; - goto send_response; - } - } - else if (diff <= 0) - { - /* Supplier's clock is behind ours */ - /* XXXggood check if CSN smaller than purge point */ - /* response = NSDS50_REPL_BELOW_PURGEPOINT; */ - /* goto send_response; */ - } + response = NSDS50_REPL_EXCESSIVE_CLOCK_SKEW; + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, + "conn=%d op=%d repl=\"%s\": " + "Excessive clock skew from supplier RUV\n", + connid, opid, repl_root); + goto send_response; } - else + else if (rc != 0) { - /* Oops, csnstr couldn't be converted */ + /* Oops, problem csn or ruv format, or memory, or .... */ response = NSDS50_REPL_INTERNAL_ERROR; goto send_response; } + } else { - /* Oops, csn generator failed */ + /* Oops, csnstr couldn't be converted */ response = NSDS50_REPL_INTERNAL_ERROR; goto send_response; } - - /* update csn generator's state from the supplier's ruv */ - rc = replica_update_csngen_state (replica, supplier_ruv); /* too much skew */ - if (rc != 0) - { - response = NSDS50_REPL_EXCESSIVE_CLOCK_SKEW; - goto send_response; - } } else { @@ -988,11 +969,6 @@ { object_release(gen_obj); } - /* mycsn */ - if (NULL != mycsn) - { - csn_free(&mycsn); - } /* replicacsn */ if (NULL != replicacsn) { Index: windows_inc_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/windows_inc_protocol.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- windows_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.15 +++ windows_inc_protocol.c 24 Jun 2008 22:22:09 -0000 1.16 @@ -796,13 +796,20 @@ rc = replica_update_csngen_state (replica, ruv); object_release (prp->replica_object); replica = NULL; - if (rc != 0) /* too much skew */ + if (rc == CSN_LIMIT_EXCEEDED) /* too much skew */ { - slapi_log_error(SLAPI_LOG_FATAL, windows_repl_plugin_name, + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, "%s: Incremental protocol: fatal error - too much time skew between replicas!\n", agmt_get_long_name(prp->agmt)); next_state = STATE_STOP_FATAL_ERROR; } + else if (rc != 0) /* internal error */ + { + slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name, + "%s: Incremental protocol: fatal internal error updating the CSN generator!\n", + agmt_get_long_name(prp->agmt)); + next_state = STATE_STOP_FATAL_ERROR; + } else { rc = send_updates(prp, ruv, &num_changes_sent); From fedora-directory-commits at redhat.com Wed Jun 25 18:34:14 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 25 Jun 2008 14:34:14 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/memberof memberof.c, 1.9, 1.10 Message-ID: <200806251834.m5PIYEkV004033@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4002/ldap/servers/plugins/memberof Modified Files: memberof.c Log Message: Resolves: 452537 Summary: Fixed infinite recursion issues in memberOf plug-in. Index: memberof.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof/memberof.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- memberof.c 19 Jun 2008 15:18:20 -0000 1.9 +++ memberof.c 25 Jun 2008 18:34:12 -0000 1.10 @@ -901,20 +901,72 @@ op_to_sdn = slapi_sdn_new_dn_byref(op_to); slapi_search_internal_get_entry( op_to_sdn, attrlist, &e, memberof_get_plugin_id()); - slapi_sdn_free(&op_to_sdn); if(!e) { + /* In the case of a delete, we need to worry about the + * missing entry being a nested group. There's a small + * window where another thread may have deleted a nested + * group that our group_dn entry refers to. This has the + * potential of us missing some indirect member entries + * that need to be updated. */ if(LDAP_MOD_DELETE == mod_op) { - /* in the case of delete we must guard against - * having groups in a nested chain having been - * deleted during the window of opportunity - * and we must fall back to testing all members - * of the (potentially deleted group) for valid - * membership given the delete operation that - * triggered this operation - */ - memberof_test_membership(pb, config, group_dn); + Slapi_PBlock *search_pb = slapi_pblock_new(); + Slapi_DN *base_sdn = 0; + Slapi_Backend *be = 0; + char *filter_str = 0; + int n_entries = 0; + + /* We can't tell for sure if the op_to entry is a + * user or a group since the entry doesn't exist + * anymore. We can safely ignore the missing entry + * if no other entries have a memberOf attribute that + * points to the missing entry. */ + be = slapi_be_select(op_to_sdn); + if(be) + { + base_sdn = (Slapi_DN*)slapi_be_getsuffix(be,0); + } + + if(base_sdn) + { + filter_str = slapi_ch_smprintf("(%s=%s)", + config->memberof_attr, op_to); + } + + if(filter_str) + { + slapi_search_internal_set_pb(search_pb, slapi_sdn_get_dn(base_sdn), + LDAP_SCOPE_SUBTREE, filter_str, 0, 0, 0, 0, + memberof_get_plugin_id(), 0); + + if (slapi_search_internal_pb(search_pb)) + { + /* get result and log an error */ + int res = 0; + slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_RESULT, &res); + slapi_log_error( SLAPI_LOG_FATAL, MEMBEROF_PLUGIN_SUBSYSTEM, + "memberof_modop_one_replace_r: error searching for members: " + "%d", res); + } else { + slapi_pblock_get(search_pb, SLAPI_NENTRIES, &n_entries); + + if(n_entries > 0) + { + /* We want to fixup the membership for the + * entries that referred to the missing group + * entry. This will fix the references to + * the missing group as well as the group + * represented by op_this. */ + memberof_test_membership(pb, config, op_to); + } + } + + slapi_free_search_results_internal(search_pb); + slapi_ch_free_string(&filter_str); + } + + slapi_pblock_destroy(search_pb); } goto bail; @@ -1108,6 +1160,7 @@ } bail: + slapi_sdn_free(&op_to_sdn); slapi_value_free(&to_dn_val); slapi_value_free(&this_dn_val); slapi_entry_free(e); @@ -1243,51 +1296,62 @@ { int rc = 0; Slapi_Value *val = 0; + Slapi_Value *op_this_val = 0; int last_size = 0; char *last_str = 0; int hint = slapi_attr_first_value(attr, &val); + op_this_val = slapi_value_new_string(op_this); + while(val) { char *dn_str = 0; - struct berval *bv = (struct berval *)slapi_value_get_berval(val); + struct berval *bv = 0; - if(last_size > bv->bv_len) - { - dn_str = last_str; - } - else + /* We don't want to process a memberOf operation on ourselves. */ + if(0 != memberof_compare(config, &val, &op_this_val)) { - int the_size = (bv->bv_len * 2) + 1; + bv = (struct berval *)slapi_value_get_berval(val); - if(last_str) - slapi_ch_free_string(&last_str); + if(last_size > bv->bv_len) + { + dn_str = last_str; + } + else + { + int the_size = (bv->bv_len * 2) + 1; - dn_str = (char*)slapi_ch_malloc(the_size); + if(last_str) + slapi_ch_free_string(&last_str); - last_str = dn_str; - last_size = the_size; - } + dn_str = (char*)slapi_ch_malloc(the_size); - memset(dn_str, 0, last_size); + last_str = dn_str; + last_size = the_size; + } - strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len); + memset(dn_str, 0, last_size); - /* If we're doing a replace (as we would in the MODRDN case), we need - * to specify the new group DN value */ - if(mod == LDAP_MOD_REPLACE) - { - memberof_modop_one_replace_r(pb, config, mod, group_dn, op_this, group_dn, - dn_str, stack); - } - else - { - memberof_modop_one_r(pb, config, mod, group_dn, op_this, dn_str, stack); + strncpy(dn_str, bv->bv_val, (size_t)bv->bv_len); + + /* If we're doing a replace (as we would in the MODRDN case), we need + * to specify the new group DN value */ + if(mod == LDAP_MOD_REPLACE) + { + memberof_modop_one_replace_r(pb, config, mod, group_dn, op_this, + group_dn, dn_str, stack); + } + else + { + memberof_modop_one_r(pb, config, mod, group_dn, op_this, dn_str, stack); + } } hint = slapi_attr_next_value(attr, hint, &val); } + slapi_value_free(&op_this_val); + if(last_str) slapi_ch_free_string(&last_str); From fedora-directory-commits at redhat.com Thu Jun 26 22:44:23 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Thu, 26 Jun 2008 18:44:23 -0400 Subject: [Fedora-directory-commits] dsgw configure.ac, 1.11, 1.12 aclocal.m4, 1.16, 1.17 configure, 1.19, 1.20 missing, 1.15, 1.16 install-sh, 1.15, 1.16 Makefile.in, 1.20, 1.21 depcomp, 1.15, 1.16 config.sub, 1.15, 1.16 config.guess, 1.15, 1.16 compile, 1.15, 1.16 Message-ID: <200806262244.m5QMiNBa008688@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8590/dsgw Modified Files: configure.ac aclocal.m4 configure missing install-sh Makefile.in depcomp config.sub config.guess compile Log Message: Resolves: bug 453052 Bug Description: DSGW uses wrong directory for cookies on HP-UX Reviewed by: trivial Fix Description: Use /var/opt/dirsrv/dsgw/run/cookies Platforms tested: HP-UX Flag Day: no Doc impact: no Index: configure.ac =================================================================== RCS file: /cvs/dirsec/dsgw/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- configure.ac 20 Mar 2008 02:18:39 -0000 1.11 +++ configure.ac 26 Jun 2008 22:44:17 -0000 1.12 @@ -247,6 +247,8 @@ # relative to libdir cgibindir=/$PACKAGE_NAME/dsgw-cgi-bin perldir=/$PACKAGE_NAME/perl + # relative to $localstatedir + cookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies elif test "$with_fhs_opt" = "yes"; then # relative to datadir htmldir=/dsgw/html @@ -265,6 +267,8 @@ perldir=/perl # same as server's cgibindir cgibindir=/dsgw-cgi-bin + # relative to $localstatedir + cookiedir=/$PACKAGE_BASE_NAME/dsgw/run/cookies else # relative to datadir htmldir=/$PACKAGE_BASE_NAME/dsgw/html @@ -283,13 +287,13 @@ perldir=/$PACKAGE_BASE_NAME/perl # CGI program directory cgibindir=/$PACKAGE_BASE_NAME/dsgw-cgi-bin + # relative to $localstatedir + cookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies fi # relative to instconfigdir contextdir=/dsgw securitydir=/dsgw -# relative to $localstatedir -cookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies # URIs cgiuri=/dsgwcmd dsgwuri=/dsgw Index: configure =================================================================== RCS file: /cvs/dirsec/dsgw/configure,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- configure 20 Mar 2008 02:18:39 -0000 1.19 +++ configure 26 Jun 2008 22:44:17 -0000 1.20 @@ -21396,6 +21396,8 @@ # relative to libdir cgibindir=/$PACKAGE_NAME/dsgw-cgi-bin perldir=/$PACKAGE_NAME/perl + # relative to $localstatedir + cookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies elif test "$with_fhs_opt" = "yes"; then # relative to datadir htmldir=/dsgw/html @@ -21414,6 +21416,8 @@ perldir=/perl # same as server's cgibindir cgibindir=/dsgw-cgi-bin + # relative to $localstatedir + cookiedir=/$PACKAGE_BASE_NAME/dsgw/run/cookies else # relative to datadir htmldir=/$PACKAGE_BASE_NAME/dsgw/html @@ -21432,13 +21436,13 @@ perldir=/$PACKAGE_BASE_NAME/perl # CGI program directory cgibindir=/$PACKAGE_BASE_NAME/dsgw-cgi-bin + # relative to $localstatedir + cookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies fi # relative to instconfigdir contextdir=/dsgw securitydir=/dsgw -# relative to $localstatedir -cookiedir=/run/$PACKAGE_BASE_NAME/dsgw/cookies # URIs cgiuri=/dsgwcmd dsgwuri=/dsgw From fedora-directory-commits at redhat.com Fri Jun 27 18:49:20 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 27 Jun 2008 14:49:20 -0400 Subject: [Fedora-directory-commits] dsgw/config/es display-ntperson.html.in, 1.2, 1.3 display-orgperson.html.in, 1.2, 1.3 Message-ID: <200806271849.m5RInKBs031285@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/config/es In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31194/dsgw/config/es Modified Files: display-ntperson.html.in display-orgperson.html.in Log Message: Resolves: bug 171353 Bug Description: Unable to download a certificate from Gateway/Phonebook Reviewed by: trivial Fix Description: Have to support both "userCertificate;binary" and "userCertificate" Platforms tested: HP-UX Flag Day: no Doc impact: no Index: display-ntperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/es/display-ntperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-ntperson.html.in 6 Mar 2008 22:00:14 -0000 1.2 +++ display-ntperson.html.in 27 Jun 2008 18:49:18 -0000 1.3 @@ -106,6 +106,13 @@ >Recibir certificado + + + +>Recibir certificado + +    Index: display-orgperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/es/display-orgperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-orgperson.html.in 6 Mar 2008 22:00:14 -0000 1.2 +++ display-orgperson.html.in 27 Jun 2008 18:49:18 -0000 1.3 @@ -106,6 +106,13 @@ >Recibir certificado + + + +>Recibir certificado + +    From fedora-directory-commits at redhat.com Fri Jun 27 18:49:20 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 27 Jun 2008 14:49:20 -0400 Subject: [Fedora-directory-commits] dsgw/config/fr display-ntperson.html.in, 1.2, 1.3 display-orgperson.html.in, 1.2, 1.3 Message-ID: <200806271849.m5RInK7l031292@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/config/fr In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31194/dsgw/config/fr Modified Files: display-ntperson.html.in display-orgperson.html.in Log Message: Resolves: bug 171353 Bug Description: Unable to download a certificate from Gateway/Phonebook Reviewed by: trivial Fix Description: Have to support both "userCertificate;binary" and "userCertificate" Platforms tested: HP-UX Flag Day: no Doc impact: no Index: display-ntperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/fr/display-ntperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-ntperson.html.in 6 Mar 2008 22:00:14 -0000 1.2 +++ display-ntperson.html.in 27 Jun 2008 18:49:18 -0000 1.3 @@ -106,6 +106,13 @@ >Download Certificate + + + +>Download Certificate + +    Index: display-orgperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/fr/display-orgperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-orgperson.html.in 6 Mar 2008 22:00:14 -0000 1.2 +++ display-orgperson.html.in 27 Jun 2008 18:49:18 -0000 1.3 @@ -106,6 +106,13 @@ >Télécharger un certificat + + + +>Télécharger un certificat + +    From fedora-directory-commits at redhat.com Fri Jun 27 18:49:20 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 27 Jun 2008 14:49:20 -0400 Subject: [Fedora-directory-commits] dsgw/config/ja display-ntperson.html.in, 1.2, 1.3 display-orgperson.html.in, 1.2, 1.3 Message-ID: <200806271849.m5RInKJY031299@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/config/ja In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31194/dsgw/config/ja Modified Files: display-ntperson.html.in display-orgperson.html.in Log Message: Resolves: bug 171353 Bug Description: Unable to download a certificate from Gateway/Phonebook Reviewed by: trivial Fix Description: Have to support both "userCertificate;binary" and "userCertificate" Platforms tested: HP-UX Flag Day: no Doc impact: no Index: display-ntperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/ja/display-ntperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-ntperson.html.in 6 Mar 2008 22:00:15 -0000 1.2 +++ display-ntperson.html.in 27 Jun 2008 18:49:18 -0000 1.3 @@ -107,6 +107,13 @@ >Download Certificate + + + +>Download Certificate + +    Index: display-orgperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/ja/display-orgperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-orgperson.html.in 6 Mar 2008 22:00:15 -0000 1.2 +++ display-orgperson.html.in 27 Jun 2008 18:49:18 -0000 1.3 @@ -107,6 +107,13 @@ >?????????????????????????????? + + + +>?????????????????????????????? + +    From fedora-directory-commits at redhat.com Fri Jun 27 18:49:22 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 27 Jun 2008 14:49:22 -0400 Subject: [Fedora-directory-commits] dsgw/pbconfig display-orgperson.html.in, 1.2, 1.3 Message-ID: <200806271849.m5RInMlw031305@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/pbconfig In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31194/dsgw/pbconfig Modified Files: display-orgperson.html.in Log Message: Resolves: bug 171353 Bug Description: Unable to download a certificate from Gateway/Phonebook Reviewed by: trivial Fix Description: Have to support both "userCertificate;binary" and "userCertificate" Platforms tested: HP-UX Flag Day: no Doc impact: no Index: display-orgperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/pbconfig/display-orgperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-orgperson.html.in 6 Mar 2008 22:00:40 -0000 1.2 +++ display-orgperson.html.in 27 Jun 2008 18:49:18 -0000 1.3 @@ -164,6 +164,14 @@ onMouseOver="top.status='Retrieve this person\'s security certificate.'; return true">Click to retrieve this 
 person's security certificate. Get Certificate + + +    + +onMouseOver="top.status='Retrieve this person\'s security certificate.'; return true">Click to retrieve this 
+person's security certificate. Get Certificate +   From fedora-directory-commits at redhat.com Fri Jun 27 18:49:19 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 27 Jun 2008 14:49:19 -0400 Subject: [Fedora-directory-commits] dsgw/config display-ntperson.html.in, 1.3, 1.4 display-orgperson.html.in, 1.3, 1.4 Message-ID: <200806271849.m5RInnPL031311@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/config In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31194/dsgw/config Modified Files: display-ntperson.html.in display-orgperson.html.in Log Message: Resolves: bug 171353 Bug Description: Unable to download a certificate from Gateway/Phonebook Reviewed by: trivial Fix Description: Have to support both "userCertificate;binary" and "userCertificate" Platforms tested: HP-UX Flag Day: no Doc impact: no Index: display-ntperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/display-ntperson.html.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- display-ntperson.html.in 20 Mar 2008 02:18:40 -0000 1.3 +++ display-ntperson.html.in 27 Jun 2008 18:49:17 -0000 1.4 @@ -144,6 +144,13 @@ >Download Certificate + + + +>Download Certificate + +    Index: display-orgperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/display-orgperson.html.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- display-orgperson.html.in 20 Mar 2008 02:18:40 -0000 1.3 +++ display-orgperson.html.in 27 Jun 2008 18:49:17 -0000 1.4 @@ -146,6 +146,13 @@ >Download Certificate + + + +>Download Certificate + +    From fedora-directory-commits at redhat.com Fri Jun 27 18:49:20 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Fri, 27 Jun 2008 14:49:20 -0400 Subject: [Fedora-directory-commits] dsgw/config/de display-ntperson.html.in, 1.2, 1.3 display-orgperson.html.in, 1.2, 1.3 Message-ID: <200806271849.m5RInoQv031315@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/dsgw/config/de In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31194/dsgw/config/de Modified Files: display-ntperson.html.in display-orgperson.html.in Log Message: Resolves: bug 171353 Bug Description: Unable to download a certificate from Gateway/Phonebook Reviewed by: trivial Fix Description: Have to support both "userCertificate;binary" and "userCertificate" Platforms tested: HP-UX Flag Day: no Doc impact: no Index: display-ntperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/de/display-ntperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-ntperson.html.in 6 Mar 2008 22:00:11 -0000 1.2 +++ display-ntperson.html.in 27 Jun 2008 18:49:17 -0000 1.3 @@ -106,6 +106,13 @@ >Download Certificate + + + +>Download Certificate + +    Index: display-orgperson.html.in =================================================================== RCS file: /cvs/dirsec/dsgw/config/de/display-orgperson.html.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- display-orgperson.html.in 6 Mar 2008 22:00:11 -0000 1.2 +++ display-orgperson.html.in 27 Jun 2008 18:49:17 -0000 1.3 @@ -107,6 +107,13 @@ >Zertifikat laden + + + +>Zertifikat laden + +    From fedora-directory-commits at redhat.com Fri Jun 27 19:28:24 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jun 2008 15:28:24 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd charray.c, 1.6, 1.7 opshared.c, 1.11, 1.12 pblock.c, 1.13, 1.14 result.c, 1.12, 1.13 schema.c, 1.14, 1.15 search.c, 1.8, 1.9 slapi-plugin.h, 1.22, 1.23 slapi-private.h, 1.23, 1.24 Message-ID: <200806271928.m5RJSOZN006843@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6584/ldap/servers/slapd Modified Files: charray.c opshared.c pblock.c result.c schema.c search.c slapi-plugin.h slapi-private.h Log Message: Resolves: #437525 Summary: GER: allow GER for non-existing entries Description: [slapd/charray.c] new: charray_merge_nodup -- merge 2 string arrays skipping the duplicates modified: charray_remove -- introduced "freeit" flag. If true, the removed string is freed. (The API is used only in chainingdb. The change is applied to the plugin.) [slapd/opshared.c] modified: check OP_FLAG_GET_EFFECTIVE_RIGHTS in the iterate to support "@". It's needed to do at the location since we have to call acl plugin even when no entries are returned from the search. If no entries are returned and "@" is found in the attribute list, acl effective rights code generates the corresponding template entry. [slapd/pblock.c] place to store gerattrs is added (SLAPI_SEARCH_GERATTRS), where gerattrs is an array of strings which store "...@". [slapd/result.c] moved OP_FLAG_GET_EFFECTIVE_RIGHTS checking to iterate (opshared.c) [slapd/schema.c] new: slapi_schema_list_objectclass_attributes -- return the required and/or allowed attributes belonging to the given objectclass. This is used to support "*" and "+" in the get effective rights. new: slapi_schema_get_superior_name -- return the superior objectclass name of the given objectclass. [slapd/search.c] if "@" is found in the attribute list, cut the part out and added to the attrs array (pblock SLAPI_SEARCH_ATTRS) and store the original string to the gerattrs (pblock SLAPI_SEARCH_GERATTRS). [plugin/acl/acleffectiverights.c] modified: _ger_g_permission_granted -- if the requester and the subject user are identical, give "g" permission modified: _ger_parse_control -- replaced strcpy with memmove since strcpy does not guarantee the result of the overlap copy. modified: _ger_get_attrs_rights -- support "*" (all attributes belonging to the object) and "+" (operational attributes). If repeated attributes are found in the given attribute list, they are reduced to one. new: _ger_generate_template_entry -- generate a template entry if "@" is passed. [pluginc/cb/*] adjusted to the updated charray_remove. Please see also this wiki page for the overview and test cases. http://directory.fedoraproject.org/wiki/Get_Effective_Rights_for_non-present_attributes Index: charray.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/charray.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- charray.c 10 Nov 2006 23:45:40 -0000 1.6 +++ charray.c 27 Jun 2008 19:28:21 -0000 1.7 @@ -118,6 +118,48 @@ (*a)[n + nn] = NULL; } +/* + * charray_merge_nodup: + * merge a string array (second arg) into the first string array + * unless the each string is in the first string array. + */ +void +charray_merge_nodup( + char ***a, + char **s, + int copy_strs +) +{ + int i, j, n, nn; + char **dupa; + + if ( (s == NULL) || (s[0] == NULL) ) + return; + + for ( n = 0; *a != NULL && (*a)[n] != NULL; n++ ) { + ; /* NULL */ + } + for ( nn = 0; s[nn] != NULL; nn++ ) { + ; /* NULL */ + } + + dupa = (char **)slapi_ch_calloc(1, (n+nn+1) * sizeof(char *)); + memcpy(dupa, *a, sizeof(char *) * n); + slapi_ch_free((void **)a); + + for ( i = 0, j = 0; i < nn; i++ ) { + if (!charray_inlist(dupa, s[i])) { /* skip if s[i] is already in *a */ + if ( copy_strs ) { + dupa[n+j] = slapi_ch_strdup( s[i] ); + } else { + dupa[n+j] = s[i]; + } + j++; + } + } + *a = dupa; +} + /* Routines which don't pound on malloc. Don't interchange the arrays with the * regular calls---they can end up freeing non-heap memory, which is wrong */ @@ -337,13 +379,15 @@ * Remove the char string from the array of char strings. * Performs a case *insensitive* comparison! * Just shunts the strings down to cover the deleted string. - * Doesn't free up the unused memory. + * freeit: none zero -> free the found string + * : zero -> Doesn't free up the unused memory. * Returns 1 if the entry found and removed, 0 if not. */ int charray_remove( char **a, - const char *s + const char *s, + int freeit ) { int i; @@ -353,6 +397,10 @@ if ( !found && strcasecmp (a[i],s) == 0 ) { found= 1; + if (freeit) + { + slapi_ch_free_string(&a[i]); + } } if (found) { Index: opshared.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/opshared.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- opshared.c 18 Oct 2007 00:08:34 -0000 1.11 +++ opshared.c 27 Jun 2008 19:28:21 -0000 1.12 @@ -953,67 +953,188 @@ int rc; int attrsonly; int done = 0; - Slapi_Entry *e; + Slapi_Entry *e = NULL; char **attrs = NULL; slapi_pblock_get(pb, SLAPI_SEARCH_ATTRS, &attrs); slapi_pblock_get(pb, SLAPI_SEARCH_ATTRSONLY, &attrsonly); - *pnentries = 0; + *pnentries = 0; while (!done) - { - rc = be->be_next_search_entry(pb); - if (rc < 0) - { - /* - * Some exceptional condition occurred. Results have been sent, so we're finished. - */ - if (rc == SLAPI_FAIL_DISKFULL) - { - operation_out_of_disk_space(); - } - return -1; - } - else - { - slapi_pblock_get(pb, SLAPI_SEARCH_RESULT_ENTRY, &e); - if (e == NULL) - { - /* no more entries */ - done = 1; - continue; - } - } - - if (process_entry(pb, e, send_result)) - { - /* shouldn't send this entry */ - continue; - } - - /* - * It's a regular entry, or it's a referral and - * managedsait control is on. In either case, send - * the entry. - */ - switch (send_ldap_search_entry(pb, e, NULL, attrs, attrsonly)) - { - case 0: /* entry sent ok */ - (*pnentries)++; - slapi_pblock_set(pb, SLAPI_NENTRIES, pnentries); - break; - case 1: /* entry not sent */ - break; - case -1: /* connection closed */ - /* - * mark the operation as abandoned so the backend - * next entry function gets called again and has - * a chance to clean things up. - */ - pb->pb_op->o_status = SLAPI_OP_STATUS_ABANDONED; - break; - } + { + Slapi_Entry *gerentry = NULL; + Slapi_Operation *operation; + + rc = be->be_next_search_entry(pb); + if (rc < 0) + { + /* + * Some exceptional condition occurred. Results have been sent, so we're finished. + */ + if (rc == SLAPI_FAIL_DISKFULL) + { + operation_out_of_disk_space(); + } + return -1; + } + + slapi_pblock_get(pb, SLAPI_SEARCH_RESULT_ENTRY, &e); + + /* Check for possible get_effective_rights control */ + slapi_pblock_get (pb, SLAPI_OPERATION, &operation); + if ( operation->o_flags & OP_FLAG_GET_EFFECTIVE_RIGHTS ) + { + char *errbuf = NULL; + char **gerattrs = NULL; + char **gerattrsdup = NULL; + char **gap = NULL; + char *gapnext = NULL; + + slapi_pblock_get( pb, SLAPI_SEARCH_GERATTRS, &gerattrs ); + + gerattrsdup = cool_charray_dup(gerattrs); + gap = gerattrsdup; + do + { + gapnext = NULL; + if (gap) + { + if (*gap && *(gap+1)) + { + gapnext = *(gap+1); + *(gap+1) = NULL; + } + slapi_pblock_set( pb, SLAPI_SEARCH_GERATTRS, gap ); + rc = plugin_call_acl_plugin (pb, e, attrs, NULL, + SLAPI_ACL_ALL, ACLPLUGIN_ACCESS_GET_EFFECTIVE_RIGHTS, + &errbuf); + if (NULL != gapnext) + { + *(gap+1) = gapnext; + } + } + else if (NULL != e) + { + rc = plugin_call_acl_plugin (pb, e, attrs, NULL, + SLAPI_ACL_ALL, ACLPLUGIN_ACCESS_GET_EFFECTIVE_RIGHTS, + &errbuf); + } + if (NULL == e) { + /* get the template entry, if any */ + slapi_pblock_get(pb, SLAPI_SEARCH_RESULT_ENTRY, &e); + if (NULL == e) { + /* everything is ok - don't send the result */ + return 1; + } + gerentry = e; + } + if ( rc != LDAP_SUCCESS ) { + /* Send error result and + abort op if the control is critical */ + LDAPDebug( LDAP_DEBUG_ANY, + "Failed to get effective rights for entry (%s), rc=%d\n", + slapi_entry_get_dn_const(e), rc, 0 ); + send_ldap_result( pb, rc, NULL, errbuf, 0, NULL ); + slapi_ch_free ( (void**)&errbuf ); + if (gerentry) + { + slapi_pblock_set(pb, + SLAPI_SEARCH_RESULT_ENTRY, NULL); + slapi_entry_free(gerentry); + gerentry = e = NULL; + } + return( -1 ); + } + slapi_ch_free ( (void**)&errbuf ); + if (process_entry(pb, e, send_result)) + { + /* shouldn't send this entry */ + if (gerentry) + { + slapi_pblock_set(pb, + SLAPI_SEARCH_RESULT_ENTRY, NULL); + slapi_entry_free(gerentry); + gerentry = e = NULL; + } + continue; + } + + /* + * It's a regular entry, or it's a referral and + * managedsait control is on. In either case, send + * the entry. + */ + switch (send_ldap_search_entry(pb, e, + NULL, attrs, attrsonly)) + { + case 0: /* entry sent ok */ + (*pnentries)++; + slapi_pblock_set(pb, SLAPI_NENTRIES, pnentries); + break; + case 1: /* entry not sent */ + break; + case -1: /* connection closed */ + /* + * mark the operation as abandoned so the backend + * next entry function gets called again and has + * a chance to clean things up. + */ + pb->pb_op->o_status = SLAPI_OP_STATUS_ABANDONED; + break; + } + if (gerentry) + { + slapi_pblock_set(pb, SLAPI_SEARCH_RESULT_ENTRY, NULL); + slapi_entry_free(gerentry); + gerentry = e = NULL; + } + } + while (gap && ++gap && *gap); + slapi_pblock_set( pb, SLAPI_SEARCH_GERATTRS, gerattrs ); + cool_charray_free(gerattrsdup); + if (NULL == e) + { + /* no more entries */ + done = 1; + } + } + else if (e) + { + if (process_entry(pb, e, send_result)) + { + /* shouldn't send this entry */ + continue; + } + + /* + * It's a regular entry, or it's a referral and + * managedsait control is on. In either case, send + * the entry. + */ + switch (send_ldap_search_entry(pb, e, NULL, attrs, attrsonly)) + { + case 0: /* entry sent ok */ + (*pnentries)++; + slapi_pblock_set(pb, SLAPI_NENTRIES, pnentries); + break; + case 1: /* entry not sent */ + break; + case -1: /* connection closed */ + /* + * mark the operation as abandoned so the backend + * next entry function gets called again and has + * a chance to clean things up. + */ + pb->pb_op->o_status = SLAPI_OP_STATUS_ABANDONED; + break; + } + } + else + { + /* no more entries */ + done = 1; + } } return 1; Index: pblock.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/pblock.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- pblock.c 4 Jun 2008 22:22:55 -0000 1.13 +++ pblock.c 27 Jun 2008 19:28:21 -0000 1.14 @@ -1231,6 +1231,12 @@ (*(char ***)value) = pblock->pb_op->o_params.p.p_search.search_attrs; } break; + case SLAPI_SEARCH_GERATTRS: + if(pblock->pb_op!=NULL) + { + (*(char ***)value) = pblock->pb_op->o_params.p.p_search.search_gerattrs; + } + break; case SLAPI_SEARCH_ATTRSONLY: if(pblock->pb_op!=NULL) { @@ -2509,6 +2515,12 @@ pblock->pb_op->o_params.p.p_search.search_attrs = (char **) value; } break; + case SLAPI_SEARCH_GERATTRS: + if(pblock->pb_op!=NULL) + { + pblock->pb_op->o_params.p.p_search.search_gerattrs = (char **) value; + } + break; case SLAPI_SEARCH_ATTRSONLY: if(pblock->pb_op!=NULL) { Index: result.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/result.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- result.c 18 Oct 2007 00:08:34 -0000 1.12 +++ result.c 27 Jun 2008 19:28:21 -0000 1.13 @@ -1203,14 +1203,15 @@ int *dontsendattr= NULL; Slapi_Operation *operation; int real_attrs_only = 0; - LDAPControl **ctrlp = 0; + LDAPControl **ctrlp = 0; + Slapi_Entry *gerentry = NULL; slapi_pblock_get (pb, SLAPI_OPERATION, &operation); LDAPDebug( LDAP_DEBUG_TRACE, "=> send_ldap_search_entry (%s)\n", - slapi_entry_get_dn_const(e), 0, 0 ); + e?slapi_entry_get_dn_const(e):"null", 0, 0 ); - if ( conn == NULL ) { + if ( conn == NULL && e ) { if ( op->o_search_entry_handler != NULL ) { if (( rc = (*op->o_search_entry_handler)( pb->pb_backend, conn, op, e )) == 0 ) { @@ -1224,7 +1225,7 @@ } #if !defined(DISABLE_ACL_CHECK) - if ( plugin_call_acl_plugin (pb, e, attrs, NULL, + if ( e && plugin_call_acl_plugin (pb, e, attrs, NULL, SLAPI_ACL_READ, ACLPLUGIN_ACCESS_READ_ON_ENTRY, NULL ) != LDAP_SUCCESS ) { LDAPDebug( LDAP_DEBUG_ACL, "acl: access to entry not allowed\n", 0, 0, 0 ); @@ -1232,21 +1233,8 @@ } #endif - /* Check for possible get_effective_rights control */ - if ( operation->o_flags & OP_FLAG_GET_EFFECTIVE_RIGHTS ) { - char *errbuf = NULL; - rc = plugin_call_acl_plugin (pb, e, attrs, NULL, SLAPI_ACL_ALL, - ACLPLUGIN_ACCESS_GET_EFFECTIVE_RIGHTS, &errbuf); - if ( rc != LDAP_SUCCESS ) { - LDAPDebug( LDAP_DEBUG_ANY, - "Failed to get effective rights for entry (%s), rc=%d\n", - slapi_entry_get_dn_const(e), rc, 0 ); - /* Send error result and abort op if the control is critical */ - send_ldap_result( pb, rc, NULL, errbuf, 0, NULL ); - slapi_ch_free ( (void**)&errbuf ); - return( -1 ); - } - slapi_ch_free ( (void**)&errbuf ); + if (NULL == e) { + return 1; /* everything is ok - don't send the result */ } if ( (ber = der_alloc()) == NULL ) { @@ -1454,6 +1442,10 @@ } } + if (gerentry) + { + slapi_entry_free(gerentry); + } LDAPDebug( LDAP_DEBUG_TRACE, "<= send_ldap_search_entry\n", 0, 0, 0 ); exit: return( rc ); Index: schema.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/schema.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- schema.c 10 Jun 2008 18:50:07 -0000 1.14 +++ schema.c 27 Jun 2008 19:28:21 -0000 1.15 @@ -641,41 +641,41 @@ oc_check_required( Slapi_PBlock *pb, Slapi_Entry *e, struct objclass *oc ) { int i; - int rc = 0; /* success, by default */ + int rc = 0; /* success, by default */ Slapi_Attr *a; if (oc == NULL || oc->oc_required == NULL || oc->oc_required[0] == NULL) { - return 0; /* success, as none required */ + return 0; /* success, as none required */ } /* for each required attribute */ for ( i = 0; oc->oc_required[i] != NULL; i++ ) { /* see if it's in the entry */ for ( a = e->e_attrs; a != NULL; a = a->a_next ) { - if ( slapi_attr_type_cmp( oc->oc_required[i], a->a_type, - SLAPI_TYPE_CMP_SUBTYPE ) == 0 ) { - break; - } - } - - /* not there => schema violation */ - if ( a == NULL ) { - char errtext[ BUFSIZ ]; - char ebuf[ BUFSIZ ]; - LDAPDebug( LDAP_DEBUG_ANY, - "Entry \"%s\" missing attribute \"%s\" required" - " by object class \"%s\"\n", - escape_string( slapi_entry_get_dn_const(e), ebuf ), - oc->oc_required[i], oc->oc_name); - if (pb) { - PR_snprintf( errtext, sizeof( errtext ), - "missing attribute \"%s\" required" - " by object class \"%s\"\n", - oc->oc_required[i], oc->oc_name ); - slapi_pblock_set( pb, SLAPI_PB_RESULT_TEXT, errtext ); - } - rc = 1; /* failure */ - } + if ( slapi_attr_type_cmp( oc->oc_required[i], a->a_type, + SLAPI_TYPE_CMP_SUBTYPE ) == 0 ) { + break; + } + } + + /* not there => schema violation */ + if ( a == NULL ) { + char errtext[ BUFSIZ ]; + char ebuf[ BUFSIZ ]; + LDAPDebug( LDAP_DEBUG_ANY, + "Entry \"%s\" missing attribute \"%s\" required" + " by object class \"%s\"\n", + escape_string( slapi_entry_get_dn_const(e), ebuf ), + oc->oc_required[i], oc->oc_name); + if (pb) { + PR_snprintf( errtext, sizeof( errtext ), + "missing attribute \"%s\" required" + " by object class \"%s\"\n", + oc->oc_required[i], oc->oc_name ); + slapi_pblock_set( pb, SLAPI_PB_RESULT_TEXT, errtext ); + } + rc = 1; /* failure */ + } } return rc; @@ -1392,8 +1392,8 @@ } /* Return the list of attributes names matching attribute flags */ - -char ** slapi_schema_list_attribute_names(unsigned long flag) +char ** +slapi_schema_list_attribute_names(unsigned long flag) { struct listargs aew; memset(&aew,0,sizeof(struct listargs)); @@ -4966,3 +4966,69 @@ return LDAP_LOCAL_ERROR; } } + +/* + * slapi_schema_list_objectclass_attributes: + * Return the list of attributes belonging to the objectclass + * + * The caller is responsible to free the returned list with charray_free. + * flags: one of them or both: + * SLAPI_OC_FLAG_REQUIRED + * SLAPI_OC_FLAG_ALLOWED + */ +char ** +slapi_schema_list_objectclass_attributes(const char *ocname_or_oid, + PRUint32 flags) +{ + struct objclass *oc = NULL; + char **attrs = NULL; + PRUint32 mask = SLAPI_OC_FLAG_REQUIRED | SLAPI_OC_FLAG_ALLOWED; + + if (!flags) { + return attrs; + } + + oc_lock_read(); + oc = oc_find_nolock(ocname_or_oid); + if (oc) { + switch (flags & mask) { + case SLAPI_OC_FLAG_REQUIRED: + attrs = charray_dup(oc->oc_required); + break; + case SLAPI_OC_FLAG_ALLOWED: + attrs = charray_dup(oc->oc_allowed); + break; + case SLAPI_OC_FLAG_REQUIRED|SLAPI_OC_FLAG_ALLOWED: + attrs = charray_dup(oc->oc_required); + charray_merge(&attrs, oc->oc_allowed, 1/*copy_strs*/); + break; + default: + slapi_log_error( SLAPI_LOG_FATAL, "list objectclass attributes", + "flag 0x%x not supported\n", flags ); + break; + } + } + oc_unlock(); + return attrs; +} + +/* + * slapi_schema_get_superior_name: + * Return the name of the superior objectclass + * + * The caller is responsible to free the returned name + */ +char * +slapi_schema_get_superior_name(const char *ocname_or_oid) +{ + struct objclass *oc = NULL; + char *superior = NULL; + + oc_lock_read(); + oc = oc_find_nolock(ocname_or_oid); + if (oc) { + superior = slapi_ch_strdup(oc->oc_superior); + } + oc_unlock(); + return superior; +} Index: search.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/search.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- search.c 18 Oct 2007 00:08:34 -0000 1.8 +++ search.c 27 Jun 2008 19:28:21 -0000 1.9 @@ -65,92 +65,93 @@ do_search( Slapi_PBlock *pb ) { Slapi_Operation *operation; - BerElement *ber; - int i, err, attrsonly; - ber_int_t scope, deref, sizelimit, timelimit; - char *base = NULL, *fstr = NULL; - struct slapi_filter *filter = NULL; - char **attrs = NULL; - int psearch = 0; - struct berval *psbvp; - ber_int_t changetypes; + BerElement *ber; + int i, err, attrsonly; + ber_int_t scope, deref, sizelimit, timelimit; + char *base = NULL, *fstr = NULL; + struct slapi_filter *filter = NULL; + char **attrs = NULL; + char **gerattrs = NULL; + int psearch = 0; + struct berval *psbvp; + ber_int_t changetypes; int send_entchg_controls; int changesonly = 0; int rc = -1; char *original_base = 0; char *new_base = 0; - LDAPDebug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 ); + LDAPDebug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 ); slapi_pblock_get( pb, SLAPI_OPERATION, &operation); - ber = operation->o_ber; + ber = operation->o_ber; - /* count the search request */ - snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSearchOps); + /* count the search request */ + snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsSearchOps); - /* - * Parse the search request. It looks like this: - * - * SearchRequest := [APPLICATION 3] SEQUENCE { - * baseObject DistinguishedName, - * scope ENUMERATED { - * baseObject (0), - * singleLevel (1), - * wholeSubtree (2) - * }, - * derefAliases ENUMERATED { - * neverDerefaliases (0), - * derefInSearching (1), - * derefFindingBaseObj (2), - * alwaysDerefAliases (3) - * }, - * sizelimit INTEGER (0 .. 65535), - * timelimit INTEGER (0 .. 65535), - * attrsOnly BOOLEAN, - * filter Filter, - * attributes SEQUENCE OF AttributeType - * } - */ - - /* baseObject, scope, derefAliases, sizelimit, timelimit, attrsOnly */ - if ( ber_scanf( ber, "{aiiiib", &base, &scope, &deref, &sizelimit, &timelimit, &attrsonly ) == LBER_ERROR ){ - slapi_ch_free((void**)&base ); - log_search_access (pb, "???", -1, "???", "decoding error"); - send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0, NULL ); - return; - } - - /* - * ignore negative time and size limits since they make no sense - */ - if ( timelimit < 0 ) { + /* + * Parse the search request. It looks like this: + * + * SearchRequest := [APPLICATION 3] SEQUENCE { + * baseObject DistinguishedName, + * scope ENUMERATED { + * baseObject (0), + * singleLevel (1), + * wholeSubtree (2) + * }, + * derefAliases ENUMERATED { + * neverDerefaliases (0), + * derefInSearching (1), + * derefFindingBaseObj (2), + * alwaysDerefAliases (3) + * }, + * sizelimit INTEGER (0 .. 65535), + * timelimit INTEGER (0 .. 65535), + * attrsOnly BOOLEAN, + * filter Filter, + * attributes SEQUENCE OF AttributeType + * } + */ + + /* baseObject, scope, derefAliases, sizelimit, timelimit, attrsOnly */ + if ( ber_scanf( ber, "{aiiiib", &base, &scope, &deref, &sizelimit, &timelimit, &attrsonly ) == LBER_ERROR ){ + slapi_ch_free((void**)&base ); + log_search_access (pb, "???", -1, "???", "decoding error"); + send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0, NULL ); + return; + } + + /* + * ignore negative time and size limits since they make no sense + */ + if ( timelimit < 0 ) { timelimit = 0; - } - if ( sizelimit < 0 ) { + } + if ( sizelimit < 0 ) { sizelimit = 0; - } + } - if ( scope != LDAP_SCOPE_BASE && scope != LDAP_SCOPE_ONELEVEL + if ( scope != LDAP_SCOPE_BASE && scope != LDAP_SCOPE_ONELEVEL && scope != LDAP_SCOPE_SUBTREE ) { log_search_access (pb, base, scope, "???", "Unknown search scope"); - send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, + send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, "Unknown search scope", 0, NULL ); - goto free_and_return; - } - /* check and record the scope for snmp */ - if ( scope == LDAP_SCOPE_ONELEVEL) { + goto free_and_return; + } + /* check and record the scope for snmp */ + if ( scope == LDAP_SCOPE_ONELEVEL) { /* count the one level search request */ snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsOneLevelSearchOps); - } else if (scope == LDAP_SCOPE_SUBTREE) { + } else if (scope == LDAP_SCOPE_SUBTREE) { /* count the subtree search request */ snmp_increment_counter(g_get_global_snmp_vars()->ops_tbl.dsWholeSubtreeSearchOps); - } + } - /* filter - returns a "normalized" version */ - filter = NULL; - fstr = NULL; - if ( (err = get_filter( pb->pb_conn, ber, scope, &filter, &fstr )) != 0 ) { + /* filter - returns a "normalized" version */ + filter = NULL; + fstr = NULL; + if ( (err = get_filter( pb->pb_conn, ber, scope, &filter, &fstr )) != 0 ) { char *errtxt; if ( LDAP_UNWILLING_TO_PERFORM == err ) { @@ -159,18 +160,18 @@ errtxt = "Bad search filter"; } log_search_access( pb, base, scope, "???", errtxt ); - send_ldap_result( pb, err, NULL, errtxt, 0, NULL ); - goto free_and_return; - } - - /* attributes */ - attrs = NULL; - if ( ber_scanf( ber, "{v}}", &attrs ) == LBER_ERROR ) { + send_ldap_result( pb, err, NULL, errtxt, 0, NULL ); + goto free_and_return; + } + + /* attributes */ + attrs = NULL; + if ( ber_scanf( ber, "{v}}", &attrs ) == LBER_ERROR ) { log_search_access (pb, base, scope, fstr, "decoding error"); - send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0, + send_ldap_result( pb, LDAP_PROTOCOL_ERROR, NULL, NULL, 0, NULL ); - goto free_and_return; - } + goto free_and_return; + } /* * This search is performed against the legacy consumer, so ask explicitly @@ -186,56 +187,128 @@ charray_add(&attrs, slapi_attr_syntax_normalize("aci")); charray_add(&attrs, slapi_attr_syntax_normalize(LDAP_ALL_USER_ATTRS)); } - else + } + + if ( attrs != NULL ) { + int gerattrsiz = 1; + int gerattridx = 0; + int aciin = 0; + /* + * . store gerattrs if any + * . add "aci" once if "*" is given + */ + for ( i = 0; attrs[i] != NULL; i++ ) { - for ( i = 0; attrs[i] != NULL; i++ ) + char *p = NULL; + /* check if @ is included */ + p = strchr(attrs[i], '@'); + if ( p && '\0' != *(p+1) ) /* don't store "*@", e.g. */ { - if ( strcasecmp(attrs[i], LDAP_ALL_USER_ATTRS) == 0 ) + int j = 0; + if (gerattridx + 1 >= gerattrsiz) { - charray_add(&attrs, slapi_attr_syntax_normalize("aci")); - break; + char **tmpgerattrs; + gerattrsiz *= 2; + tmpgerattrs = + (char **)slapi_ch_calloc(1, gerattrsiz*sizeof(char *)); + if (NULL != gerattrs) + { + memcpy(tmpgerattrs, gerattrs, gerattrsiz*sizeof(char *)); + slapi_ch_free((void **)&gerattrs); + } + gerattrs = tmpgerattrs; } + for ( j = 0; gerattrs; j++ ) + { + char *attri = NULL; + if ( NULL == gerattrs[j] ) + { + if (0 == j) + { + /* first time */ + gerattrs[gerattridx++] = attrs[i]; + /* get rid of "@" part from the attr + list, which is needed only in gerattr list */ + *p = '\0'; + attri = slapi_ch_strdup(attrs[i]); + attrs[i] = attri; + *p = '@'; + } + else + { + break; /* done */ + } + } + else if ( 0 == strcasecmp( attrs[i], gerattrs[j] )) + { + /* skip if attrs[i] is already in gerattrs */ + continue; + } + else + { + char *q = strchr(gerattrs[j], '@'); /* q never be 0 */ + if ( 0 != strcasecmp( p+1, q+1 )) + { + /* you don't want to display the same template + entry multiple times */ + gerattrs[gerattridx++] = attrs[i]; + } + /* get rid of "@" part from the attr + list, which is needed only in gerattr list */ + *p = '\0'; + attri = slapi_ch_strdup(attrs[i]); + attrs[i] = attri; + *p = '@'; + } + } + } + else if ( !aciin && strcasecmp(attrs[i], LDAP_ALL_USER_ATTRS) == 0 ) + { + charray_add(&attrs, slapi_attr_syntax_normalize("aci")); + aciin = 1; } } + if (NULL != gerattrs) + { + gerattrs[gerattridx] = NULL; + } + + operation->o_searchattrs = cool_charray_dup( attrs ); + for ( i = 0; attrs[i] != NULL; i++ ) { + char *type; + + type = slapi_attr_syntax_normalize(attrs[i]); + slapi_ch_free( (void**)&(attrs[i]) ); + attrs[i] = type; + } + } + if ( slapd_ldap_debug & LDAP_DEBUG_ARGS ) { + char abuf[ 1024 ], *astr; + + if ( NULL == attrs ) { + astr = "ALL"; + } else { + strarray2str( attrs, abuf, sizeof( abuf ), 1 /* include quotes */); + astr = abuf; + } + slapi_log_error( SLAPI_LOG_ARGS, NULL, "SRCH base=\"%s\" " + "scope=%d deref=%d " + "sizelimit=%d timelimit=%d attrsonly=%d filter=\"%s\" " + "attrs=%s\n", base, scope, deref, sizelimit, timelimit, + attrsonly, fstr, astr ); } - if ( attrs != NULL ) { - operation->o_searchattrs = cool_charray_dup( attrs ); - for ( i = 0; attrs[i] != NULL; i++ ) { - char *type; - - type = slapi_attr_syntax_normalize(attrs[i]); - slapi_ch_free( (void**)&(attrs[i]) ); - attrs[i] = type; - } - } - if ( slapd_ldap_debug & LDAP_DEBUG_ARGS ) { - char abuf[ 1024 ], *astr; - - if ( NULL == attrs ) { - astr = "ALL"; - } else { - strarray2str( attrs, abuf, sizeof( abuf ), 1 /* include quotes */); - astr = abuf; - } - slapi_log_error( SLAPI_LOG_ARGS, NULL, "SRCH base=\"%s\" " - "scope=%d deref=%d " - "sizelimit=%d timelimit=%d attrsonly=%d filter=\"%s\" " - "attrs=%s\n", base, scope, deref, sizelimit, timelimit, - attrsonly, fstr, astr ); - } - - /* - * in LDAPv3 there can be optional control extensions on - * the end of an LDAPMessage. we need to read them in and - * pass them to the backend. get_ldapmessage_controls() - * reads the controls and sets any we know about in the pb. - */ - if ( (err = get_ldapmessage_controls( pb, ber, NULL )) != 0 ) { + /* + * in LDAPv3 there can be optional control extensions on + * the end of an LDAPMessage. we need to read them in and + * pass them to the backend. get_ldapmessage_controls() + * reads the controls and sets any we know about in the pb. + */ + if ( (err = get_ldapmessage_controls( pb, ber, NULL )) != 0 ) { log_search_access (pb, base, scope, fstr, "failed to decode LDAP controls"); - send_ldap_result( pb, err, NULL, NULL, 0, NULL ); - goto free_and_return; - } + send_ldap_result( pb, err, NULL, NULL, 0, NULL ); + goto free_and_return; + } /* we support persistent search for regular operations only */ if ( slapi_control_present( operation->o_params.request_controls, @@ -254,15 +327,16 @@ } } - slapi_pblock_set( pb, SLAPI_SEARCH_TARGET, base ); + slapi_pblock_set( pb, SLAPI_SEARCH_TARGET, base ); slapi_pblock_set( pb, SLAPI_ORIGINAL_TARGET_DN, slapi_ch_strdup(base) ); - slapi_pblock_set( pb, SLAPI_SEARCH_SCOPE, &scope ); - slapi_pblock_set( pb, SLAPI_SEARCH_DEREF, &deref ); - slapi_pblock_set( pb, SLAPI_SEARCH_FILTER, filter ); - slapi_pblock_set( pb, SLAPI_SEARCH_STRFILTER, fstr ); - slapi_pblock_set( pb, SLAPI_SEARCH_ATTRS, attrs ); - slapi_pblock_set( pb, SLAPI_SEARCH_ATTRSONLY, &attrsonly ); - slapi_pblock_set( pb, SLAPI_REQUESTOR_ISROOT, &operation->o_isroot ); + slapi_pblock_set( pb, SLAPI_SEARCH_SCOPE, &scope ); + slapi_pblock_set( pb, SLAPI_SEARCH_DEREF, &deref ); + slapi_pblock_set( pb, SLAPI_SEARCH_FILTER, filter ); + slapi_pblock_set( pb, SLAPI_SEARCH_STRFILTER, fstr ); + slapi_pblock_set( pb, SLAPI_SEARCH_ATTRS, attrs ); + slapi_pblock_set( pb, SLAPI_SEARCH_GERATTRS, gerattrs ); + slapi_pblock_set( pb, SLAPI_SEARCH_ATTRSONLY, &attrsonly ); + slapi_pblock_set( pb, SLAPI_REQUESTOR_ISROOT, &operation->o_isroot ); slapi_pblock_set( pb, SLAPI_SEARCH_SIZELIMIT, &sizelimit ); slapi_pblock_set( pb, SLAPI_SEARCH_TIMELIMIT, &timelimit ); @@ -277,23 +351,22 @@ slapi_pblock_get(pb, SLAPI_SEARCH_TARGET, &new_base); slapi_pblock_get (pb, SLAPI_PLUGIN_OPRETURN, &rc); - slapi_pblock_get( pb, SLAPI_SEARCH_FILTER, &filter ); + slapi_pblock_get( pb, SLAPI_SEARCH_FILTER, &filter ); - if ( psearch && rc == 0 ) { + if ( psearch && rc == 0 ) { ps_add( pb, changetypes, send_entchg_controls ); - } + } free_and_return:; - if ( !psearch || rc < 0 ) { + if ( !psearch || rc < 0 ) { if(original_base != new_base) { slapi_ch_free_string(&new_base); } - slapi_ch_free_string(&base); - slapi_ch_free_string(&fstr); - slapi_filter_free( filter, 1 ); - if ( attrs != NULL ) { - charray_free( attrs ); - } + slapi_ch_free_string(&base); + slapi_ch_free_string(&fstr); + slapi_filter_free( filter, 1 ); + charray_free( attrs ); /* passing NULL is fine */ + charray_free( gerattrs ); /* passing NULL is fine */ /* * Fix for defect 526719 / 553356 : Persistent search op failed. * Marking it as non-persistent so that operation resources get freed @@ -304,7 +377,7 @@ /* we strdup'd this above - need to free */ slapi_pblock_get(pb, SLAPI_ORIGINAL_TARGET_DN, &base); slapi_ch_free_string(&base); - } + } } static void log_search_access (Slapi_PBlock *pb, const char *base, int scope, const char *fstr, const char *msg) Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- slapi-plugin.h 4 Jun 2008 22:22:55 -0000 1.22 +++ slapi-plugin.h 27 Jun 2008 19:28:21 -0000 1.23 @@ -72,6 +72,9 @@ #define SLAPI_OP_FLAG_NEVER_CHAIN 0x00800 /* Do not chain the operation */ #define SLAPI_OP_FLAG_NO_ACCESS_CHECK 0x10000 /* Do not check for access control - bypass them */ +#define SLAPI_OC_FLAG_REQUIRED 0x0001 +#define SLAPI_OC_FLAG_ALLOWED 0x0002 + /* * access control levels */ @@ -1703,6 +1706,7 @@ #define SLAPI_SEARCH_FILTER 114 #define SLAPI_SEARCH_STRFILTER 115 #define SLAPI_SEARCH_ATTRS 116 +#define SLAPI_SEARCH_GERATTRS 1160 #define SLAPI_SEARCH_ATTRSONLY 117 #define SLAPI_SEARCH_IS_AND 118 Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- slapi-private.h 10 Jun 2008 18:50:07 -0000 1.23 +++ slapi-private.h 27 Jun 2008 19:28:21 -0000 1.24 @@ -574,6 +574,7 @@ char **search_attrs; int search_attrsonly; int search_is_and; + char **search_gerattrs; } p_search; struct abandon_parameters @@ -726,6 +727,11 @@ /* return the list of attr defined in the schema matching the attr flags */ char ** slapi_schema_list_attribute_names(unsigned long flag); +/* return the list of attributes belonging to the objectclass */ +char ** slapi_schema_list_objectclass_attributes(const char *ocname_or_oid, + PRUint32 flags); +char * slapi_schema_get_superior_name(const char *ocname_or_oid); + CSN *dup_global_schema_csn(); /* misc function for the chaining backend */ @@ -787,13 +793,14 @@ */ void charray_add( char ***a, char *s ); void charray_merge( char ***a, char **s, int copy_strs ); +void charray_merge_nodup( char ***a, char **s, int copy_strs ); void charray_free( char **array ); int charray_inlist( char **a, char *s ); int charray_utf8_inlist( char **a, char *s ); char ** charray_dup( char **a ); char ** str2charray( char *str, char *brkstr ); char ** str2charray_ext( char *str, char *brkstr, int allow_dups ); -int charray_remove(char **a,const char *s); +int charray_remove(char **a, const char *s, int freeit); char ** cool_charray_dup( char **a ); void cool_charray_free( char **array ); void charray_subtract( char **a, char **b, char ***c ); @@ -1124,10 +1131,6 @@ const char* escape_string (const char* str, char buf[BUFSIZ]); const char* escape_string_with_punctuation(const char* str, char buf[BUFSIZ]); const char* escape_filter_value(const char* str, int len, char buf[BUFSIZ]); -void charray_add( char ***a, char *s ); -void charray_free(char **array); -int charray_remove(char **a,const char *s); -int charray_inlist( char **a, char *s ); char *slapi_berval_get_string_copy(const struct berval *bval); From fedora-directory-commits at redhat.com Fri Jun 27 19:28:24 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jun 2008 15:28:24 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/chainingdb cb_config.c, 1.6, 1.7 cb_controls.c, 1.8, 1.9 cb_instance.c, 1.8, 1.9 Message-ID: <200806271928.m5RJSOPM006863@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6584/ldap/servers/plugins/chainingdb Modified Files: cb_config.c cb_controls.c cb_instance.c Log Message: Resolves: #437525 Summary: GER: allow GER for non-existing entries Description: [slapd/charray.c] new: charray_merge_nodup -- merge 2 string arrays skipping the duplicates modified: charray_remove -- introduced "freeit" flag. If true, the removed string is freed. (The API is used only in chainingdb. The change is applied to the plugin.) [slapd/opshared.c] modified: check OP_FLAG_GET_EFFECTIVE_RIGHTS in the iterate to support "@". It's needed to do at the location since we have to call acl plugin even when no entries are returned from the search. If no entries are returned and "@" is found in the attribute list, acl effective rights code generates the corresponding template entry. [slapd/pblock.c] place to store gerattrs is added (SLAPI_SEARCH_GERATTRS), where gerattrs is an array of strings which store "...@". [slapd/result.c] moved OP_FLAG_GET_EFFECTIVE_RIGHTS checking to iterate (opshared.c) [slapd/schema.c] new: slapi_schema_list_objectclass_attributes -- return the required and/or allowed attributes belonging to the given objectclass. This is used to support "*" and "+" in the get effective rights. new: slapi_schema_get_superior_name -- return the superior objectclass name of the given objectclass. [slapd/search.c] if "@" is found in the attribute list, cut the part out and added to the attrs array (pblock SLAPI_SEARCH_ATTRS) and store the original string to the gerattrs (pblock SLAPI_SEARCH_GERATTRS). [plugin/acl/acleffectiverights.c] modified: _ger_g_permission_granted -- if the requester and the subject user are identical, give "g" permission modified: _ger_parse_control -- replaced strcpy with memmove since strcpy does not guarantee the result of the overlap copy. modified: _ger_get_attrs_rights -- support "*" (all attributes belonging to the object) and "+" (operational attributes). If repeated attributes are found in the given attribute list, they are reduced to one. new: _ger_generate_template_entry -- generate a template entry if "@" is passed. [pluginc/cb/*] adjusted to the updated charray_remove. Please see also this wiki page for the overview and test cases. http://directory.fedoraproject.org/wiki/Get_Effective_Rights_for_non-present_attributes Index: cb_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_config.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cb_config.c 10 Nov 2006 23:44:50 -0000 1.6 +++ cb_config.c 27 Jun 2008 19:28:22 -0000 1.7 @@ -477,7 +477,8 @@ } else if ( (mods[i]->mod_op & ~LDAP_MOD_BVALUES) == LDAP_MOD_DELETE) { charray_remove(cb->config.chaining_components, - slapi_dn_normalize(slapi_ch_strdup(config_attr_value))); + slapi_dn_normalize(slapi_ch_strdup(config_attr_value)), + 0 /* freeit */); } } if (NULL == mods[i]->mod_bvalues) { @@ -513,7 +514,8 @@ if ( (mods[i]->mod_op & ~LDAP_MOD_BVALUES) == LDAP_MOD_DELETE) { charray_remove(cb->config.chainable_components, slapi_dn_normalize(slapi_ch_strdup(config_attr_value) -)); +), + 0 /* freeit */); } } if (NULL == mods[i]->mod_bvalues) { Index: cb_controls.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_controls.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- cb_controls.c 10 Nov 2006 23:44:50 -0000 1.8 +++ cb_controls.c 27 Jun 2008 19:28:22 -0000 1.9 @@ -91,7 +91,7 @@ return; } if ( controlops == 0 ) { - charray_remove(cb->config.forward_ctrls,controloid); + charray_remove(cb->config.forward_ctrls,controloid,0/* free it */); } PR_RWLock_Unlock(cb->config.rwl_config_lock); } Index: cb_instance.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/chainingdb/cb_instance.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- cb_instance.c 18 Oct 2007 00:08:28 -0000 1.8 +++ cb_instance.c 27 Jun 2008 19:28:22 -0000 1.9 @@ -392,7 +392,8 @@ } else if ( (mods[i]->mod_op & ~LDAP_MOD_BVALUES) == LDAP_MOD_DELETE) { charray_remove(inst->illegal_attributes, - slapi_ch_strdup(config_attr_value)); + slapi_ch_strdup(config_attr_value), + 0 /* freeit */); } } if (NULL == mods[i]->mod_bvalues) { @@ -426,7 +427,8 @@ } else if ( (mods[i]->mod_op & ~LDAP_MOD_BVALUES) == LDAP_MOD_DELETE) { charray_remove(inst->chaining_components, - slapi_dn_normalize(slapi_ch_strdup(config_attr_value))); + slapi_dn_normalize(slapi_ch_strdup(config_attr_value)), + 0 /* freeit */); } } if (NULL == mods[i]->mod_bvalues) { From fedora-directory-commits at redhat.com Fri Jun 27 19:28:24 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jun 2008 15:28:24 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acleffectiverights.c, 1.7, 1.8 Message-ID: <200806271928.m5RJSOk9006856@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6584/ldap/servers/plugins/acl Modified Files: acleffectiverights.c Log Message: Resolves: #437525 Summary: GER: allow GER for non-existing entries Description: [slapd/charray.c] new: charray_merge_nodup -- merge 2 string arrays skipping the duplicates modified: charray_remove -- introduced "freeit" flag. If true, the removed string is freed. (The API is used only in chainingdb. The change is applied to the plugin.) [slapd/opshared.c] modified: check OP_FLAG_GET_EFFECTIVE_RIGHTS in the iterate to support "@". It's needed to do at the location since we have to call acl plugin even when no entries are returned from the search. If no entries are returned and "@" is found in the attribute list, acl effective rights code generates the corresponding template entry. [slapd/pblock.c] place to store gerattrs is added (SLAPI_SEARCH_GERATTRS), where gerattrs is an array of strings which store "...@". [slapd/result.c] moved OP_FLAG_GET_EFFECTIVE_RIGHTS checking to iterate (opshared.c) [slapd/schema.c] new: slapi_schema_list_objectclass_attributes -- return the required and/or allowed attributes belonging to the given objectclass. This is used to support "*" and "+" in the get effective rights. new: slapi_schema_get_superior_name -- return the superior objectclass name of the given objectclass. [slapd/search.c] if "@" is found in the attribute list, cut the part out and added to the attrs array (pblock SLAPI_SEARCH_ATTRS) and store the original string to the gerattrs (pblock SLAPI_SEARCH_GERATTRS). [plugin/acl/acleffectiverights.c] modified: _ger_g_permission_granted -- if the requester and the subject user are identical, give "g" permission modified: _ger_parse_control -- replaced strcpy with memmove since strcpy does not guarantee the result of the overlap copy. modified: _ger_get_attrs_rights -- support "*" (all attributes belonging to the object) and "+" (operational attributes). If repeated attributes are found in the given attribute list, they are reduced to one. new: _ger_generate_template_entry -- generate a template entry if "@" is passed. [pluginc/cb/*] adjusted to the updated charray_remove. Please see also this wiki page for the overview and test cases. http://directory.fedoraproject.org/wiki/Get_Effective_Rights_for_non-present_attributes Index: acleffectiverights.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acleffectiverights.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- acleffectiverights.c 18 Oct 2007 00:08:27 -0000 1.7 +++ acleffectiverights.c 27 Jun 2008 19:28:22 -0000 1.8 @@ -46,7 +46,13 @@ /* news2 is optional, provided as a convenience */ /* capacity is the capacity of the gerstr, size is the current length */ static void -_append_gerstr(char **gerstr, size_t *capacity, size_t *size, const char *news, const char *news2) +_append_gerstr( + char **gerstr, + size_t *capacity, + size_t *size, + const char *news, + const char *news2 + ) { size_t len; size_t increment = 128; @@ -90,7 +96,12 @@ } static int -_ger_g_permission_granted ( Slapi_PBlock *pb, Slapi_Entry *e, char **errbuf ) +_ger_g_permission_granted ( + Slapi_PBlock *pb, + Slapi_Entry *e, + const char *subjectdn, + char **errbuf + ) { char *proxydn = NULL; Slapi_DN *requestor_sdn, *entry_sdn; @@ -151,6 +162,14 @@ goto bailout; } + /* if the requestor and the subject user are identical, let's grant it */ + if ( strcasecmp ( slapi_sdn_get_ndn(requestor_sdn), subjectdn ) == 0) + { + /* Requestor should see his own permission rights on any entry */ + rc = LDAP_SUCCESS; + goto bailout; + } + aclutil_str_appened ( errbuf, "get-effective-rights: requestor has no g permission on the entry" ); slapi_log_error (SLAPI_LOG_ACL, plugin_name, "_ger_g_permission_granted: %s\n", *errbuf); @@ -166,11 +185,17 @@ } static int -_ger_parse_control ( Slapi_PBlock *pb, char **subjectndn, int *iscritical, char **errbuf ) +_ger_parse_control ( + Slapi_PBlock *pb, + char **subjectndn, + int *iscritical, + char **errbuf + ) { LDAPControl **requestcontrols; struct berval *subjectber; BerElement *ber; + int subjectndnlen = 0; if (NULL == subjectndn) { @@ -231,7 +256,8 @@ * (see section 9 of RFC 2829) only. It also only supports the "dnAuthzId" * flavor, which looks like "dn:" where null is for anonymous. */ - if ( NULL == *subjectndn || strlen (*subjectndn) < 3 || + subjectndnlen = strlen(*subjectndn); + if ( NULL == *subjectndn || subjectndnlen < 3 || strncasecmp ( "dn:", *subjectndn, 3 ) != 0 ) { aclutil_str_appened ( errbuf, "get-effective-rights: subject is not dnAuthzId" ); @@ -239,7 +265,8 @@ return LDAP_INVALID_SYNTAX; } - strcpy ( *subjectndn, *subjectndn + 3 ); + /* memmove is safe for overlapping copy */ + memmove ( *subjectndn, *subjectndn + 3, subjectndnlen - 2);/* 1 for '\0' */ slapi_dn_normalize ( *subjectndn ); return LDAP_SUCCESS; } @@ -533,6 +560,27 @@ return attrrights; } +#define GER_GET_ATTR_RIGHTS(attrs) \ + for (thisattr = (attrs); thisattr && *thisattr; thisattr++) \ + { \ + _ger_get_attr_rights (gerpb, e, subjectndn, *thisattr, \ + gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf); \ + isfirstattr = 0; \ + } \ + +#define GER_GET_ATTR_RIGHTA_EXT(c, inattrs, exattrs); \ + for ( i = 0; attrs[i]; i++ ) \ + { \ + if ((c) != *attrs[i] && charray_inlist((inattrs), attrs[i]) && \ + !charray_inlist((exattrs), attrs[i])) \ + { \ + _ger_get_attr_rights ( gerpb, e, subjectndn, attrs[i], \ + gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf ); \ + isfirstattr = 0; \ + } \ + } + + void _ger_get_attrs_rights ( Slapi_PBlock *gerpb, @@ -552,12 +600,76 @@ if (attrs && *attrs) { - int i; - for ( i = 0; attrs[i]; i++ ) + int i = 0; + char **allattrs = NULL; + char **opattrs = NULL; + char **myattrs = NULL; + char **thisattr = NULL; + int hasstar = charray_inlist(attrs, "*"); + int hasplus = charray_inlist(attrs, "+"); + Slapi_Attr *objclasses = NULL; + Slapi_ValueSet *objclassvals = NULL; + + /* get all attrs available for the entry */ + slapi_entry_attr_find(e, "objectclass", &objclasses); + if (NULL != objclasses) { + Slapi_Value *v; + slapi_attr_get_valueset(objclasses, &objclassvals); + i = slapi_valueset_first_value(objclassvals, &v); + if (-1 != i) { + allattrs = slapi_schema_list_objectclass_attributes( + (const char *)v->bv.bv_val, + SLAPI_OC_FLAG_REQUIRED|SLAPI_OC_FLAG_ALLOWED); + /* add "aci" to the allattrs to adjust to do_search */ + charray_add(&allattrs, slapi_attr_syntax_normalize("aci")); + while (-1 != i) + { + i = slapi_valueset_next_value(objclassvals, i, &v); + if (-1 != i) + { + myattrs = slapi_schema_list_objectclass_attributes( + (const char *)v->bv.bv_val, + SLAPI_OC_FLAG_REQUIRED|SLAPI_OC_FLAG_ALLOWED); + charray_merge_nodup(&allattrs, myattrs, 1/*copy_strs*/); + charray_free(myattrs); + } + } + } + } + + /* get operational attrs */ + opattrs = slapi_schema_list_attribute_names(SLAPI_ATTR_FLAG_OPATTR); + + if (hasstar && hasplus) + { + GER_GET_ATTR_RIGHTS(allattrs); + GER_GET_ATTR_RIGHTS(opattrs); + } + else if (hasstar) { - _ger_get_attr_rights ( gerpb, e, subjectndn, attrs[i], gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf ); - isfirstattr = 0; + GER_GET_ATTR_RIGHTS(allattrs); + GER_GET_ATTR_RIGHTA_EXT('*', opattrs, allattrs); } + else if (hasplus) + { + GER_GET_ATTR_RIGHTS(opattrs); + GER_GET_ATTR_RIGHTA_EXT('+', allattrs, opattrs); + } + else + { + for ( i = 0; attrs[i]; i++ ) + { + if (charray_inlist(allattrs, attrs[i]) || + charray_inlist(opattrs, attrs[i])) + { + _ger_get_attr_rights ( gerpb, e, subjectndn, attrs[i], + gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf ); + isfirstattr = 0; + } + } + } + charray_free(allattrs); + charray_free(opattrs); } else { @@ -569,7 +681,8 @@ if ( ! slapi_attr_flag_is_set (attr, SLAPI_ATTR_FLAG_OPATTR) ) { slapi_attr_get_type ( attr, &type ); - _ger_get_attr_rights ( gerpb, e, subjectndn, type, gerstr, gerstrsize, gerstrcap, isfirstattr, errbuf ); + _ger_get_attr_rights ( gerpb, e, subjectndn, type, gerstr, + gerstrsize, gerstrcap, isfirstattr, errbuf ); isfirstattr = 0; } prevattr = attr; @@ -648,6 +761,131 @@ } int +_ger_generate_template_entry ( + Slapi_PBlock *pb + ) +{ + Slapi_Entry *e = NULL; + char **gerattrs = NULL; + char **attrs = NULL; + char *templateentry = NULL; + char *object = NULL; + char *superior = NULL; + char *p = NULL; + int siz = 0; + int len = 0; + int i = 0; + int notfirst = 0; + int rc = LDAP_SUCCESS; + + slapi_pblock_get( pb, SLAPI_SEARCH_GERATTRS, &gerattrs ); + if (NULL == gerattrs) + { + slapi_log_error (SLAPI_LOG_FATAL, plugin_name, + "Objectclass info is expected " + "in the attr list, e.g., \"*@person\"\n"); + rc = LDAP_SUCCESS; + goto bailout; + } + for (i = 0; gerattrs && gerattrs[i]; i++) + { + object = strchr(gerattrs[i], '@'); + if (NULL != object && '\0' != *(++object)) + { + break; + } + } + if (NULL == object) + { + rc = LDAP_SUCCESS; /* no objectclass info; ok to return */ + goto bailout; + } + attrs = slapi_schema_list_objectclass_attributes( + (const char *)object, SLAPI_OC_FLAG_REQUIRED); + if (NULL == attrs) + { + rc = LDAP_SUCCESS; /* bogus objectclass info; ok to return */ + goto bailout; + } + for (i = 0; attrs[i]; i++) + { + if (0 == strcasecmp(attrs[i], "objectclass")) + { + /* <*attrp>: \n\0 */ + siz += strlen(attrs[i]) + 4 + strlen(object); + } + else + { + /* <*attrp>: dummy\n\0 */ + siz += strlen(attrs[i]) + 4 + 5; + } + } + siz += 32 + strlen(object); /* dn: cn=\n\0 */ + templateentry = (char *)slapi_ch_malloc(siz); + PR_snprintf(templateentry, siz, + "dn: cn=template_%s_objectclass\n", object); + for (--i; i >= 0; i--) + { + len = strlen(templateentry); + p = templateentry + len; + if (0 == strcasecmp(attrs[i], "objectclass")) + { + PR_snprintf(p, siz - len, "%s: %s\n", attrs[i], object); + } + else + { + PR_snprintf(p, siz - len, "%s: dummy\n", attrs[i]); + } + } + charray_free(attrs); + + while ((superior = slapi_schema_get_superior_name(object)) && + (0 != strcasecmp(superior, "top"))) + { + if (notfirst) + { + slapi_ch_free_string(&object); + } + notfirst = 1; + object = superior; + attrs = slapi_schema_list_objectclass_attributes( + (const char *)superior, SLAPI_OC_FLAG_REQUIRED); + for (i = 0; attrs && attrs[i]; i++) + { + if (0 == strcasecmp(attrs[i], "objectclass")) + { + /* <*attrp>: \n\0 */ + siz += strlen(attrs[i]) + 4 + strlen(object); + } + } + templateentry = (char *)slapi_ch_realloc(templateentry, siz); + for (--i; i >= 0; i--) + { + len = strlen(templateentry); + p = templateentry + len; + if (0 == strcasecmp(attrs[i], "objectclass")) + { + PR_snprintf(p, siz - len, "%s: %s\n", attrs[i], object); + } + } + charray_free(attrs); + } + slapi_ch_free_string(&superior); + siz += 18; /* objectclass: top\n\0 */ + len = strlen(templateentry); + templateentry = (char *)slapi_ch_realloc(templateentry, siz); + p = templateentry + len; + PR_snprintf(p, siz - len, "objectclass: top\n"); + + e = slapi_str2entry(templateentry, SLAPI_STR2ENTRY_NOT_WELL_FORMED_LDIF); + /* set the template entry to send the result to clients */ + slapi_pblock_set(pb, SLAPI_SEARCH_RESULT_ENTRY, e); +bailout: + slapi_ch_free_string(&templateentry); + return rc; +} + +int acl_get_effective_rights ( Slapi_PBlock *pb, Slapi_Entry *e, /* target entry */ @@ -664,10 +902,20 @@ size_t gerstrsize = 0; size_t gerstrcap = 0; int iscritical = 1; - int rc; + int rc = LDAP_SUCCESS; *errbuf = '\0'; + if (NULL == e) /* create a template entry from SLAPI_SEARCH_GERATTRS */ + { + rc = _ger_generate_template_entry ( pb ); + slapi_pblock_get ( pb, SLAPI_SEARCH_RESULT_ENTRY, &e ); + if ( rc != LDAP_SUCCESS || NULL == e ) + { + goto bailout; + } + } + /* * Get the subject */ @@ -681,7 +929,7 @@ * The requestor should have g permission on the entry * to get the effective rights. */ - rc = _ger_g_permission_granted (pb, e, errbuf); + rc = _ger_g_permission_granted (pb, e, subjectndn, errbuf); if ( rc != LDAP_SUCCESS ) { goto bailout; @@ -718,7 +966,7 @@ slapi_log_error (SLAPI_LOG_ACLSUMMARY, plugin_name, "###### Effective Rights on Entry (%s) for Subject (%s) ######\n", - slapi_entry_get_ndn (e), subjectndn); + e?slapi_entry_get_ndn(e):"null", subjectndn?subjectndn:"null"); slapi_log_error (SLAPI_LOG_ACLSUMMARY, plugin_name, "%s\n", gerstr); /* Restore pb */ From fedora-directory-commits at redhat.com Fri Jun 27 19:28:24 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Fri, 27 Jun 2008 15:28:24 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/schema_reload schema_reload.c, 1.1, 1.2 Message-ID: <200806271928.m5RJSOFH006870@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/schema_reload In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6584/ldap/servers/plugins/schema_reload Modified Files: schema_reload.c Log Message: Resolves: #437525 Summary: GER: allow GER for non-existing entries Description: [slapd/charray.c] new: charray_merge_nodup -- merge 2 string arrays skipping the duplicates modified: charray_remove -- introduced "freeit" flag. If true, the removed string is freed. (The API is used only in chainingdb. The change is applied to the plugin.) [slapd/opshared.c] modified: check OP_FLAG_GET_EFFECTIVE_RIGHTS in the iterate to support "@". It's needed to do at the location since we have to call acl plugin even when no entries are returned from the search. If no entries are returned and "@" is found in the attribute list, acl effective rights code generates the corresponding template entry. [slapd/pblock.c] place to store gerattrs is added (SLAPI_SEARCH_GERATTRS), where gerattrs is an array of strings which store "...@". [slapd/result.c] moved OP_FLAG_GET_EFFECTIVE_RIGHTS checking to iterate (opshared.c) [slapd/schema.c] new: slapi_schema_list_objectclass_attributes -- return the required and/or allowed attributes belonging to the given objectclass. This is used to support "*" and "+" in the get effective rights. new: slapi_schema_get_superior_name -- return the superior objectclass name of the given objectclass. [slapd/search.c] if "@" is found in the attribute list, cut the part out and added to the attrs array (pblock SLAPI_SEARCH_ATTRS) and store the original string to the gerattrs (pblock SLAPI_SEARCH_GERATTRS). [plugin/acl/acleffectiverights.c] modified: _ger_g_permission_granted -- if the requester and the subject user are identical, give "g" permission modified: _ger_parse_control -- replaced strcpy with memmove since strcpy does not guarantee the result of the overlap copy. modified: _ger_get_attrs_rights -- support "*" (all attributes belonging to the object) and "+" (operational attributes). If repeated attributes are found in the given attribute list, they are reduced to one. new: _ger_generate_template_entry -- generate a template entry if "@" is passed. [pluginc/cb/*] adjusted to the updated charray_remove. Please see also this wiki page for the overview and test cases. http://directory.fedoraproject.org/wiki/Get_Effective_Rights_for_non-present_attributes Index: schema_reload.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/schema_reload/schema_reload.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- schema_reload.c 4 Jun 2008 22:22:57 -0000 1.1 +++ schema_reload.c 27 Jun 2008 19:28:22 -0000 1.2 @@ -214,10 +214,10 @@ { PRThread *thread = NULL; const char *cn; + const char *schemadir = NULL; int rv = SLAPI_DSE_CALLBACK_OK; Slapi_PBlock *mypb = NULL; Slapi_Task *task = NULL; - char *schemadir = NULL; *returncode = LDAP_SUCCESS; if ((cn = fetch_attr(e, "cn", NULL)) == NULL) { From fedora-directory-commits at redhat.com Mon Jun 30 17:28:18 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jun 2008 13:28:18 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl.c, 1.10, 1.11 Message-ID: <200806301728.m5UHSIMN027038@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26906/plugins/acl Modified Files: acl.c Log Message: Resoves: #448831 Summary: attacker can tie up CPU in regex code Description: when substring search is requested, sets the time limit based upon the nsslapd-timelimit value. Pass the timelimit (time_up) to the regular expression function. When the time is up, it returns the "Timelimit exceeded" error. Note: timelimit is applied non-Directory Manager users. Index: acl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- acl.c 18 Oct 2007 00:08:27 -0000 1.10 +++ acl.c 30 Jun 2008 17:28:16 -0000 1.11 @@ -3253,7 +3253,7 @@ ** matching, it seems that step() is leaking 1036 bytes/search ** I couldn't figure out why it's leaking. */ - rc = slapd_re_exec( realval ); + rc = slapd_re_exec( realval, -1 /* no timelimit */ ); slapd_re_unlock(); From fedora-directory-commits at redhat.com Mon Jun 30 17:28:19 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jun 2008 13:28:19 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_search.c, 1.12, 1.13 Message-ID: <200806301728.m5UHSJHI027064@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26906/slapd/back-ldbm Modified Files: ldbm_search.c Log Message: Resoves: #448831 Summary: attacker can tie up CPU in regex code Description: when substring search is requested, sets the time limit based upon the nsslapd-timelimit value. Pass the timelimit (time_up) to the regular expression function. When the time is up, it returns the "Timelimit exceeded" error. Note: timelimit is applied non-Directory Manager users. Index: ldbm_search.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_search.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- ldbm_search.c 12 Oct 2007 18:03:42 -0000 1.12 +++ ldbm_search.c 30 Jun 2008 17:28:16 -0000 1.13 @@ -1296,6 +1296,10 @@ "Failed the filter test", 0, NULL ); rc = SLAPI_FAIL_GENERAL; goto bail; + } else if (LDAP_TIMELIMIT_EXCEEDED == filter_test) { + slapi_send_ldap_result( pb, LDAP_TIMELIMIT_EXCEEDED, NULL, NULL, nentries, urls ); + rc = SLAPI_FAIL_GENERAL; + goto bail; } } } From fedora-directory-commits at redhat.com Mon Jun 30 17:28:18 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jun 2008 13:28:18 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes string.c, 1.10, 1.11 Message-ID: <200806301728.m5UHSIPK027044@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26906/plugins/syntaxes Modified Files: string.c Log Message: Resoves: #448831 Summary: attacker can tie up CPU in regex code Description: when substring search is requested, sets the time limit based upon the nsslapd-timelimit value. Pass the timelimit (time_up) to the regular expression function. When the time is up, it returns the "Timelimit exceeded" error. Note: timelimit is applied non-Directory Manager users. Index: string.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/string.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- string.c 29 Apr 2008 00:38:36 -0000 1.10 +++ string.c 30 Jun 2008 17:28:16 -0000 1.11 @@ -195,9 +195,20 @@ char pat[BUFSIZ]; char buf[BUFSIZ]; char ebuf[BUFSIZ]; + time_t curtime = 0; + time_t time_up = 0; + time_t optime = 0; /* time op was initiated */ + int timelimit = 0; /* search timelimit */ LDAPDebug( LDAP_DEBUG_FILTER, "=> string_filter_sub\n", 0, 0, 0 ); + slapi_pblock_get( pb, SLAPI_SEARCH_TIMELIMIT, &timelimit ); + slapi_pblock_get( pb, SLAPI_OPINITIATED_TIME, &optime ); + /* + * (timelimit==-1) means no time limit + */ + time_up = ( timelimit==-1 ? -1 : optime + timelimit); + /* * construct a regular expression corresponding to the * filter and let regex do the work for each value @@ -259,18 +270,21 @@ p = (bigpat) ? bigpat : pat; slapd_re_lock(); if ( (tmpbuf = slapd_re_comp( p )) != 0 ) { - LDAPDebug( LDAP_DEBUG_ANY, "re_comp (%s) failed (%s)\n", - pat, p, 0 ); - slapd_re_unlock(); - if( bigpat != NULL ) { - slapi_ch_free((void**)&bigpat ); - } - return( LDAP_OPERATIONS_ERROR ); + LDAPDebug( LDAP_DEBUG_ANY, "re_comp (%s) failed (%s): %s\n", + pat, p, tmpbuf ); + rc = LDAP_OPERATIONS_ERROR; + goto bailout; } else { LDAPDebug( LDAP_DEBUG_TRACE, "re_comp (%s)\n", escape_string( p, ebuf ), 0, 0 ); } + curtime = current_time(); + if ( time_up != -1 && curtime > time_up ) { + rc = LDAP_TIMELIMIT_EXCEEDED; + goto bailout; + } + /* * test the regex against each value */ @@ -296,22 +310,22 @@ } value_normalize( realval, syntax, 1 /* trim leading blanks */ ); - tmprc = slapd_re_exec( realval ); + tmprc = slapd_re_exec( realval, time_up ); LDAPDebug( LDAP_DEBUG_TRACE, "re_exec (%s) %i\n", escape_string( realval, ebuf ), tmprc, 0 ); - if ( tmprc != 0 ) { + if ( tmprc == 1 ) { rc = 0; break; + } else if ( tmprc != 0 ) { + rc = tmprc; + break; } } +bailout: slapd_re_unlock(); - if ( tmpbuf != NULL ) { - slapi_ch_free((void**)&tmpbuf ); - } - if( bigpat != NULL ) { - slapi_ch_free((void**)&bigpat ); - } + slapi_ch_free((void**)&tmpbuf ); /* NULL is fine */ + slapi_ch_free((void**)&bigpat ); /* NULL is fine */ LDAPDebug( LDAP_DEBUG_FILTER, "<= string_filter_sub %d\n", rc, 0, 0 ); From fedora-directory-commits at redhat.com Mon Jun 30 17:28:18 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Mon, 30 Jun 2008 13:28:18 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd entry.c, 1.15, 1.16 filterentry.c, 1.7, 1.8 getfilelist.c, 1.7, 1.8 plugin_syntax.c, 1.5, 1.6 proto-slap.h, 1.34, 1.35 regex.c, 1.6, 1.7 sasl_map.c, 1.8, 1.9 slapi-private.h, 1.24, 1.25 vattr.c, 1.8, 1.9 Message-ID: <200806301728.m5UHSI3j027054@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26906/slapd Modified Files: entry.c filterentry.c getfilelist.c plugin_syntax.c proto-slap.h regex.c sasl_map.c slapi-private.h vattr.c Log Message: Resoves: #448831 Summary: attacker can tie up CPU in regex code Description: when substring search is requested, sets the time limit based upon the nsslapd-timelimit value. Pass the timelimit (time_up) to the regular expression function. When the time is up, it returns the "Timelimit exceeded" error. Note: timelimit is applied non-Directory Manager users. Index: entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- entry.c 4 Jun 2008 22:22:55 -0000 1.15 +++ entry.c 30 Jun 2008 17:28:16 -0000 1.16 @@ -1843,7 +1843,7 @@ f->f_choice, &f->f_ava ); } else if ( filter_type == FILTER_TYPE_SUBSTRING) { - *rc = plugin_call_syntax_filter_sub( tmp_attr, + *rc = plugin_call_syntax_filter_sub( NULL, tmp_attr, &f->f_sub); } else if ( filter_type == FILTER_TYPE_PRES ) { /* type is there, that's all we need to know. */ Index: filterentry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filterentry.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- filterentry.c 18 Apr 2008 20:20:22 -0000 1.7 +++ filterentry.c 30 Jun 2008 17:28:16 -0000 1.8 @@ -693,7 +693,7 @@ rc = -1; for ( a = e->e_attrs; a != NULL; a = a->a_next ) { if ( slapi_attr_type_cmp( f->f_sub_type, a->a_type, SLAPI_TYPE_CMP_SUBTYPE ) == 0 ) { - rc = plugin_call_syntax_filter_sub( a, &f->f_sub ); + rc = plugin_call_syntax_filter_sub( pb, a, &f->f_sub ); if ( rc == 0 ) { break; } @@ -726,8 +726,8 @@ rc = -1; for ( a = e->e_attrs; a != NULL; a = a->a_next ) { if ( slapi_attr_type_cmp( f->f_sub_type, a->a_type, SLAPI_TYPE_CMP_SUBTYPE ) == 0 ) { - rc = plugin_call_syntax_filter_sub( a, &f->f_sub ); - if ( rc == 0 ) { + rc = plugin_call_syntax_filter_sub( pb, a, &f->f_sub ); + if ( rc == 0 || rc == LDAP_TIMELIMIT_EXCEEDED ) { break; } } Index: getfilelist.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/getfilelist.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- getfilelist.c 10 Nov 2006 23:45:40 -0000 1.7 +++ getfilelist.c 30 Jun 2008 17:28:16 -0000 1.8 @@ -130,7 +130,7 @@ slapd_re_lock(); s = slapd_re_comp((char *)pattern); if (!s) - match = slapd_re_exec((char *)filename); + match = slapd_re_exec((char *)filename, -1 /* no timelimit */); slapd_re_unlock(); return match; Index: plugin_syntax.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/plugin_syntax.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- plugin_syntax.c 10 Nov 2006 23:45:40 -0000 1.5 +++ plugin_syntax.c 30 Jun 2008 17:28:16 -0000 1.6 @@ -211,15 +211,17 @@ int plugin_call_syntax_filter_sub( + Slapi_PBlock *pb, Slapi_Attr *a, struct subfilt *fsub ) { - return(plugin_call_syntax_filter_sub_sv(a,fsub)); + return(plugin_call_syntax_filter_sub_sv(pb,a,fsub)); } int plugin_call_syntax_filter_sub_sv( + Slapi_PBlock *pb, Slapi_Attr *a, struct subfilt *fsub ) @@ -240,6 +242,13 @@ { Slapi_Value **va= valueset_get_valuearray(&a->a_present_values); pblock_init( &pipb ); + if (pb) + { + Operation *op = NULL; + /* to pass SLAPI_SEARCH_TIMELIMIT & SLAPI_OPINITATED_TIME */ + slapi_pblock_get( pb, SLAPI_OPERATION, &op ); + slapi_pblock_set( &pipb, SLAPI_OPERATION, op ); + } slapi_pblock_set( &pipb, SLAPI_PLUGIN, (void *) a->a_plugin ); rc = a->a_plugin->plg_syntax_filter_sub( &pipb, fsub->sf_initial, fsub->sf_any, fsub->sf_final, va); Index: proto-slap.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- proto-slap.h 10 Jun 2008 18:50:07 -0000 1.34 +++ proto-slap.h 30 Jun 2008 17:28:16 -0000 1.35 @@ -745,8 +745,8 @@ struct slapdplugin *slapi_get_global_syntax_plugins(); int plugin_call_syntax_filter_ava( const Slapi_Attr *a, int ftype, struct ava *ava ); int plugin_call_syntax_filter_ava_sv( const Slapi_Attr *a, int ftype, struct ava *ava, Slapi_Value **retVal, int useDeletedValues ); -int plugin_call_syntax_filter_sub( Slapi_Attr *a, struct subfilt *fsub ); -int plugin_call_syntax_filter_sub_sv( Slapi_Attr *a, struct subfilt *fsub ); +int plugin_call_syntax_filter_sub( Slapi_PBlock *pb, Slapi_Attr *a, struct subfilt *fsub ); +int plugin_call_syntax_filter_sub_sv( Slapi_PBlock *pb, Slapi_Attr *a, struct subfilt *fsub ); int plugin_call_syntax_get_compare_fn(void *vpi, value_compare_fn_type *compare_fn); struct slapdplugin *plugin_syntax_find( const char *nameoroid ); void plugin_syntax_enumerate( SyntaxEnumFunc sef, void *arg ); Index: regex.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/regex.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- regex.c 29 Apr 2008 00:38:36 -0000 1.6 +++ regex.c 30 Jun 2008 17:28:16 -0000 1.7 @@ -66,6 +66,14 @@ * Modification history: * * $Log$ + * Revision 1.7 2008/06/30 17:28:16 nhosoi + * Resoves: #448831 + * Summary: attacker can tie up CPU in regex code + * Description: when substring search is requested, sets the time limit based upon + * the nsslapd-timelimit value. Pass the timelimit (time_up) to the regular + * expression function. When the time is up, it returns the "Timelimit exceeded" + * error. Note: timelimit is applied non-Directory Manager users. + * * Revision 1.6 2008/04/29 00:38:36 nhosoi * Resolves: #182621 (#443955) * Summary: Allow larger regex buffer to enable long substring filters @@ -695,7 +703,7 @@ static UCHAR *bopat[MAXTAG]; static UCHAR *eopat[MAXTAG]; #ifdef NEEDPROTOS -static UCHAR *pmatch( UCHAR *lp, UCHAR *ap ); +static UCHAR *pmatch( UCHAR *lp, UCHAR *ap, time_t time_up, int *err ); #else /* NEEDPROTOS */ static UCHAR *pmatch(); #endif /* NEEDPROTOS */ @@ -720,14 +728,18 @@ * to the beginning and the end of the matched fragment, * respectively. * + * return values: 0 -- did not match + * 1 -- matched + * othersise -- ldap error (TIMELIMIT_EXCEEDED only) */ int -slapd_re_exec( char *lp ) +slapd_re_exec( char *lp, time_t time_up ) { register UCHAR c; register UCHAR *ep = 0; register UCHAR *ap = nfa; + int ldaperror = 0; bol = (UCHAR*)lp; @@ -745,7 +757,7 @@ switch(*ap) { case BOL: /* anchored: match from BOL only */ - ep = pmatch((UCHAR*)lp,ap); + ep = pmatch((UCHAR*)lp,ap,time_up,&ldaperror); break; case CHR: /* ordinary char: locate it fast */ c = *(ap+1); @@ -755,7 +767,7 @@ return 0; default: /* regular matching all the way. */ do { - if ((ep = pmatch((UCHAR*)lp,ap))) + if ((ep = pmatch((UCHAR*)lp,ap,time_up,&ldaperror))) break; lp++; } while (*lp); @@ -764,6 +776,8 @@ case END: /* munged automaton. fail always */ return 0; } + if (ldaperror) + return ldaperror; if (!ep) return 0; @@ -844,13 +858,19 @@ #define CCLSKIP 18 /* [CLO] CCL 16bytes END ... */ static UCHAR * -pmatch( UCHAR *lp, UCHAR *ap) +pmatch( UCHAR *lp, UCHAR *ap, time_t time_up, int *err ) { register int op, c, n; register UCHAR *e; /* extra pointer for CLO */ register UCHAR *bp; /* beginning of subpat.. */ register UCHAR *ep; /* ending of subpat.. */ UCHAR *are; /* to save the line ptr. */ + time_t curtime = current_time(); + + if ( time_up != -1 && curtime > time_up ) { + *err = LDAP_TIMELIMIT_EXCEEDED; + return 0; + } while ((op = *ap++) != END) switch(op) { @@ -927,7 +947,7 @@ ap += n; while (lp >= are) { - if ((e = pmatch(lp, ap)) != NULL) + if ((e = pmatch(lp, ap, time_up, err)) != NULL) return e; --lp; } Index: sasl_map.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/sasl_map.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- sasl_map.c 10 Nov 2006 23:45:40 -0000 1.8 +++ sasl_map.c 30 Jun 2008 17:28:16 -0000 1.9 @@ -434,9 +434,10 @@ recomp_result = slapd_re_comp(dp->regular_expression); if (recomp_result) { LDAPDebug( LDAP_DEBUG_ANY, "sasl_map_check : re_comp failed for expression (%s)\n", dp->regular_expression, 0, 0 ); + } else { + matched = slapd_re_exec(sasl_user_and_realm, -1 /* no timelimit */); + LDAPDebug( LDAP_DEBUG_TRACE, "regex: %s, id: %s, %s\n", dp->regular_expression, sasl_user_and_realm, matched ? "matched" : "didn't match" ); } - matched = slapd_re_exec(sasl_user_and_realm); - LDAPDebug( LDAP_DEBUG_TRACE, "regex: %s, id: %s, %s\n", dp->regular_expression, sasl_user_and_realm, matched ? "matched" : "didn't match" ); if (matched) { if (matched == 1) { /* Allocate buffers for the returned strings */ Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- slapi-private.h 27 Jun 2008 19:28:21 -0000 1.24 +++ slapi-private.h 30 Jun 2008 17:28:16 -0000 1.25 @@ -1185,7 +1185,7 @@ void bervalarray_add_berval_fast(struct berval ***vals, const struct berval *addval, int nvals, int *maxvals); -int slapd_re_exec( char *lp ); +int slapd_re_exec( char *lp, time_t time_up ); char *slapd_re_comp( char *pat ); int slapd_re_subs( char *src, char* dst ); void slapd_re_lock( void ); Index: vattr.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/vattr.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- vattr.c 1 Nov 2007 20:24:07 -0000 1.8 +++ vattr.c 30 Jun 2008 17:28:16 -0000 1.9 @@ -540,7 +540,7 @@ rc = plugin_call_syntax_filter_ava( a, f->f_choice, &f->f_ava ); } else if ( filter_type == FILTER_TYPE_SUBSTRING) { - rc = plugin_call_syntax_filter_sub( a, + rc = plugin_call_syntax_filter_sub( pb, a, &f->f_sub); } @@ -611,7 +611,7 @@ } else if ( filter_type == FILTER_TYPE_SUBSTRING ) { - rc = test_substring_filter( NULL, e, f, 0 /* no access check */, + rc = test_substring_filter( pb, e, f, 0 /* no access check */, 0 /* do test filter */, &acl_test_done); } else if ( filter_type == FILTER_TYPE_PRES ) {