From fedora-directory-commits at redhat.com Tue Jul 1 22:30:09 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 1 Jul 2008 18:30:09 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/ldif template-dse.ldif.in, 1.8, 1.9 Message-ID: <200807012230.m61MU921030891@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30795/ldap/ldif Modified Files: template-dse.ldif.in Log Message: Resolves: 453011 Summary: Redesigned algorithm used to update memberOf attribute. Index: template-dse.ldif.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/ldif/template-dse.ldif.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- template-dse.ldif.in 19 Jun 2008 15:18:19 -0000 1.8 +++ template-dse.ldif.in 1 Jul 2008 22:30:05 -0000 1.9 @@ -627,6 +627,13 @@ nssystemindex: false nsindextype: eq +dn: cn=memberOf,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config +objectclass: top +objectclass: nsIndex +cn: memberOf +nssystemindex: false +nsindextype: eq + dn: cn=nsUniqueId,cn=default indexes, cn=config,cn=ldbm database,cn=plugins,cn=config objectclass: top objectclass: nsIndex From fedora-directory-commits at redhat.com Tue Jul 1 22:30:09 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Tue, 1 Jul 2008 18:30:09 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/memberof memberof.c, 1.10, 1.11 memberof.h, 1.1, 1.2 memberof_config.c, 1.1, 1.2 Message-ID: <200807012230.m61MUAmE030896@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-serv30795/ldap/servers/plugins/memberof Modified Files: memberof.c memberof.h memberof_config.c Log Message: Resolves: 453011 Summary: Redesigned algorithm used to update memberOf attribute. Index: memberof.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof/memberof.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- memberof.c 25 Jun 2008 18:34:12 -0000 1.10 +++ memberof.c 1 Jul 2008 22:30:07 -0000 1.11 @@ -87,6 +87,13 @@ void *next; } memberofstringll; +typedef struct _memberof_get_groups_data +{ + MemberOfConfig *config; + Slapi_Value *memberdn_val; + Slapi_ValueSet **groupvals; +} memberof_get_groups_data; + /*** function prototypes ***/ /* exported functions */ @@ -133,17 +140,15 @@ static int memberof_compare(MemberOfConfig *config, const void *a, const void *b); static int memberof_qsort_compare(const void *a, const void *b); static void memberof_load_array(Slapi_Value **array, Slapi_Attr *attr); -static int memberof_is_legit_member(Slapi_PBlock *pb, MemberOfConfig *config, - char *group_dn, char *op_this, char *op_to, memberofstringll *stack); static int memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn); static int memberof_call_foreach_dn(Slapi_PBlock *pb, char *dn, char *type, plugin_search_entry_callback callback, void *callback_data); static int memberof_is_direct_member(MemberOfConfig *config, Slapi_Value *groupdn, Slapi_Value *memberdn); -static int memberof_is_member(MemberOfConfig *config, Slapi_Value *groupdn, - Slapi_Value *memberdn); -static int memberof_is_member_r(MemberOfConfig *config, Slapi_Value *groupdn, - Slapi_Value *memberdn, memberofstringll *stack); +static Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn); +static int memberof_get_groups_r(MemberOfConfig *config, char *memberdn, + memberof_get_groups_data *data); +static int memberof_get_groups_callback(Slapi_Entry *e, void *callback_data); static int memberof_test_membership(Slapi_PBlock *pb, MemberOfConfig *config, char *group_dn); static int memberof_test_membership_callback(Slapi_Entry *e, void *callback_data); @@ -154,9 +159,6 @@ static 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); -static int memberof_add_groups_search_callback(Slapi_Entry *e, void *callback_data); -static int memberof_add_membership(Slapi_PBlock *pb, MemberOfConfig *config, - char *op_this, char *op_to); static int memberof_task_add(Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Entry *eAfter, int *returncode, char *returntext, void *arg); @@ -352,6 +354,8 @@ } memberof_unlock(); + + memberof_free_config(&configCopy); } slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM, @@ -359,15 +363,15 @@ return ret; } -typedef struct _del_dn_data +typedef struct _memberof_del_dn_data { char *dn; char *type; -} del_dn_data; +} memberof_del_dn_data; int memberof_del_dn_from_groups(Slapi_PBlock *pb, MemberOfConfig *config, char *dn) { - del_dn_data data = {dn, config->groupattr}; + memberof_del_dn_data data = {dn, config->groupattr}; return memberof_call_foreach_dn(pb, dn, config->groupattr, memberof_del_dn_type_callback, &data); @@ -386,11 +390,11 @@ mods[0] = &mod; mods[1] = 0; - val[0] = ((del_dn_data *)callback_data)->dn; + val[0] = ((memberof_del_dn_data *)callback_data)->dn; val[1] = 0; mod.mod_op = LDAP_MOD_DELETE; - mod.mod_type = ((del_dn_data *)callback_data)->type; + mod.mod_type = ((memberof_del_dn_data *)callback_data)->type; mod.mod_values = val; slapi_modify_internal_set_pb( @@ -524,6 +528,8 @@ memberof_replace_dn_from_groups(pb, &configCopy, pre_dn, post_dn); memberof_unlock(); + + memberof_free_config(&configCopy); } } @@ -726,6 +732,11 @@ smod = slapi_mods_get_next_smod(smods, next_mod); } + if (config_copied) + { + memberof_free_config(&configCopy); + } + slapi_mod_free(&next_mod); slapi_mods_free(&smods); } @@ -783,6 +794,8 @@ } memberof_unlock(); + + memberof_free_config(&configCopy); } } @@ -1012,7 +1025,7 @@ /* someone set up infinitely recursive groups - bail out */ - slapi_log_error( SLAPI_LOG_FATAL, + slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, "memberof_modop_one_replace_r: group recursion" " detected in %s\n" @@ -1065,38 +1078,13 @@ goto bail; } - /* We need to deal with delete cases separately. We may not - * want to remove a memberof attribute from an entry since - * it could still be a member in some other indirect manner. */ - if(stack && LDAP_MOD_DELETE == mod_op) + /* For add and del modify operations, we just regenerate the + * memberOf attribute. */ + if(LDAP_MOD_DELETE == mod_op || LDAP_MOD_ADD == mod_op) { - 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_replace_r: not deleting %s\n" - ,op_to); - goto bail; - } - } - - /* 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(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, - config->memberof_attr, this_dn_val))) - { - slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_modop_one_replace_r: memberOf value %s already exists in " - "entry %s\n", op_this, op_to); - goto bail; - } - + /* find parent groups and replace our member attr */ + memberof_fix_memberof_callback(e, config); + } else { /* single entry - do mod */ mod_pb = slapi_pblock_new(); @@ -1113,7 +1101,6 @@ val[0] = op_this; val[1] = 0; - mod.mod_op = LDAP_MOD_REPLACE == mod_op?LDAP_MOD_DELETE:mod_op; mod.mod_type = config->memberof_attr; mod.mod_values = val; @@ -1141,22 +1128,6 @@ slapi_pblock_destroy(mod_pb); } - - if(LDAP_MOD_DELETE == mod_op) - { - /* fix up membership for groups that have been orphaned */ - memberof_test_membership_callback(e, config); - } - - if(LDAP_MOD_ADD == mod_op) - { - /* If we failed to update memberOf for op_to, we shouldn't - * 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, config, op_this, op_to); - } - } } bail: @@ -1435,26 +1406,88 @@ return rc; } -typedef struct _memberof_add_groups +/* memberof_get_groups() + * + * Gets a list of all groups that an entry is a member of. + * This is done by looking only at member attribute values. + * A Slapi_ValueSet* is returned. It is up to the caller to + * free it. + */ +Slapi_ValueSet *memberof_get_groups(MemberOfConfig *config, char *memberdn) { - MemberOfConfig *config; - char *target_dn; - char *group_dn; -} memberof_add_groups; + Slapi_Value *memberdn_val = slapi_value_new_string(memberdn); + Slapi_ValueSet *groupvals = slapi_valueset_new(); + memberof_get_groups_data data = {config, memberdn_val, &groupvals}; -int memberof_add_membership(Slapi_PBlock *pb, MemberOfConfig *config, - char *op_this, char *op_to) -{ - memberof_add_groups data = {config, op_to, op_this}; + memberof_get_groups_r(config, memberdn, &data); - return memberof_call_foreach_dn(pb, op_this, config->groupattr, - memberof_add_groups_search_callback, &data); + slapi_value_free(&memberdn_val); + + return groupvals; } -int memberof_add_groups_search_callback(Slapi_Entry *e, void *callback_data) +int memberof_get_groups_r(MemberOfConfig *config, char *memberdn, memberof_get_groups_data *data) { - return memberof_add_one(0, ((memberof_add_groups*)callback_data)->config, slapi_entry_get_dn(e), - ((memberof_add_groups*)callback_data)->target_dn); + /* Search for member= + * For each match, add it to the list, recurse and do same search */ + memberof_call_foreach_dn(0, memberdn, config->groupattr, + memberof_get_groups_callback, data); +} + +/* memberof_get_groups_callback() + * + * Callback to perform work of memberof_get_groups() + */ +int memberof_get_groups_callback(Slapi_Entry *e, void *callback_data) +{ + char *group_dn = slapi_entry_get_dn(e); + Slapi_Value *group_dn_val = 0; + Slapi_ValueSet *groupvals = *((memberof_get_groups_data*)callback_data)->groupvals; + + /* get the DN of the group */ + group_dn_val = slapi_value_new_string(group_dn); + + /* check if e is the same as our original member entry */ + if (0 == memberof_compare(((memberof_get_groups_data*)callback_data)->config, + &((memberof_get_groups_data*)callback_data)->memberdn_val, &group_dn_val)) + { + /* A recursive group caused us to find our original + * entry we passed to memberof_get_groups(). We just + * skip processing this entry. */ + slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, + "memberof_get_groups_callback: group recursion" + " detected in %s\n" ,group_dn); + slapi_value_free(&group_dn_val); + goto bail; + + } + + /* have we been here before? */ + if (groupvals && + slapi_valueset_find(((memberof_get_groups_data*)callback_data)->config->group_slapiattr, + groupvals, group_dn_val)) + { + /* we either hit a recursive grouping, or an entry is + * a member of a group through multiple paths. Either + * way, we can just skip processing this entry since we've + * already gone through this part of the grouping hierarchy. */ + slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, + "memberof_get_groups_callback: possible group recursion" + " detected in %s\n" ,group_dn); + slapi_value_free(&group_dn_val); + goto bail; + } + + /* Push group_dn_val into the valueset. This memory is now owned + * by the valueset. */ + slapi_valueset_add_value_ext(groupvals, group_dn_val, SLAPI_VALUE_FLAG_PASSIN); + + /* now recurse to find parent groups of e */ + memberof_get_groups_r(((memberof_get_groups_data*)callback_data)->config, + group_dn, callback_data); + + bail: + return 0; } /* memberof_is_direct_member() @@ -1491,160 +1524,6 @@ return rc; } -/* memberof_is_member() - * - * tests for membership of memberdn in group groupdn. This - * will check for both direct and indirect membership. - * returns non-zero when true, zero otherwise - */ -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(config, groupdn, memberdn)) - { - /* entry is a direct member */ - return 1; - } - - return memberof_is_member_r(config, groupdn, memberdn, stack); -} - -/* memberof_is_member_r() - * - * Recursive function to do the work for the memberof_is_member() - * function. This will basically check if "memberdn" is a member - * of the group represented by "groupdn". Only "member" attribute - * values will be used to make this determination, not "memberOf" - * attribute values. - * - * returns non-zero when true, zero otherwise - */ -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; - Slapi_PBlock *search_pb = slapi_pblock_new(); - Slapi_Backend *be = 0; - Slapi_Value *ll_dn_val = 0; - memberofstringll *ll = stack; - char *filter_str = 0; - int rc = 0; - - /* Check if we've processed memberdn already to detect looped - * groupings. We want to do this right away to avoid any - * unecessary processing. */ - while(ll) - { - ll_dn_val = slapi_value_new_string(ll->dn); - - if(0 == memberof_compare(config, &ll_dn_val, &memberdn)) - { - slapi_value_free(&ll_dn_val); - - /* someone set up infinitely - * recursive groups - bail out */ - slapi_log_error( SLAPI_LOG_FATAL, - MEMBEROF_PLUGIN_SUBSYSTEM, - "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; - } - - slapi_value_free(&ll_dn_val); - ll = ll->next; - } - - /* push memberdn onto the stack to detect loops */ - ll = (memberofstringll*)slapi_ch_malloc(sizeof(memberofstringll)); - ll->dn = slapi_value_get_string(memberdn); - ll->next = stack; - - /* Find the backend suffix that memberdn is in so we can - * use it as a search base. */ - member_sdn = slapi_sdn_new_dn_byref(slapi_value_get_string(memberdn)); - be = slapi_be_select(member_sdn); - if(be) - { - base_sdn = (Slapi_DN*)slapi_be_getsuffix(be,0); - } - - /* Do a search for "member=". Go through matches to - * see if it is our group. If not, search for "member=" - * and keep looping until we've exhausted it. */ - if(base_sdn) - { - filter_str = slapi_ch_smprintf("(%s=%s)", config->groupattr, - slapi_value_get_string(memberdn)); - } - - 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_is_member_r: error searching for groups: %d", - res); - goto bail; - } else { - Slapi_Entry **entries = NULL; - slapi_pblock_get(search_pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries); - if ( NULL != entries && NULL != entries[0]) - { - int i; - - for(i = 0; entries[i] != NULL; i++) - { - /* Iterate through the matches checking if the dn is our groupdn. */ - if(strcasecmp(slapi_entry_get_ndn(entries[i]), slapi_value_get_string(groupdn)) == 0) - { - /* This is the group we've been searching for, so - * set rc and bail. */ - rc = 1; - break; - } else { - /* This is not the group you're looking for... - * Find all of the groups that this group is a member of to - * 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(config, groupdn, entrydn, ll); - slapi_value_free(&entrydn); - } - } - } - } - } - - bail: - slapi_ch_free((void **)&ll); - slapi_ch_free_string(&filter_str); - slapi_sdn_free(&member_sdn); - slapi_free_search_results_internal(search_pb); - slapi_pblock_destroy(search_pb); - - return rc; -} - /* memberof_test_membership() * * Finds all entries who are a "memberOf" the group @@ -2038,156 +1917,6 @@ slapi_value_get_berval(val2)); } -/* memberof_is_legit_member() - * - * before we rush to remove this group from the entry - * we need to be sure that the entry is not a member - * of the group for another legitimate reason i.e. - * that it is not itself a direct member of the group, - * and that all groups in its memberof attribute except - * 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, MemberOfConfig *config, - char *group_dn, char *op_this, char *op_to, memberofstringll *stack) -{ - int rc = 0; - Slapi_DN *group_sdn = 0; - Slapi_Entry *group_e = 0; - Slapi_DN *opto_sdn = 0; - Slapi_Entry *opto_e = 0; - char *filter_str = 0; - Slapi_Filter *filter = 0; - memberofstringll *ll = 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; - const char *delete_group_dn = 0; - - slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM, - "--> memberof_is_legit_member\n" ); - - /* first test entry */ - group_sdn = slapi_sdn_new_dn_byref(op_this); - slapi_search_internal_get_entry( group_sdn, attrlist, - &group_e, memberof_get_plugin_id()); - slapi_sdn_free(&group_sdn); - - if(!group_e) - { - goto bail; - } - - filter_str = slapi_ch_smprintf("(%s=%s)", config->groupattr, op_to); - filter = slapi_str2filter(filter_str); - - if(!slapi_filter_test_simple(group_e, filter)) - { - /* entry is direct member */ - slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_is_legit_member: %s direct member of %s\n" - ,op_to,op_this); - slapi_filter_free(filter,0); - rc = 1; - goto bail; - } - - slapi_filter_free(filter,0); - - /* test all group dns in stack - the top dn is the group we remove the entry from - second from bottom dn is being removed from the - bottom group, we ignore those two - */ - ll = stack; - - /* need to be 2 items left on the stack */ - while( ll && - ll->next && - ((memberofstringll*)ll->next)->next) - { - ll = ll->next; - } - - if(!ll || !ll->next) - { - /* tight recursion, bail */ - goto bail; - } - - delete_group_dn = ((memberofstringll*)ll->next)->dn; - - /* get the target entry memberof attribute */ - opto_sdn = slapi_sdn_new_dn_byref(op_to); - slapi_search_internal_get_entry( opto_sdn, optolist, - &opto_e, memberof_get_plugin_id()); - slapi_sdn_free(&opto_sdn); - - if(opto_e) - { - slapi_entry_attr_find(opto_e, config->memberof_attr, &memberof); - } - - if(0 == memberof) - { - goto bail; - } - - /* iterate through memberof values and test against group membership */ - hint = slapi_attr_first_value(memberof, &memberdn); - - while(memberdn) - { - char *dn = (char*)slapi_value_get_string(memberdn); - int current_size = - (strlen(config->groupattr) + - strlen(dn) + 4); /* 4 for (=) + null */ - - /* disregard the group being removed */ - if(0 == strcmp(dn, delete_group_dn)) - { - hint = slapi_attr_next_value(memberof, hint, &memberdn); - continue; - } - - if (current_size > strlen(filter_str)) - { - int filter_size = 2 * current_size; - filter_str = slapi_ch_realloc(filter_str, filter_size); - } - - sprintf(filter_str, "(%s=%s)", config->groupattr, dn); - filter = slapi_str2filter(filter_str); - - if(!slapi_filter_test_simple(group_e, filter)) - { - /* another group allows entry */ - slapi_log_error( SLAPI_LOG_PLUGIN, MEMBEROF_PLUGIN_SUBSYSTEM, - "memberof_is_legit_member: %s is group member of %s\n" - ,op_to,dn); - slapi_filter_free(filter,0); - - rc = 1; - goto bail; - } - - slapi_filter_free(filter,0); - - hint = slapi_attr_next_value(memberof, hint, &memberdn); - } - -bail: - slapi_entry_free(group_e); - slapi_entry_free(opto_e); - slapi_ch_free_string(&filter_str); - - slapi_log_error( SLAPI_LOG_TRACE, MEMBEROF_PLUGIN_SUBSYSTEM, - "<-- memberof_is_legit_member\n" ); - return rc; -} - void memberof_lock() { slapi_lock_mutex(memberof_operation_lock); @@ -2235,6 +1964,8 @@ /* release the memberOf operation lock */ memberof_unlock(); + memberof_free_config(&configCopy); + slapi_task_log_notice(task, "Memberof task finished."); slapi_task_log_status(task, "Memberof task finished."); slapi_task_inc_progress(task); @@ -2372,15 +2103,57 @@ int rc = 0; char *dn = slapi_entry_get_dn(e); MemberOfConfig *config = (MemberOfConfig *)callback_data; - memberof_add_groups data = {config, dn, dn}; + memberof_del_dn_data del_data = {0, config->memberof_attr}; + Slapi_ValueSet *groups = 0; + + /* get a list of all of the groups this user belongs to */ + groups = memberof_get_groups(config, dn); + + /* If we found some groups, replace the existing memberOf attribute + * with the found values. */ + if (groups && slapi_valueset_count(groups)) + { + Slapi_PBlock *mod_pb = slapi_pblock_new(); + Slapi_Value *val = 0; + Slapi_Mod smod; + LDAPMod **mods = (LDAPMod **) slapi_ch_malloc(2 * sizeof(LDAPMod *)); + int hint = 0; + + slapi_mod_init(&smod, 0); + slapi_mod_set_operation(&smod, LDAP_MOD_REPLACE | LDAP_MOD_BVALUES); + slapi_mod_set_type(&smod, config->memberof_attr); + + /* Loop through all of our values and add them to smod */ + hint = slapi_valueset_first_value(groups, &val); + while (val) + { + /* this makes a copy of the berval */ + slapi_mod_add_value(&smod, slapi_value_get_berval(val)); + hint = slapi_valueset_next_value(groups, hint, &val); + } + + mods[0] = slapi_mod_get_ldapmod_passout(&smod); + mods[1] = 0; + + slapi_modify_internal_set_pb( + mod_pb, dn, mods, 0, 0, + memberof_get_plugin_id(), 0); - /* step 1 */ - slapi_entry_attr_delete(e, config->memberof_attr); + slapi_modify_internal_pb(mod_pb); - /* step 2 and 3 */ - rc = memberof_call_foreach_dn(0, dn, config->groupattr, - memberof_add_groups_search_callback, &data); + slapi_pblock_get(mod_pb, SLAPI_PLUGIN_INTOP_RESULT, &rc); + ldap_mods_free(mods, 1); + slapi_mod_done(&smod); + slapi_pblock_destroy(mod_pb); + } else { + /* No groups were found, so remove the memberOf attribute + * from this entry. */ + memberof_del_dn_type_callback(e, &del_data); + } + + slapi_valueset_free(groups); + return rc; } Index: memberof.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof/memberof.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- memberof.h 19 Jun 2008 15:18:20 -0000 1.1 +++ memberof.h 1 Jul 2008 22:30:07 -0000 1.2 @@ -84,6 +84,7 @@ */ int memberof_config(Slapi_Entry *config_e); void memberof_copy_config(MemberOfConfig *dest, MemberOfConfig *src); +void memberof_free_config(MemberOfConfig *config); MemberOfConfig *memberof_get_config(); void memberof_lock(); void memberof_unlock(); Index: memberof_config.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/memberof/memberof_config.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- memberof_config.c 19 Jun 2008 15:18:20 -0000 1.1 +++ memberof_config.c 1 Jul 2008 22:30:07 -0000 1.2 @@ -291,6 +291,23 @@ } /* + * memberof_free_config() + * + * Free's the contents of a config structure. + */ +void +memberof_free_config(MemberOfConfig *config) +{ + if (config) + { + slapi_ch_free_string(&config->groupattr); + slapi_filter_free(config->group_filter, 1); + slapi_attr_free(&config->group_slapiattr); + slapi_ch_free_string(&config->memberof_attr); + } +} + +/* * memberof_get_config() * * Returns a pointer to the main config. You should call From fedora-directory-commits at redhat.com Wed Jul 2 13:34:08 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 2 Jul 2008 09:34:08 -0400 Subject: [Fedora-directory-commits] ldapserver/man - New directory Message-ID: <200807021334.m62DY8l4009584@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/man In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9567/man Log Message: Directory /cvs/dirsec/ldapserver/man added to the repository From fedora-directory-commits at redhat.com Wed Jul 2 13:34:18 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 2 Jul 2008 09:34:18 -0400 Subject: [Fedora-directory-commits] ldapserver/man/man1 - New directory Message-ID: <200807021334.m62DYISR009620@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/man/man1 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9592/man1 Log Message: Directory /cvs/dirsec/ldapserver/man/man1 added to the repository From fedora-directory-commits at redhat.com Wed Jul 2 13:34:18 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Wed, 2 Jul 2008 09:34:18 -0400 Subject: [Fedora-directory-commits] ldapserver/man/man8 - New directory Message-ID: <200807021334.m62DYIw3009625@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/man/man8 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9592/man8 Log Message: Directory /cvs/dirsec/ldapserver/man/man8 added to the repository From fedora-directory-commits at redhat.com Wed Jul 2 14:54:09 2008 From: fedora-directory-commits at redhat.com (Robert Crittenden (rcritten)) Date: Wed, 2 Jul 2008 10:54:09 -0400 Subject: [Fedora-directory-commits] mod_nss nss_pcache.c,1.9,1.10 Message-ID: <200807021454.m62Es9b5019682@cvs-int.fedora.redhat.com> Author: rcritten Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19626 Modified Files: nss_pcache.c Log Message: Fix parsing error where a token with no password would end up with a trailing tab in its value causing NSS to not find it. If there is no password stored for a token return a 1-byte response so that the read on the other end won't time out. Index: nss_pcache.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_pcache.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- nss_pcache.c 10 Jan 2007 20:56:00 -0000 1.9 +++ nss_pcache.c 2 Jul 2008 14:54:06 -0000 1.10 @@ -410,7 +410,10 @@ for (node = pinList; node != NULL; node = node->next) { if (!strcmp(node->tokenName, tokenName)) { if (Pk11StoreGetPin(&pin, node->store) == SECSuccess) { - PR_Write(out, pin, strlen(pin)); + if (strlen(pin) == 0) + PR_Write(out, "", 1); + else + PR_Write(out, pin, strlen(pin)); memset(pin, 0, strlen(pin)); free(pin); found = PR_TRUE; @@ -453,7 +456,7 @@ while (*s) { if (*s == '\t' || *s == '\0') { if (i == el) { - if (*peek != '\0') + if (*peek != '\0' || *s == '\t') *s = '\0'; r = strdup(t); free(work); From fedora-directory-commits at redhat.com Wed Jul 2 14:54:40 2008 From: fedora-directory-commits at redhat.com (Robert Crittenden (rcritten)) Date: Wed, 2 Jul 2008 10:54:40 -0400 Subject: [Fedora-directory-commits] mod_nss nss_engine_pphrase.c,1.11,1.12 Message-ID: <200807021454.m62EseaC019719@cvs-int.fedora.redhat.com> Author: rcritten Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19692 Modified Files: nss_engine_pphrase.c Log Message: Don't allow blank passwords if FIPS is enabled. This is not allowed by the NSS FIPS 140-2 security policy. Index: nss_engine_pphrase.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_engine_pphrase.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- nss_engine_pphrase.c 16 May 2008 15:16:02 -0000 1.11 +++ nss_engine_pphrase.c 2 Jul 2008 14:54:37 -0000 1.12 @@ -335,7 +335,12 @@ fprintf(output, "non-alphabetic characters\n"); continue; } - return (char*) PORT_Strdup((char*)phrase); + if (PK11_IsFIPS() && strlen(phrase) == 0) { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, + "The FIPS security policy requires that a password be set."); + nss_die(); + } else + return (char*) PORT_Strdup((char*)phrase); } } From fedora-directory-commits at redhat.com Wed Jul 2 16:14:43 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 2 Jul 2008 12:14:43 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts template-schema-reload.pl.in, NONE, 1.1 Message-ID: <200807021614.m62GEhdD004166@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4022/ldap/admin/src/scripts Added Files: template-schema-reload.pl.in Log Message: Resolves: #450753 Summary: Add CLI for dynamic reload schema file task --- NEW FILE template-schema-reload.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 " [-d schemadir]\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 " : -d schemadir - Directory where schema files are located\n"); print(STDERR " : -v - verbose\n"); } $rootdn = ""; $passwd = ""; $passwdfile = ""; $schemadir = ""; $schemadir_arg = ""; $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 "-d") { # schemadir $i++; $schemadir_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 "" ) { &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 = "schema_reload_${yr}_${mn}_${dy}_${h}_${m}_${s}"; # Build the task entry to add $dn = "dn: cn=$taskname, cn=schema reload task, cn=tasks, cn=config\n"; $misc = "changetype: add\nobjectclass: top\nobjectclass: extensibleObject\n"; $cn = "cn: $taskname\n"; if ( $schemadir_arg ne "" ) { $schemadir = "schemadir: $schemadir_arg\n"; } $entry = "${dn}${misc}${cn}${basedn}${schemadir}"; 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 Wed Jul 2 16:14:43 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 2 Jul 2008 12:14:43 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.70, 1.71 Makefile.in, 1.90, 1.91 aclocal.m4, 1.68, 1.69 config.guess, 1.50, 1.51 config.h.in, 1.17, 1.18 config.sub, 1.50, 1.51 configure, 1.85, 1.86 depcomp, 1.51, 1.52 install-sh, 1.51, 1.52 ltmain.sh, 1.26, 1.27 missing, 1.51, 1.52 Message-ID: <200807021614.m62GEh3f004156@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4022 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: #450753 Summary: Add CLI for dynamic reload schema file task Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- Makefile.am 19 Jun 2008 15:18:18 -0000 1.70 +++ Makefile.am 2 Jul 2008 16:14:38 -0000 1.71 @@ -242,6 +242,7 @@ ldap/admin/src/scripts/template-ns-activate.pl \ ldap/admin/src/scripts/template-ns-inactivate.pl \ ldap/admin/src/scripts/template-ns-newpwpolicy.pl \ + ldap/admin/src/scripts/template-schema-reload.pl \ ldap/admin/src/scripts/template-verify-db.pl \ ldap/admin/src/scripts/template-dbverify View full diff with command: /usr/bin/cvs -f diff -kk -u -N -r 1.90 -r 1.91 Makefile.in Index: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.90 retrieving revision 1.91 diff -u -r1.90 -r1.91 --- Makefile.in 19 Jun 2008 15:18:18 -0000 1.90 +++ Makefile.in 2 Jul 2008 16:14:38 -0000 1.91 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005 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,11 +18,15 @@ +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 @@ -43,11 +47,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 \ @@ -57,7 +61,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno + configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = @@ -122,9 +126,6 @@ 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 \ @@ -187,16 +188,10 @@ 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 = @@ -227,9 +222,6 @@ 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 \ @@ -241,47 +233,29 @@ 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 \ ldap/servers/plugins/memberof/libmemberof_plugin_la-memberof_config.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) @@ -353,10 +327,6 @@ 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 = @@ -368,15 +338,9 @@ 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 \ @@ -388,15 +352,9 @@ 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 \ @@ -455,9 +413,6 @@ 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 \ @@ -467,25 +422,15 @@ 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) \ [...6023 lines suppressed...] + $(AWK) ' { files[$$0] = 1; } \ + END { 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) \ @@ -8908,12 +8854,13 @@ 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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique @@ -8928,22 +8875,24 @@ distdir: $(DISTFILES) $(am__remove_distdir) - 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 \ + 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; \ 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; \ @@ -8957,7 +8906,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 $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(SHELL) $(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 @@ -8967,10 +8916,6 @@ 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) @@ -8997,8 +8942,6 @@ 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*) \ @@ -9038,7 +8981,7 @@ $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -9064,7 +9007,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 @@ -9198,21 +9141,13 @@ 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 @@ -9236,47 +9171,46 @@ ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ - 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 + 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 .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-lzma dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-compile \ + dist dist-all dist-bzip2 dist-gzip 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-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ + install-data install-data-am install-exec install-exec-am \ install-infDATA install-info install-info-am \ install-initSCRIPTS install-initconfigSCRIPTS install-man \ - 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-mibDATA install-nodist_propertyDATA \ + install-perlSCRIPTS install-propertyDATA \ + 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-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-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 dirver.h: Makefile Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- aclocal.m4 10 Jun 2008 20:24:01 -0000 1.68 +++ aclocal.m4 2 Jul 2008 16:14:39 -0000 1.69 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.10.1 -*- Autoconf -*- +# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 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. @@ -11,17 +11,9 @@ # 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 51 AC_PROG_LIBTOOL +# serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -184,7 +176,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_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= @@ -271,9 +263,8 @@ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext +[ac_outfile=conftest.$ac_objext +printf "$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* @@ -285,9 +276,8 @@ # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext +[ac_outfile=conftest.$ac_objext +printf "$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* @@ -303,20 +293,12 @@ # 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_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"` +[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; } +}'` # 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 "$lt_aix_libpath_sed"` -fi],[]) +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="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX @@ -547,17 +529,13 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -s390*-*linux*|sparc*-*linux*) +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" ;; @@ -573,11 +551,7 @@ 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" ;; @@ -649,7 +623,7 @@ AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + printf "$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. @@ -690,12 +664,11 @@ # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_CACHE_CHECK([$1], [$2], +[AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext + printf "$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 @@ -809,27 +782,24 @@ fi ;; *) - 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` \ + # 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` \ = "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` - fi + 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` ;; esac ]) @@ -1056,8 +1026,7 @@ # --------------------------------- # 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_PROG_SED])dnl -AC_REQUIRE([_LT_AC_SYS_COMPILER])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 @@ -1065,7 +1034,7 @@ mkdir conftest cd conftest mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + printf "$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 @@ -1205,7 +1174,6 @@ darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" - old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -1223,8 +1191,7 @@ # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) +[AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= @@ -1238,58 +1205,20 @@ 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 - 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 + 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 # 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. - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else - lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + sys_lib_search_path_spec=`echo "$sys_lib_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 @@ -1446,8 +1375,12 @@ shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) + # 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 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; @@ -1464,6 +1397,18 @@ 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. @@ -1501,7 +1446,7 @@ shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; - *) # from 4.6 on, and DragonFly + freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; @@ -1564,7 +1509,7 @@ postinstall_cmds='chmod 555 $lib' ;; -interix[[3-9]]*) +interix3*) version_type=linux need_lib_prefix=no need_version=no @@ -1619,7 +1564,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux*) version_type=linux need_lib_prefix=no need_version=no @@ -1632,13 +1577,11 @@ # 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>/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" + 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 @@ -1650,6 +1593,18 @@ 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 @@ -1731,10 +1686,6 @@ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; -rdos*) - dynamic_linker=no - ;; - solaris*) version_type=linux need_lib_prefix=no @@ -1840,8 +1791,7 @@ # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_ARG_WITH([tags], +[AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) @@ -2102,7 +2052,7 @@ # AC_PATH_TOOL_PREFIX # ------------------- -# find a file program which can recognize shared library +# find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) @@ -2165,7 +2115,7 @@ # AC_PATH_MAGIC # ------------- -# find a file program which can recognize a shared library +# find a file program which can recognise 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 @@ -2312,7 +2262,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 recognize dependent libraries], +[AC_CACHE_CHECK([how to recognise dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= @@ -2351,22 +2301,16 @@ 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', - # 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 + # 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' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly*) +freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) @@ -2404,7 +2348,7 @@ esac ;; -interix[[3-9]]*) +interix3*) # 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)$' ;; @@ -2420,7 +2364,7 @@ ;; # This must be Linux ELF. -linux* | k*bsd*-gnu) +linux*) lt_cv_deplibs_check_method=pass_all ;; @@ -2454,10 +2398,6 @@ lt_cv_deplibs_check_method=pass_all ;; -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - solaris*) lt_cv_deplibs_check_method=pass_all ;; @@ -2510,7 +2450,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 @@ -2726,10 +2666,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' +lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER @@ -2831,10 +2771,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" +lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests -lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' +lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -2980,7 +2920,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 @@ -3139,10 +3079,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` $xlcverstring' + _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(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 $xlcverstring~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 $verstring~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}' ;; *) @@ -3176,7 +3116,7 @@ freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly*) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -3225,7 +3165,9 @@ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in - hppa*64*|ia64*) ;; + hppa*64*|ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; @@ -3293,7 +3235,7 @@ ;; esac ;; - interix[[3-9]]*) + interix3*) _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' @@ -3333,7 +3275,7 @@ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; - linux* | k*bsd*-gnu) + linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -3413,29 +3355,6 @@ # 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*) @@ -3474,20 +3393,16 @@ _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) - 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 + _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' ;; osf3*) case $cc_basename in @@ -3649,10 +3564,15 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # 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. # Supported since Solaris 2.6 (maybe 2.5.1?) - _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 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes @@ -3699,12 +3619,6 @@ 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 @@ -3948,7 +3862,7 @@ # PORTME: override above test on systems where it is broken ifelse([$1],[CXX], [case $host_os in -interix[[3-9]]*) +interix3*) # 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)= @@ -3956,46 +3870,13 @@ _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. - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' ;; esac ;; @@ -4044,17 +3925,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="\ - subroutine t - return - end -" +lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests -lt_simple_link_test_code="\ - program t - end -" +lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4133,10 +4007,10 @@ _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" +lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' +lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER @@ -4189,7 +4063,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 }' +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" @@ -4278,7 +4152,6 @@ _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 @@ -4325,7 +4198,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, 2002, 2003, 2004, 2005, 2006, 2007 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: @@ -4650,7 +4523,7 @@ sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) @@ -4733,7 +4606,6 @@ # --------------------------------- 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. @@ -4770,7 +4642,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* | k*bsd*-gnu) +linux*) 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'" @@ -4960,14 +4832,12 @@ # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | os2* | pw32*) + mingw* | 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*) @@ -4979,7 +4849,7 @@ # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; - interix[[3-9]]*) + interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5045,7 +4915,7 @@ ;; esac ;; - freebsd* | dragonfly*) + freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -5088,7 +4958,7 @@ ;; esac ;; - linux* | k*bsd*-gnu) + linux*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -5115,14 +4985,6 @@ _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 ;; @@ -5243,15 +5105,13 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | 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' ;; @@ -5261,7 +5121,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; - interix[[3-9]]*) + interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; @@ -5319,7 +5179,7 @@ esac ;; - mingw* | cygwin* | pw32* | os2*) + mingw* | 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' @@ -5352,7 +5212,7 @@ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; - linux* | k*bsd*-gnu) + linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -5371,22 +5231,6 @@ # 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 ;; @@ -5396,10 +5240,6 @@ _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' @@ -5494,8 +5334,7 @@ # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], -[AC_REQUIRE([LT_AC_PROG_SED])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +[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 @@ -5512,7 +5351,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' @@ -5651,7 +5490,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/'\'' -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/'\'' | $SED -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' @@ -5669,7 +5508,7 @@ fi ;; - interix[[3-9]]*) + interix3*) _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' @@ -5684,7 +5523,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' ;; - gnu* | linux* | k*bsd*-gnu) + linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in @@ -5702,22 +5541,13 @@ ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac - 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' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + $CC -shared'"$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 @@ -5757,7 +5587,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 @@ -5876,7 +5706,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 @@ -5969,7 +5799,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 ;; @@ -6011,10 +5841,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` $xlcverstring' + _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(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 $xlcverstring~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 $verstring~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}' ;; *) @@ -6054,7 +5884,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) + freebsd* | kfreebsd*-gnu | 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 @@ -6176,28 +6006,24 @@ ;; openbsd*) - 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 + _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 - _LT_AC_TAGVAR(ld_shlibs, $1)=no + 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 ;; @@ -6256,16 +6082,17 @@ case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) - # 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. + # 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. # Supported since Solaris 2.6 (maybe 2.5.1?) - 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 - ;; + 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 ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; @@ -6322,7 +6149,7 @@ fi ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _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 @@ -6397,7 +6224,7 @@ # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest @@ -6500,30 +6327,6 @@ [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 # @@ -6544,13 +6347,12 @@ 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 @@ -6583,11 +6385,10 @@ done ]) SED=$lt_cv_path_SED -AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -6597,31 +6398,14 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -# (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], []) +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[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_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -6678,14 +6462,14 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +# Copyright (C) 1997, 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 8 +# serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -6694,10 +6478,8 @@ [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])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' @@ -6711,14 +6493,15 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + +# Copyright (C) 1999, 2000, 2001, 2002, 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 9 +# serial 8 # 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, @@ -6746,7 +6529,6 @@ 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=]) @@ -6812,7 +6594,6 @@ 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 @@ -6865,8 +6646,7 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -6891,9 +6671,8 @@ # 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. - # 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 + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -6940,14 +6719,14 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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 13 +# serial 12 # 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. @@ -6964,20 +6743,16 @@ # 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.60])dnl +[AC_PREREQ([2.58])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 -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 +# 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]) fi # test whether we have cygpath @@ -6997,9 +6772,6 @@ 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 @@ -7035,10 +6807,6 @@ [_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 ]) ]) @@ -7052,17 +6820,16 @@ # 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 - $_am_arg | $_am_arg:* ) + $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # @@ -7075,7 +6842,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -7180,14 +6947,13 @@ rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2003, 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 5 +# serial 3 # AM_PROG_CC_C_O # -------------- @@ -7195,7 +6961,6 @@ 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 @@ -7208,22 +6973,18 @@ # 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, 2004, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 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 5 +# serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -7239,7 +7000,6 @@ # 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 @@ -7250,7 +7010,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 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, @@ -7258,23 +7018,60 @@ # AM_PROG_MKDIR_P # --------------- -# Check for `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.) AC_DEFUN([AM_PROG_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 -]) +[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])]) # Helper functions for option handling. -*- Autoconf -*- @@ -7386,21 +7183,9 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\${SHELL} \$(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.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- config.guess 10 Jun 2008 20:24:01 -0000 1.50 +++ config.guess 2 Jul 2008 16:14:39 -0000 1.51 @@ -1,10 +1,9 @@ #! /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, 2006, 2007, 2008 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2008-01-08' +timestamp='2005-07-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 @@ -56,8 +55,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, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +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." @@ -107,7 +106,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 "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d -q "$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 ; } ; @@ -161,7 +160,6 @@ 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 @@ -208,11 +206,8 @@ *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -330,7 +325,7 @@ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) @@ -532,7 +527,7 @@ echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[45]) 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 @@ -769,19 +764,12 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - 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 + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - *:MINGW*:*) + i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) @@ -791,18 +779,9 @@ i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 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 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; @@ -815,7 +794,7 @@ i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) @@ -836,16 +815,6 @@ 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:*:*) @@ -882,11 +851,7 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) @@ -905,16 +870,9 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 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 ;; @@ -958,15 +916,9 @@ 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 @@ -1009,7 +961,7 @@ LIBC=gnulibc1 # endif #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) + #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout @@ -1019,11 +971,7 @@ LIBC=dietlibc #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit @@ -1225,15 +1173,6 @@ 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 ;; @@ -1243,6 +1182,7 @@ *: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} @@ -1321,9 +1261,6 @@ 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.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- config.h.in 10 Jun 2008 20:24:02 -0000 1.17 +++ config.h.in 2 Jul 2008 16:14:39 -0000 1.18 @@ -374,7 +374,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned int' if does not define. */ +/* Define to `unsigned' if does not define. */ #undef size_t /* SunOS5 */ Index: config.sub =================================================================== RCS file: /cvs/dirsec/ldapserver/config.sub,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- config.sub 10 Jun 2008 20:24:02 -0000 1.50 +++ config.sub 2 Jul 2008 16:14:39 -0000 1.51 @@ -1,10 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2008-01-16' +timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -72,8 +71,8 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +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." @@ -120,9 +119,8 @@ # 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-newlib* | 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-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/'` ;; @@ -173,10 +171,6 @@ -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/'` @@ -193,10 +187,6 @@ # 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/'` @@ -241,16 +231,15 @@ | 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 | avr32 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -268,27 +257,28 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | mt \ + | ms1 \ | msp430 \ - | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ + | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | 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 @@ -296,9 +286,6 @@ ;; 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 @@ -318,18 +305,18 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ + | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -349,33 +336,30 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | mt-* \ + | ms1-* \ | 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-* | sheb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown + m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -447,14 +431,6 @@ 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 @@ -487,8 +463,8 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16) - basic_machine=cr16-unknown + cr16c) + basic_machine=cr16c-unknown os=-elf ;; crds | unos) @@ -680,14 +656,6 @@ 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 ;; @@ -703,10 +671,6 @@ basic_machine=i386-pc os=-mingw32 ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) basic_machine=m68000-convergent ;; @@ -732,9 +696,6 @@ basic_machine=i386-pc os=-msdos ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; mvs) basic_machine=i370-ibm os=-mvs @@ -833,14 +794,6 @@ 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 ;; @@ -850,12 +803,6 @@ 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 ;; @@ -912,10 +859,6 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -942,10 +885,6 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; sei) basic_machine=mips-sei os=-seiux @@ -957,9 +896,6 @@ basic_machine=sh-hitachi os=-hms ;; - sh5el) - basic_machine=sh5le-unknown - ;; sh64) basic_machine=sh64-unknown ;; @@ -1049,10 +985,6 @@ basic_machine=tic6x-unknown os=-coff ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; tx39) basic_machine=mipstx39-unknown ;; @@ -1169,7 +1101,7 @@ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1242,23 +1174,21 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -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-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -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* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1410,12 +1340,6 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; *-acorn) os=-riscix1.2 ;; @@ -1425,9 +1349,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1453,9 +1377,6 @@ 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.85 -r 1.86 configure Index: configure =================================================================== RCS file: /cvs/dirsec/ldapserver/configure,v retrieving revision 1.85 retrieving revision 1.86 diff -u -r1.85 -r1.86 --- configure 10 Jun 2008 20:24:02 -0000 1.85 +++ configure 2 Jul 2008 16:14:39 -0000 1.86 @@ -1,56 +1,27 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for dirsrv 1.1.1. +# Generated by GNU Autoconf 2.59 for dirsrv 1.1.1. # # Report bugs to . # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003 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 more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh +# Be 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 - - - - -# 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 +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix fi +DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -60,43 +31,8 @@ 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. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done +$as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' @@ -110,19 +46,18 @@ 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) >/dev/null 2>&1 && $as_unset $as_var + $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then +if expr a : '\(a\)' >/dev/null 2>&1; 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 @@ -130,388 +65,157 @@ # 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'` - -# CDPATH. -$as_unset CDPATH - + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` -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 () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} -exitcode=0 -if as_func_success; then - : [...19316 lines suppressed...] - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + 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 + + + { 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 # 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. @@ -27470,32 +26700,20 @@ # 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. - # 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" || + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || $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 @@ -27517,79 +26735,53 @@ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + fdir=`(dirname "$file") 2>/dev/null || $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'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + 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 as_dirs= - 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" || + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || $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'` - test -d "$as_dir" && break + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` done - 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;} + 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;} { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; - esac -done # for ac_tag +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF Index: depcomp =================================================================== RCS file: /cvs/dirsec/ldapserver/depcomp,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- depcomp 10 Jun 2008 20:24:02 -0000 1.51 +++ depcomp 2 Jul 2008 16:14:39 -0000 1.52 @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2007-03-29.01 +scriptversion=2005-07-09.11 -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005 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 @@ -92,20 +91,7 @@ ## 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. -## 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 - "$@" + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else @@ -215,39 +201,34 @@ # 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. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" 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 "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + rm -f "$tmpdepfile" 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -295,46 +276,6 @@ 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'. @@ -347,13 +288,13 @@ if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to + # static library. This mecanism 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 $dir.libs/$base.o.d and + # compilations output dependencies in 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.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- install-sh 10 Jun 2008 20:24:02 -0000 1.51 +++ install-sh 2 Jul 2008 16:14:39 -0000 1.52 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-12-25.00 +scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -39,68 +39,38 @@ # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit="${DOITPROG-}" -# Put in absolute file names if you don't have them in your path; -# or use environment vars. +# put in absolute paths if you don't have them in your path; or use env. vars. -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 - } -' +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog +chmodcmd="$chmodprog 0755" chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" +chgrpcmd= stripcmd= - +rmcmd="$rmprog -f" +mvcmd="$mvprog" src= dst= dir_arg= -dst_arg= - -copy_on_change=false +dstarg= 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... @@ -110,86 +80,81 @@ In the 4th, create DIRECTORIES. Options: - --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. +-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. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " -while test $# -ne 0; do +while test -n "$1"; do case $1 in - -c) ;; + -c) shift + continue;; - -C) copy_on_change=true;; - - -d) dir_arg=true;; + -d) dir_arg=true + shift + continue;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift + shift + continue;; --help) echo "$usage"; exit $?;; - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - shift;; - - -T) no_target_directory=true;; + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift + *) # 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 break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; esac - shift done -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 "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 @@ -199,47 +164,24 @@ 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 - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else + src= + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + 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 '*'. @@ -248,199 +190,71 @@ exit 1 fi - if test -z "$dst_arg"; then + if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg + dst=$dstarg # 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: $dst_arg: Is a directory" >&2 + echo "$0: $dstarg: Is a directory" >&2 exit 1 fi - 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=$? + dst=$dst/`basename "$src"` fi fi - obsolete_mkdir_used=false - - 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 + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else + # Make sure that the destination directory exists. - # 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 - $posix_glob set +f - IFS=$oIFS + # 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 - prefixes= + pathcomp= - 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 + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + 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 fi - fi + pathcomp=$pathcomp/ + done fi if test -n "$dir_arg"; then - { 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 + $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"; } + else + dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -448,9 +262,10 @@ # 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. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # @@ -458,59 +273,48 @@ # 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 $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 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 + { 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 +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit 0 +} + # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" Index: ltmain.sh =================================================================== RCS file: /cvs/dirsec/ldapserver/ltmain.sh,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- ltmain.sh 10 Jun 2008 20:24:02 -0000 1.26 +++ ltmain.sh 2 Jul 2008 16:14:39 -0000 1.27 @@ -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: missing =================================================================== RCS file: /cvs/dirsec/ldapserver/missing,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- missing 10 Jun 2008 20:24:02 -0000 1.51 +++ missing 2 Jul 2008 16:14:39 -0000 1.52 @@ -1,9 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2006-05-10.23 +scriptversion=2005-06-08.21 -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. @@ -33,8 +33,6 @@ 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. @@ -46,7 +44,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= @@ -79,7 +77,6 @@ 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 @@ -109,7 +106,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. ;; @@ -138,7 +135,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 @@ -167,7 +164,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";; @@ -195,8 +192,8 @@ You can get \`$1' as part of \`Autoconf' from any GNU archive site." - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else @@ -217,25 +214,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 test $# -ne 1; then + if [ $# -ne 1 ]; then eval LASTARG="\${$#}" - case $LASTARG in + case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if test ! -f y.tab.h; then + if [ ! -f y.tab.h ]; then echo >y.tab.h fi - if test ! -f y.tab.c; then + if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; @@ -247,18 +244,18 @@ in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c - if test $# -ne 1; then + if [ $# -ne 1 ]; then eval LASTARG="\${$#}" - case $LASTARG in + case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then + if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if test ! -f lex.yy.c; then + if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; @@ -270,9 +267,11 @@ \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then + 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 touch $file else test -z "$file" || exec >$file @@ -290,17 +289,11 @@ 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 "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` 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 @@ -324,13 +317,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 Jul 2 18:15:25 2008 From: fedora-directory-commits at redhat.com (Noriko Hosoi (nhosoi)) Date: Wed, 2 Jul 2008 14:15:25 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi-plugin.h, 1.23, 1.24 entrywsi.c, 1.5, 1.6 valueset.c, 1.7, 1.8 Message-ID: <200807021815.m62IFPts025537@cvs-int.fedora.redhat.com> Author: nhosoi Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25444/ldap/servers/slapd Modified Files: slapi-plugin.h entrywsi.c valueset.c Log Message: Resoves: #428929 Summary: Directory server is caching string case for attributes with Directorystring syntax even after deletion Description: Introduced a new flag SLAPI_VALUE_FLAG_USENEWVALUE for valueset_remove_valuearr to exchange the value in the deleted value set and the to be added value. With this change, the newly added value is resurrected instead of the original value. Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- slapi-plugin.h 27 Jun 2008 19:28:21 -0000 1.23 +++ slapi-plugin.h 2 Jul 2008 18:15:22 -0000 1.24 @@ -470,6 +470,8 @@ #define SLAPI_VALUE_FLAG_PASSIN 0x1 #define SLAPI_VALUE_FLAG_IGNOREERROR 0x2 #define SLAPI_VALUE_FLAG_PRESERVECSNSET 0x4 +#define SLAPI_VALUE_FLAG_USENEWVALUE 0x8 /* see valueset_remove_valuearray */ + Slapi_ValueSet *slapi_valueset_new( void ); void slapi_valueset_free(Slapi_ValueSet *vs); void slapi_valueset_init(Slapi_ValueSet *vs); Index: entrywsi.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entrywsi.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- entrywsi.c 10 Nov 2006 23:45:40 -0000 1.5 +++ entrywsi.c 2 Jul 2008 18:15:22 -0000 1.6 @@ -497,7 +497,10 @@ break; } /* Check if any of the values to be added are on the deleted list */ - valueset_remove_valuearray(&a->a_deleted_values, a, valuestoadd, SLAPI_VALUE_FLAG_IGNOREERROR,&deletedvalues); /* JCM Check return code */ + valueset_remove_valuearray(&a->a_deleted_values, + a, valuestoadd, + SLAPI_VALUE_FLAG_IGNOREERROR|SLAPI_VALUE_FLAG_USENEWVALUE, + &deletedvalues); /* JCM Check return code */ if(deletedvalues!=NULL && deletedvalues[0]!=NULL) { /* Some of the values to be added were on the deleted list */ Index: valueset.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/valueset.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- valueset.c 10 Nov 2006 23:45:40 -0000 1.7 +++ valueset.c 2 Jul 2008 18:15:22 -0000 1.8 @@ -1053,6 +1053,16 @@ * Remove an array of values from a value set. * The removed values are passed back in an array. * + * Flags + * SLAPI_VALUE_FLAG_PRESERVECSNSET - csnset in the value set is duplicated and + * preserved in the matched element of the + * array of values. + * SLAPI_VALUE_FLAG_IGNOREERROR - ignore an error: Couldn't find the value to + * be deleted. + * SLAPI_VALUE_FLAG_USENEWVALUE - replace the value between the value set and + * the matched element of the array of values + * (used by entry_add_present_values_wsi). + * * Returns * LDAP_SUCCESS - OK. * LDAP_NO_SUCH_ATTRIBUTE - A value to be deleted was not in the value set. @@ -1110,12 +1120,23 @@ /* Move the value to be removed to the out array */ if ( va_out ) { - if (vs->va[index]->v_csnset && (flags & SLAPI_VALUE_FLAG_PRESERVECSNSET)) + if (vs->va[index]->v_csnset && + (flags & SLAPI_VALUE_FLAG_PRESERVECSNSET| + SLAPI_VALUE_FLAG_USENEWVALUE)) { valuestodelete[i]->v_csnset = csnset_dup (vs->va[index]->v_csnset); } - valuearrayfast_add_value_passin(&vaf_out,vs->va[index]); - vs->va[index] = NULL; + if (flags & SLAPI_VALUE_FLAG_USENEWVALUE) + { + valuearrayfast_add_value_passin(&vaf_out,valuestodelete[i]); + valuestodelete[i] = vs->va[index]; + vs->va[index] = NULL; + } + else + { + valuearrayfast_add_value_passin(&vaf_out,vs->va[index]); + vs->va[index] = NULL; + } } else { @@ -1170,11 +1191,21 @@ { if ( va_out ) { - if (found->v_csnset && (flags & SLAPI_VALUE_FLAG_PRESERVECSNSET)) + if (found->v_csnset && + (flags & SLAPI_VALUE_FLAG_PRESERVECSNSET| + SLAPI_VALUE_FLAG_USENEWVALUE)) { valuestodelete[i]->v_csnset = csnset_dup (found->v_csnset); } - valuearrayfast_add_value_passin(&vaf_out,found); + if (flags & SLAPI_VALUE_FLAG_USENEWVALUE) + { + valuearrayfast_add_value_passin(&vaf_out,valuestodelete[i]); + valuestodelete[i] = found; + } + else + { + valuearrayfast_add_value_passin(&vaf_out,found); + } } else { From fedora-directory-commits at redhat.com Wed Jul 9 16:50:35 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 12:50:35 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl_ext.c, 1.5, 1.5.2.1 Message-ID: <200807091650.m69GoZhn001489@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1388/plugins/acl Modified Files: Tag: Directory71RtmBranch acl_ext.c Log Message: Resolves: 440333 Summary: Fix valgrind errors about use of uninitialized values. Index: acl_ext.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- acl_ext.c 19 Apr 2005 22:07:28 -0000 1.5 +++ acl_ext.c 9 Jul 2008 16:50:32 -0000 1.5.2.1 @@ -640,7 +640,7 @@ struct acl_cblock *aclcb = NULL; char *authType; void *conn; - unsigned long op_type; + int op_type; if ( NULL == aclpb ) { From fedora-directory-commits at redhat.com Wed Jul 9 16:50:35 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 12:50:35 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd log.c, 1.6.2.5, 1.6.2.6 Message-ID: <200807091650.m69GoZdm001495@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1388/slapd Modified Files: Tag: Directory71RtmBranch log.c Log Message: Resolves: 440333 Summary: Fix valgrind errors about use of uninitialized values. Index: log.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v retrieving revision 1.6.2.5 retrieving revision 1.6.2.6 diff -u -r1.6.2.5 -r1.6.2.6 --- log.c 21 Dec 2007 21:35:08 -0000 1.6.2.5 +++ log.c 9 Jul 2008 16:50:33 -0000 1.6.2.6 @@ -3897,7 +3897,7 @@ static time_t log_reverse_convert_time(char *tbuf) { - struct tm tm; + struct tm tm = {0}; if (strchr(tbuf, '-')) { /* short format */ strptime(tbuf, "%Y%m%d-%H%M%S", &tm); From fedora-directory-commits at redhat.com Wed Jul 9 17:02:58 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 13:02:58 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm index.c, 1.5.2.2, 1.5.2.3 Message-ID: <200807091702.m69H2wm3010129@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-serv10015/slapd/back-ldbm Modified Files: Tag: Directory71RtmBranch index.c Log Message: Resolves: 452169 Summary: Crash in indexing code when attribute is missing. Index: index.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/index.c,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -u -r1.5.2.2 -r1.5.2.3 --- index.c 11 Jan 2008 20:05:14 -0000 1.5.2.2 +++ index.c 9 Jul 2008 17:02:56 -0000 1.5.2.3 @@ -641,14 +641,22 @@ * 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, mods_valueArray, From fedora-directory-commits at redhat.com Wed Jul 9 17:08:18 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 13:08:18 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi-plugin.h, 1.8.2.2, 1.8.2.3 Message-ID: <200807091708.m69H8IgS010714@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10647/slapd Modified Files: Tag: Directory71RtmBranch slapi-plugin.h Log Message: Resolves: 454328 Summary: Use default stack size on LP64 systems instead of hard-coding to 256k. Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -r1.8.2.2 -r1.8.2.3 --- slapi-plugin.h 11 Jan 2008 20:52:46 -0000 1.8.2.2 +++ slapi-plugin.h 9 Jul 2008 17:08:15 -0000 1.8.2.3 @@ -165,9 +165,7 @@ #define SLAPD_DEFAULT_THREAD_STACKSIZE 262144L #elif ( defined ( AIX )) #define SLAPD_DEFAULT_THREAD_STACKSIZE 262144L -/* All 64-bit builds get a bigger stack size */ -#elif ( defined ( __LP64__ )) || defined (_LP64) -#define SLAPD_DEFAULT_THREAD_STACKSIZE 262144L +/* All other platforms use the default stack size */ #else #define SLAPD_DEFAULT_THREAD_STACKSIZE 0 #endif From fedora-directory-commits at redhat.com Wed Jul 9 17:27:20 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 13:27:20 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5_inc_protocol.c, 1.8, 1.8.2.1 Message-ID: <200807091727.m69HRKZg012749@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12621/plugins/replication Modified Files: Tag: Directory71RtmBranch repl5_inc_protocol.c Log Message: Resolves: 450973 Summary: Don't immediately exit in repl async thread when the consumer encounters an error. Index: repl5_inc_protocol.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_inc_protocol.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -r1.8 -r1.8.2.1 --- repl5_inc_protocol.c 4 May 2005 23:58:51 -0000 1.8 +++ repl5_inc_protocol.c 9 Jul 2008 17:27:18 -0000 1.8.2.1 @@ -288,6 +288,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) { @@ -322,6 +323,7 @@ } if (conres != CONN_TIMEOUT) { + int should_finish = 0; if (message_id) { rd->last_message_id_received = message_id; @@ -338,16 +340,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 Wed Jul 9 17:50:36 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 13:50:36 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5.h, 1.8, 1.8.2.1 repl5_inc_protocol.c, 1.8.2.1, 1.8.2.2 repl5_replica.c, 1.11, 1.11.2.1 repl_extop.c, 1.7.2.1, 1.7.2.2 windows_inc_protocol.c, 1.11, 1.11.2.1 Message-ID: <200807091750.m69HoauE014847@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14717/ldap/servers/plugins/replication Modified Files: Tag: Directory71RtmBranch repl5.h repl5_inc_protocol.c repl5_replica.c repl_extop.c windows_inc_protocol.c Log Message: Resolves: 233642 Summary: MMR breaks with time skew errors Index: repl5.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5.h,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -r1.8 -r1.8.2.1 --- repl5.h 6 May 2005 03:35:52 -0000 1.8 +++ repl5.h 9 Jul 2008 17:50:33 -0000 1.8.2.1 @@ -477,6 +477,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.8.2.1 retrieving revision 1.8.2.2 diff -u -r1.8.2.1 -r1.8.2.2 --- repl5_inc_protocol.c 9 Jul 2008 17:27:18 -0000 1.8.2.1 +++ repl5_inc_protocol.c 9 Jul 2008 17:50:33 -0000 1.8.2.2 @@ -1099,13 +1099,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.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- repl5_replica.c 19 Apr 2005 22:07:32 -0000 1.11 +++ repl5_replica.c 9 Jul 2008 17:50:33 -0000 1.11.2.1 @@ -1038,7 +1038,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; @@ -1052,34 +1052,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.7.2.1 retrieving revision 1.7.2.2 diff -u -r1.7.2.1 -r1.7.2.2 --- repl_extop.c 2 Mar 2006 01:11:55 -0000 1.7.2.1 +++ repl_extop.c 9 Jul 2008 17:50:33 -0000 1.7.2.2 @@ -546,7 +546,6 @@ Replica *replica = NULL; void *conn; consumer_connection_extension *connext = NULL; - CSN *mycsn = NULL; char *replicacsnstr = NULL; CSN *replicacsn = NULL; int zero = 0; @@ -699,55 +698,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 { @@ -984,11 +965,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.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- windows_inc_protocol.c 6 May 2005 03:33:36 -0000 1.11 +++ windows_inc_protocol.c 9 Jul 2008 17:50:33 -0000 1.11.2.1 @@ -795,13 +795,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 Jul 9 17:50:36 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 13:50:36 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd csngen.c, 1.5, 1.5.2.1 Message-ID: <200807091750.m69HoaRq014854@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14717/ldap/servers/slapd Modified Files: Tag: Directory71RtmBranch csngen.c Log Message: Resolves: 233642 Summary: MMR breaks with time skew errors Index: csngen.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/csngen.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- csngen.c 19 Apr 2005 22:07:36 -0000 1.5 +++ csngen.c 9 Jul 2008 17:50:34 -0000 1.5.2.1 @@ -55,6 +55,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) /* * ************************************************************************** @@ -268,8 +271,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; @@ -303,8 +305,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; @@ -314,21 +317,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) @@ -341,10 +361,18 @@ "adjustment limit exceeded; value - %d, limit - %d\n", remote_offset, 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); @@ -571,7 +599,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) @@ -583,7 +618,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 Wed Jul 9 19:41:47 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 15:41:47 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl.c, 1.6.2.1, 1.6.2.2 Message-ID: <200807091941.m69JflIn005140@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5023/plugins/acl Modified Files: Tag: Directory71RtmBranch acl.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. Index: acl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.c,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -u -r1.6.2.1 -r1.6.2.2 --- acl.c 11 Jan 2008 20:52:46 -0000 1.6.2.1 +++ acl.c 9 Jul 2008 19:41:44 -0000 1.6.2.2 @@ -3255,7 +3255,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 Wed Jul 9 19:41:47 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 15:41:47 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes string.c, 1.5.2.1, 1.5.2.2 Message-ID: <200807091941.m69JfliG005146@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5023/plugins/syntaxes Modified Files: Tag: Directory71RtmBranch string.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. Index: string.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/string.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- string.c 30 Apr 2008 20:57:44 -0000 1.5.2.1 +++ string.c 9 Jul 2008 19:41:45 -0000 1.5.2.2 @@ -189,9 +189,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 @@ -253,18 +264,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 */ @@ -290,22 +304,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 Wed Jul 9 19:41:48 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 15:41:48 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_search.c, 1.6.2.2, 1.6.2.3 Message-ID: <200807091941.m69JfmuG005166@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-serv5023/slapd/back-ldbm Modified Files: Tag: Directory71RtmBranch ldbm_search.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. Index: ldbm_search.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_search.c,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -u -r1.6.2.2 -r1.6.2.3 --- ldbm_search.c 11 Jan 2008 19:20:24 -0000 1.6.2.2 +++ ldbm_search.c 9 Jul 2008 19:41:46 -0000 1.6.2.3 @@ -1303,6 +1303,10 @@ { /* Failed the filter test, and this isn't a VLV Search */ cache_return( &inst->inst_cache, &(sr->sr_entry) ); + if (LDAP_TIMELIMIT_EXCEEDED == filter_test) { + slapi_send_ldap_result( pb, LDAP_TIMELIMIT_EXCEEDED, NULL, NULL, nentries, urls ); + return -1; + } } } } From fedora-directory-commits at redhat.com Wed Jul 9 19:41:48 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Wed, 9 Jul 2008 15:41:48 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd entry.c, 1.8.2.2, 1.8.2.3 filterentry.c, 1.4.2.1, 1.4.2.2 getfilelist.c, 1.6, 1.6.2.1 plugin_syntax.c, 1.4, 1.4.2.1 proto-slap.h, 1.10.2.4, 1.10.2.5 regex.c, 1.4.2.1, 1.4.2.2 sasl_map.c, 1.7, 1.7.2.1 slapi-private.h, 1.8.2.1, 1.8.2.2 vattr.c, 1.5, 1.5.2.1 Message-ID: <200807091941.m69Jfm8v005156@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5023/slapd Modified Files: Tag: Directory71RtmBranch entry.c filterentry.c getfilelist.c plugin_syntax.c proto-slap.h regex.c sasl_map.c slapi-private.h vattr.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. Index: entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -r1.8.2.2 -r1.8.2.3 --- entry.c 25 Aug 2005 18:25:08 -0000 1.8.2.2 +++ entry.c 9 Jul 2008 19:41:45 -0000 1.8.2.3 @@ -1855,7 +1855,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.4.2.1 retrieving revision 1.4.2.2 diff -u -r1.4.2.1 -r1.4.2.2 --- filterentry.c 16 Jan 2008 01:50:17 -0000 1.4.2.1 +++ filterentry.c 9 Jul 2008 19:41:45 -0000 1.4.2.2 @@ -688,7 +688,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; } @@ -721,8 +721,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.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- getfilelist.c 19 Apr 2005 22:07:36 -0000 1.6 +++ getfilelist.c 9 Jul 2008 19:41:45 -0000 1.6.2.1 @@ -125,7 +125,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.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- plugin_syntax.c 19 Apr 2005 22:07:36 -0000 1.4 +++ plugin_syntax.c 9 Jul 2008 19:41:45 -0000 1.4.2.1 @@ -206,15 +206,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 ) @@ -235,6 +237,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.10.2.4 retrieving revision 1.10.2.5 diff -u -r1.10.2.4 -r1.10.2.5 --- proto-slap.h 11 Jan 2008 01:09:14 -0000 1.10.2.4 +++ proto-slap.h 9 Jul 2008 19:41:45 -0000 1.10.2.5 @@ -672,8 +672,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.4.2.1 retrieving revision 1.4.2.2 diff -u -r1.4.2.1 -r1.4.2.2 --- regex.c 30 Apr 2008 20:57:44 -0000 1.4.2.1 +++ regex.c 9 Jul 2008 19:41:45 -0000 1.4.2.2 @@ -61,6 +61,10 @@ * Modification history: * * $Log$ + * Revision 1.4.2.2 2008/07/09 19:41:45 nkinder + * Resolves: 448831 + * Summary: Make regex code obey search timelimit. + * * Revision 1.4.2.1 2008/04/30 20:57:44 nhosoi * Resolves: #182621 * Summary: Allow larger regex buffer to enable long substring filters @@ -679,7 +683,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 */ @@ -704,14 +708,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; @@ -729,7 +737,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); @@ -739,7 +747,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); @@ -748,6 +756,8 @@ case END: /* munged automaton. fail always */ return 0; } + if (ldaperror) + return ldaperror; if (!ep) return 0; @@ -828,13 +838,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) { @@ -911,7 +927,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.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- sasl_map.c 25 Apr 2005 20:38:29 -0000 1.7 +++ sasl_map.c 9 Jul 2008 19:41:45 -0000 1.7.2.1 @@ -429,9 +429,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.8.2.1 retrieving revision 1.8.2.2 diff -u -r1.8.2.1 -r1.8.2.2 --- slapi-private.h 26 Aug 2005 15:44:35 -0000 1.8.2.1 +++ slapi-private.h 9 Jul 2008 19:41:45 -0000 1.8.2.2 @@ -1159,7 +1159,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.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- vattr.c 19 Apr 2005 22:07:37 -0000 1.5 +++ vattr.c 9 Jul 2008 19:41:45 -0000 1.5.2.1 @@ -510,7 +510,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); } @@ -582,7 +582,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 ) { From fedora-directory-commits at redhat.com Thu Jul 10 19:43:20 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 15:43:20 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd filterentry.c, 1.4.2.2, 1.4.2.3 slapi-private.h, 1.8.2.2, 1.8.2.3 vattr.c, 1.5.2.1, 1.5.2.2 Message-ID: <200807101943.m6AJhKDX010069@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9966/servers/slapd Modified Files: Tag: Directory71RtmBranch filterentry.c slapi-private.h vattr.c Log Message: Related: 448831 Summary: Need to pass pb to vattr_test_filter for fix for bug 448831 to work properly. Index: filterentry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/filterentry.c,v retrieving revision 1.4.2.2 retrieving revision 1.4.2.3 diff -u -r1.4.2.2 -r1.4.2.3 --- filterentry.c 9 Jul 2008 19:41:45 -0000 1.4.2.2 +++ filterentry.c 10 Jul 2008 19:43:17 -0000 1.4.2.3 @@ -857,7 +857,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type ); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type ); break; case LDAP_FILTER_SUBSTRINGS: @@ -869,7 +869,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_SUBSTRING, f->f_sub_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_SUBSTRING, f->f_sub_type); break; case LDAP_FILTER_GE: @@ -882,7 +882,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); break; case LDAP_FILTER_LE: @@ -895,7 +895,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); break; case LDAP_FILTER_PRESENT: @@ -907,7 +907,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_PRES, f->f_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_PRES, f->f_type); break; case LDAP_FILTER_APPROX: @@ -920,7 +920,7 @@ if ( only_check_access || rc != LDAP_SUCCESS ) { return( rc ); } - rc = vattr_test_filter( e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); + rc = vattr_test_filter( pb, e, f, FILTER_TYPE_AVA, f->f_ava.ava_type); break; case LDAP_FILTER_EXTENDED: Index: slapi-private.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -u -r1.8.2.2 -r1.8.2.3 --- slapi-private.h 9 Jul 2008 19:41:45 -0000 1.8.2.2 +++ slapi-private.h 10 Jul 2008 19:43:17 -0000 1.8.2.3 @@ -465,7 +465,8 @@ void slapi_vattrcache_cache_all(); void slapi_vattrcache_cache_none(); -int vattr_test_filter(/* Entry we're interested in */ Slapi_Entry *e, +int vattr_test_filter( Slapi_PBlock *pb, + /* Entry we're interested in */ Slapi_Entry *e, Slapi_Filter *f, filter_type_t filter_type, char *type); Index: vattr.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/vattr.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- vattr.c 9 Jul 2008 19:41:45 -0000 1.5.2.1 +++ vattr.c 10 Jul 2008 19:43:17 -0000 1.5.2.2 @@ -383,7 +383,8 @@ * >0 an ldap error code * */ -int vattr_test_filter( /* Entry we're interested in */ Slapi_Entry *e, +int vattr_test_filter( Slapi_PBlock *pb, + /* Entry we're interested in */ Slapi_Entry *e, Slapi_Filter *f, filter_type_t filter_type, char * type) { From fedora-directory-commits at redhat.com Thu Jul 10 22:41:40 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 18:41:40 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd slapi-plugin.h, 1.19, 1.19.2.1 Message-ID: <200807102241.m6AMfe4X028756@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28674/ldap/servers/slapd Modified Files: Tag: Directory_Server_8_0_Branch slapi-plugin.h Log Message: Resolves: 454328 Summary: Obey ulimit stack size limit on LP64 systems. Index: slapi-plugin.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-plugin.h,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -u -r1.19 -r1.19.2.1 --- slapi-plugin.h 5 Oct 2007 23:31:07 -0000 1.19 +++ slapi-plugin.h 10 Jul 2008 22:41:37 -0000 1.19.2.1 @@ -172,9 +172,7 @@ #define SLAPD_DEFAULT_THREAD_STACKSIZE 262144L #elif ( defined ( AIX )) #define SLAPD_DEFAULT_THREAD_STACKSIZE 262144L -/* All 64-bit builds get a bigger stack size */ -#elif ( defined ( __LP64__ )) || defined (_LP64) -#define SLAPD_DEFAULT_THREAD_STACKSIZE 262144L +/* All other platforms use the default stack size */ #else #define SLAPD_DEFAULT_THREAD_STACKSIZE 0 #endif From fedora-directory-commits at redhat.com Thu Jul 10 22:47:12 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 18:47:12 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm index.c, 1.13, 1.13.2.1 Message-ID: <200807102247.m6AMlCGM028936@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-serv28897/ldap/servers/slapd/back-ldbm Modified Files: Tag: Directory_Server_8_0_Branch index.c Log Message: Resolves: 452169 Summary: Crash in indexing code when attribute is missing. Index: index.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/index.c,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -u -r1.13 -r1.13.2.1 --- index.c 4 Oct 2007 03:28:19 -0000 1.13 +++ index.c 10 Jul 2008 22:47:10 -0000 1.13.2.1 @@ -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 Thu Jul 10 22:51:44 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 18:51:44 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl_ext.c, 1.7, 1.7.2.1 Message-ID: <200807102251.m6AMpiPw029220@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29119/ldap/servers/plugins/acl Modified Files: Tag: Directory_Server_8_0_Branch acl_ext.c Log Message: Resolves: 440333 Summary: Fix valgrind errors about use of uninitialized values. Index: acl_ext.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl_ext.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- acl_ext.c 18 Oct 2007 00:08:27 -0000 1.7 +++ acl_ext.c 10 Jul 2008 22:51:42 -0000 1.7.2.1 @@ -647,7 +647,7 @@ struct acl_cblock *aclcb = NULL; char *authType; void *conn; - unsigned long op_type; + int op_type; if ( NULL == aclpb ) { From fedora-directory-commits at redhat.com Thu Jul 10 22:51:45 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 18:51:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd log.c, 1.21, 1.21.2.1 Message-ID: <200807102251.m6AMpjMX029226@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29119/ldap/servers/slapd Modified Files: Tag: Directory_Server_8_0_Branch log.c Log Message: Resolves: 440333 Summary: Fix valgrind errors about use of uninitialized values. Index: log.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/log.c,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -r1.21 -r1.21.2.1 --- log.c 3 Dec 2007 18:16:32 -0000 1.21 +++ log.c 10 Jul 2008 22:51:42 -0000 1.21.2.1 @@ -4007,7 +4007,7 @@ static time_t log_reverse_convert_time(char *tbuf) { - struct tm tm; + struct tm tm = {0}; if (strchr(tbuf, '-')) { /* short format */ strptime(tbuf, "%Y%m%d-%H%M%S", &tm); From fedora-directory-commits at redhat.com Thu Jul 10 23:04:11 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 19:04:11 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication cl5_clcache.c, 1.7, 1.7.2.1 Message-ID: <200807102304.m6AN4BTK003873@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3780/ldap/servers/plugins/replication Modified Files: Tag: Directory_Server_8_0_Branch cl5_clcache.c Log Message: Resolves: 442170 Summary: Need to use DB_BUFFER_SMALL instead of ENOMEM with newer BDB versions. Index: cl5_clcache.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/cl5_clcache.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- cl5_clcache.c 10 Nov 2006 23:45:17 -0000 1.7 +++ cl5_clcache.c 10 Jul 2008 23:04:09 -0000 1.7.2.1 @@ -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 Thu Jul 10 23:11:17 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 19:11:17 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd sasl_io.c, 1.13, 1.13.2.1 Message-ID: <200807102311.m6ANBHki004238@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4204/ldap/servers/slapd Modified Files: Tag: Directory_Server_8_0_Branch sasl_io.c Log Message: Resolves: 428163 Summary: Fixes SASL IO set/get argument mismatch. Index: sasl_io.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/sasl_io.c,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -u -r1.13 -r1.13.2.1 --- sasl_io.c 18 Oct 2007 00:08:34 -0000 1.13 +++ sasl_io.c 10 Jul 2008 23:11:14 -0000 1.13.2.1 @@ -103,15 +103,16 @@ sasl_io_setup(Connection *c) { int ret = 0; - struct lber_x_ext_io_fns *func_pointers = NULL; + struct lber_x_ext_io_fns func_pointers = {0}; + struct lber_x_ext_io_fns *real_iofns = (struct lber_x_ext_io_fns *) slapi_ch_malloc(LBER_X_EXTIO_FNS_SIZE); sasl_io_private *sp = (sasl_io_private*) slapi_ch_calloc(1, sizeof(sasl_io_private)); LDAPDebug( LDAP_DEBUG_CONNS, "sasl_io_setup for connection %d\n", c->c_connid, 0, 0 ); /* Get the current functions and store them for later */ - ber_sockbuf_get_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, &func_pointers); - sp->real_iofns = func_pointers; - func_pointers = NULL; + real_iofns->lbextiofn_size = LBER_X_EXTIO_FNS_SIZE; + ber_sockbuf_get_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, real_iofns ); + sp->real_iofns = real_iofns; /* released in sasl_io_cleanup */ /* Set up the private structure */ sp->real_handle = (struct lextiof_socket_private*) c->c_prfd; @@ -119,13 +120,12 @@ /* Store the private structure in the connection */ c->c_sasl_io_private = sp; /* Insert the sasl i/o functions into the ber layer */ - func_pointers = (struct lber_x_ext_io_fns *) slapi_ch_malloc(LBER_X_EXTIO_FNS_SIZE); - func_pointers->lbextiofn_size = LBER_X_EXTIO_FNS_SIZE; - func_pointers->lbextiofn_read = sasl_read_function; - func_pointers->lbextiofn_write = sasl_write_function; - func_pointers->lbextiofn_writev = NULL; - func_pointers->lbextiofn_socket_arg = (struct lextiof_socket_private *) sp; - ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, func_pointers); + func_pointers.lbextiofn_size = LBER_X_EXTIO_FNS_SIZE; + func_pointers.lbextiofn_read = sasl_read_function; + func_pointers.lbextiofn_write = sasl_write_function; + func_pointers.lbextiofn_writev = NULL; + func_pointers.lbextiofn_socket_arg = (struct lextiof_socket_private *) sp; + ret = ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, &func_pointers); /* Setup the data buffers for the fast read path */ sasl_io_init_buffers(sp); /* Reset the enable flag, so we don't process it again */ @@ -139,7 +139,6 @@ sasl_io_cleanup(Connection *c) { int ret = 0; - struct lber_x_ext_io_fns *func_pointers = NULL; sasl_io_private *sp = c->c_sasl_io_private; if (sp) { LDAPDebug( LDAP_DEBUG_CONNS, @@ -148,9 +147,10 @@ slapi_ch_free((void**)&(sp->encrypted_buffer)); slapi_ch_free((void**)&(sp->decrypted_buffer)); /* Put the I/O functions back how they were */ - ber_sockbuf_get_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, &func_pointers); - slapi_ch_free((void**)&func_pointers); - ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, sp->real_iofns); + if (NULL != sp->real_iofns) { + ber_sockbuf_set_option( c->c_sb, LBER_SOCKBUF_OPT_EXT_IO_FNS, sp->real_iofns); + slapi_ch_free((void**)&(sp->real_iofns)); + } slapi_ch_free((void**)&sp); c->c_sasl_io_private = NULL; c->c_enable_sasl_io = 0; From fedora-directory-commits at redhat.com Thu Jul 10 23:18:07 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Thu, 10 Jul 2008 19:18:07 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5_inc_protocol.c, 1.11, 1.11.2.1 Message-ID: <200807102318.m6ANI7Kd004595@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4549/ldap/servers/plugins/replication Modified Files: Tag: Directory_Server_8_0_Branch repl5_inc_protocol.c Log Message: Resolves: 450973 Summary: Don't immediately exit in repl async thread when the consumer encounters an error. 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.11.2.1 diff -u -r1.11 -r1.11.2.1 --- repl5_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.11 +++ repl5_inc_protocol.c 10 Jul 2008 23:18:04 -0000 1.11.2.1 @@ -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 Fri Jul 11 15:27:05 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 11 Jul 2008 11:27:05 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd csngen.c, 1.7, 1.7.2.1 Message-ID: <200807111527.m6BFR5Zj020514@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20221/ldap/servers/slapd Modified Files: Tag: Directory_Server_8_0_Branch csngen.c Log Message: Resolves: 233642 Summary: MMR breaks with time skew errors Index: csngen.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/csngen.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- csngen.c 10 Nov 2006 23:45:40 -0000 1.7 +++ csngen.c 11 Jul 2008 15:27:03 -0000 1.7.2.1 @@ -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 Fri Jul 11 15:27:05 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 11 Jul 2008 11:27:05 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5.h, 1.10, 1.10.2.1 repl5_inc_protocol.c, 1.11.2.1, 1.11.2.2 repl5_replica.c, 1.16, 1.16.2.1 repl_extop.c, 1.12, 1.12.2.1 windows_inc_protocol.c, 1.15, 1.15.2.1 Message-ID: <200807111527.m6BFR57v020510@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20221/ldap/servers/plugins/replication Modified Files: Tag: Directory_Server_8_0_Branch repl5.h repl5_inc_protocol.c repl5_replica.c repl_extop.c windows_inc_protocol.c Log Message: Resolves: 233642 Summary: MMR breaks with time skew errors Index: repl5.h =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5.h,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- repl5.h 12 Sep 2007 23:05:24 -0000 1.10 +++ repl5.h 11 Jul 2008 15:27:02 -0000 1.10.2.1 @@ -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.11.2.1 retrieving revision 1.11.2.2 diff -u -r1.11.2.1 -r1.11.2.2 --- repl5_inc_protocol.c 10 Jul 2008 23:18:04 -0000 1.11.2.1 +++ repl5_inc_protocol.c 11 Jul 2008 15:27:02 -0000 1.11.2.2 @@ -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.16.2.1 diff -u -r1.16 -r1.16.2.1 --- repl5_replica.c 18 Oct 2007 22:40:17 -0000 1.16 +++ repl5_replica.c 11 Jul 2008 15:27:02 -0000 1.16.2.1 @@ -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.12.2.1 diff -u -r1.12 -r1.12.2.1 --- repl_extop.c 18 Oct 2007 00:08:31 -0000 1.12 +++ repl_extop.c 11 Jul 2008 15:27:02 -0000 1.12.2.1 @@ -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.15.2.1 diff -u -r1.15 -r1.15.2.1 --- windows_inc_protocol.c 18 Oct 2007 00:08:31 -0000 1.15 +++ windows_inc_protocol.c 11 Jul 2008 15:27:02 -0000 1.15.2.1 @@ -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 Fri Jul 11 17:18:45 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 11 Jul 2008 13:18:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acl.c, 1.10, 1.10.2.1 Message-ID: <200807111718.m6BHIjte009151@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8956/servers/plugins/acl Modified Files: Tag: Directory_Server_8_0_Branch acl.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. Index: acl.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acl.c,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- acl.c 18 Oct 2007 00:08:27 -0000 1.10 +++ acl.c 11 Jul 2008 17:18:42 -0000 1.10.2.1 @@ -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 Fri Jul 11 17:18:45 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 11 Jul 2008 13:18:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/syntaxes string.c, 1.9.2.1, 1.9.2.2 Message-ID: <200807111718.m6BHIje4009157@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8956/servers/plugins/syntaxes Modified Files: Tag: Directory_Server_8_0_Branch string.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. Index: string.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/syntaxes/string.c,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -u -r1.9.2.1 -r1.9.2.2 --- string.c 29 Apr 2008 00:38:00 -0000 1.9.2.1 +++ string.c 11 Jul 2008 17:18:43 -0000 1.9.2.2 @@ -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 ); + slapi_ch_free((void**)&bigpat ); LDAPDebug( LDAP_DEBUG_FILTER, "<= string_filter_sub %d\n", rc, 0, 0 ); From fedora-directory-commits at redhat.com Fri Jul 11 17:18:45 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 11 Jul 2008 13:18:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm ldbm_search.c, 1.12, 1.12.2.1 Message-ID: <200807111718.m6BHIjqj009177@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-serv8956/servers/slapd/back-ldbm Modified Files: Tag: Directory_Server_8_0_Branch ldbm_search.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. 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.12.2.1 diff -u -r1.12 -r1.12.2.1 --- ldbm_search.c 12 Oct 2007 18:03:42 -0000 1.12 +++ ldbm_search.c 11 Jul 2008 17:18:43 -0000 1.12.2.1 @@ -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 Fri Jul 11 17:18:45 2008 From: fedora-directory-commits at redhat.com (Nathan Kinder (nkinder)) Date: Fri, 11 Jul 2008 13:18:45 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/slapd entry.c, 1.14, 1.14.2.1 filterentry.c, 1.6.2.1, 1.6.2.2 getfilelist.c, 1.7, 1.7.2.1 plugin_syntax.c, 1.5, 1.5.2.1 proto-slap.h, 1.31, 1.31.2.1 regex.c, 1.5.2.1, 1.5.2.2 sasl_map.c, 1.8, 1.8.2.1 slapi-private.h, 1.20, 1.20.2.1 vattr.c, 1.8, 1.8.2.1 Message-ID: <200807111718.m6BHIjgw009167@cvs-int.fedora.redhat.com> Author: nkinder Update of /cvs/dirsec/ldapserver/ldap/servers/slapd In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8956/servers/slapd Modified Files: Tag: Directory_Server_8_0_Branch entry.c filterentry.c getfilelist.c plugin_syntax.c proto-slap.h regex.c sasl_map.c slapi-private.h vattr.c Log Message: Resolves: 448831 Summary: Make regex code obey search timelimit. Index: entry.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/entry.c,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -r1.14 -r1.14.2.1 --- entry.c 18 Oct 2007 00:08:34 -0000 1.14 +++ entry.c 11 Jul 2008 17:18:43 -0000 1.14.2.1 @@ -1836,7 +1836,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.6.2.1 retrieving revision 1.6.2.2 diff -u -r1.6.2.1 -r1.6.2.2 --- filterentry.c 18 Apr 2008 20:18:59 -0000 1.6.2.1 +++ filterentry.c 11 Jul 2008 17:18:43 -0000 1.6.2.2 @@ -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.7.2.1 diff -u -r1.7 -r1.7.2.1 --- getfilelist.c 10 Nov 2006 23:45:40 -0000 1.7 +++ getfilelist.c 11 Jul 2008 17:18:43 -0000 1.7.2.1 @@ -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.5.2.1 diff -u -r1.5 -r1.5.2.1 --- plugin_syntax.c 10 Nov 2006 23:45:40 -0000 1.5 +++ plugin_syntax.c 11 Jul 2008 17:18:43 -0000 1.5.2.1 @@ -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.31 retrieving revision 1.31.2.1 diff -u -r1.31 -r1.31.2.1 --- proto-slap.h 18 Oct 2007 01:22:29 -0000 1.31 +++ proto-slap.h 11 Jul 2008 17:18:43 -0000 1.31.2.1 @@ -740,8 +740,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.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- regex.c 29 Apr 2008 00:38:00 -0000 1.5.2.1 +++ regex.c 11 Jul 2008 17:18:43 -0000 1.5.2.2 @@ -66,6 +66,10 @@ * Modification history: * * $Log$ + * Revision 1.5.2.2 2008/07/11 17:18:43 nkinder + * Resolves: 448831 + * Summary: Make regex code obey search timelimit. + * * Revision 1.5.2.1 2008/04/29 00:38:00 nhosoi * Resolves: #182621 (#443955) * Summary: Allow larger regex buffer to enable long substring filters @@ -699,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 */ @@ -724,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; @@ -749,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); @@ -759,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); @@ -768,6 +776,8 @@ case END: /* munged automaton. fail always */ return 0; } + if (ldaperror) + return ldaperror; if (!ep) return 0; @@ -848,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) { @@ -931,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.8.2.1 diff -u -r1.8 -r1.8.2.1 --- sasl_map.c 10 Nov 2006 23:45:40 -0000 1.8 +++ sasl_map.c 11 Jul 2008 17:18:43 -0000 1.8.2.1 @@ -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.20 retrieving revision 1.20.2.1 diff -u -r1.20 -r1.20.2.1 --- slapi-private.h 18 Oct 2007 22:40:18 -0000 1.20 +++ slapi-private.h 11 Jul 2008 17:18:43 -0000 1.20.2.1 @@ -1184,7 +1184,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.8.2.1 diff -u -r1.8 -r1.8.2.1 --- vattr.c 1 Nov 2007 20:24:07 -0000 1.8 +++ vattr.c 11 Jul 2008 17:18:43 -0000 1.8.2.1 @@ -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 ) { From fedora-directory-commits at redhat.com Mon Jul 14 18:43:05 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 14:43:05 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/schema/ldif 01nsroot.ldif.tmpl, 1.6, 1.7 10dsdata.ldif.tmpl, 1.9, 1.10 20asdata.ldif.tmpl, 1.5, 1.6 Message-ID: <200807141843.m6EIh5U2011684@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/schema/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11622/adminserver/admserv/schema/ldif Modified Files: 01nsroot.ldif.tmpl 10dsdata.ldif.tmpl 20asdata.ldif.tmpl Log Message: Resolves: bug 431103 Bug Description: Cannot setup ds with remote config DS Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: This fix has two main parts. The first part is to fix setup. I took parts out of the 01nsroot template and put them into the templates that set up the directory server and admin server. So when those servers are registered, they will create those common entries if not present, or otherwise modify them to add the necessary information. I had to add uname_m and uname_a and some other items to the mapping files. I fixed a typo in one of the template files. I changed setup to create new directory server instances shutdown, so that when they are configured for the passthrough auth plugin, it will be working when started. Otherwise, directory servers you create with setup will not be manageable in the console until after they are restarted. This is the same way that ds_create works. The second part of the fix is to allow people to fix "broken" installs. I added a -u (update) option to setup. This will scan for exsiting installations are re-register all servers found. The dialog flow is pretty simple - it just confirms that you want to run update mode, then asks for the config ds information, then re-registers all servers with the config ds, updating any information that is missing or outdated. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: Yes - need to document the new -u option. Index: 01nsroot.ldif.tmpl =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/01nsroot.ldif.tmpl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- 01nsroot.ldif.tmpl 25 Jun 2007 18:23:53 -0000 1.6 +++ 01nsroot.ldif.tmpl 14 Jul 2008 18:43:02 -0000 1.7 @@ -91,33 +91,3 @@ objectClass: organizationalUnit aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) ou: uid=%as_uid%, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot - -dn: ou="cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot",ou=UserPreferences, ou=%domain%, o=NetscapeRoot -objectClass: top -objectClass: organizationalUnit -aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) -ou: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=netscaperoot - -dn: cn=%fqdn%, ou=%domain%, o=NetscapeRoot -objectClass: top -objectClass: nsHost -objectClass: groupOfUniqueNames -cn: %fqdn% -serverHostName: %fqdn% -nsOsVersion: %uname_a% -nsHardwarePlatform: %uname_m% -uniqueMember: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot - -dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -objectClass: nsAdminGroup -objectClass: groupOfUniqueNames -objectClass: nsDirectoryInfo -objectClass: top -nsAdminGroupName: Server Group -nsDirectoryInfoRef: cn=UserDirectory, ou=Global Preferences, ou=%domain%, o=NetscapeRoot -nsAdminSIEDN: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -cn: Server Group -uniqueMember: cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -uniqueMember: cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -aci: (targetattr=*)(targetfilter=(nsconfigRoot=*))(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) -aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) userdn="ldap:///cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) Index: 10dsdata.ldif.tmpl =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/10dsdata.ldif.tmpl,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- 10dsdata.ldif.tmpl 27 Sep 2007 16:54:31 -0000 1.9 +++ 10dsdata.ldif.tmpl 14 Jul 2008 18:43:02 -0000 1.10 @@ -22,6 +22,27 @@ add: aci aci: (targetattr = "*")(version 3.0; acl "SIE Group (%dsid%)"; allow (all) groupdn = "ldap:///cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) +dn: cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: top +objectClass: nsHost +objectClass: groupOfUniqueNames +cn: %fqdn% +serverHostName: %fqdn% +nsOsVersion: %uname_a% +nsHardwarePlatform: %uname_m% +uniqueMember: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: nsAdminGroup +objectClass: groupOfUniqueNames +objectClass: nsDirectoryInfo +objectClass: top +nsAdminGroupName: Server Group +nsAdminSIEDN: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +nsDirectoryInfoRef: cn=UserDirectory, ou=Global Preferences, ou=%domain%, o=NetscapeRoot +cn: Server Group +aci: (targetattr=*)(targetfilter=(nsconfigRoot=*))(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) + dn: cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot objectClass: nsApplication objectClass: groupOfUniqueNames @@ -39,6 +60,11 @@ nsServerMigrationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot nsServerCreationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +changetype: modify +add: uniqueMember +uniqueMember: cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + dn: cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot objectClass: netscapeServer objectClass: nsDirectoryServer @@ -70,7 +96,7 @@ objectClass: top cn: configuration nsClassname: com.netscape.admin.dirserv.DSAdmin@%ds_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -nsJarfilename: @ds_console_jar@ +nsJarfilename: %ds_console_jar% nsDirectoryInfoRef: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) Index: 20asdata.ldif.tmpl =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/20asdata.ldif.tmpl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- 20asdata.ldif.tmpl 25 Jun 2007 18:23:53 -0000 1.5 +++ 20asdata.ldif.tmpl 14 Jul 2008 18:43:02 -0000 1.6 @@ -17,6 +17,27 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK +dn: cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: top +objectClass: nsHost +objectClass: groupOfUniqueNames +cn: %fqdn% +serverHostName: %fqdn% +nsOsVersion: %uname_a% +nsHardwarePlatform: %uname_m% +uniqueMember: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: nsAdminGroup +objectClass: groupOfUniqueNames +objectClass: nsDirectoryInfo +objectClass: top +nsAdminGroupName: Server Group +nsDirectoryInfoRef: cn=UserDirectory, ou=Global Preferences, ou=%domain%, o=NetscapeRoot +nsAdminSIEDN: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +cn: Server Group +uniqueMember: cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + dn: cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot objectClass: top objectClass: nsApplication @@ -73,3 +94,14 @@ nsClassname: com.netscape.management.admserv.AdminServer@%as_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable delegated admin to access configuration"; allow (read, search) groupdn="ldap:///cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) + +dn: ou="cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot",ou=UserPreferences, ou=%domain%, o=NetscapeRoot +objectClass: top +objectClass: organizationalUnit +aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) +ou: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=netscaperoot + +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +changetype: modify +add: aci +aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) userdn="ldap:///cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) From fedora-directory-commits at redhat.com Mon Jul 14 18:43:04 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 14:43:04 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/newinst/src AdminServer.pm.in, 1.12, 1.13 ConfigDSDialogs.pm, 1.6, 1.7 adminserver.map.in, 1.9, 1.10 dirserver.map.in, 1.9, 1.10 migrate-ds-admin.res.in, 1.2, 1.3 setup-ds-admin.pl.in, 1.11, 1.12 setup-ds-admin.res.in, 1.9, 1.10 Message-ID: <200807141843.m6EIh4XJ011676@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/newinst/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11622/adminserver/admserv/newinst/src Modified Files: AdminServer.pm.in ConfigDSDialogs.pm adminserver.map.in dirserver.map.in migrate-ds-admin.res.in setup-ds-admin.pl.in setup-ds-admin.res.in Log Message: Resolves: bug 431103 Bug Description: Cannot setup ds with remote config DS Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: This fix has two main parts. The first part is to fix setup. I took parts out of the 01nsroot template and put them into the templates that set up the directory server and admin server. So when those servers are registered, they will create those common entries if not present, or otherwise modify them to add the necessary information. I had to add uname_m and uname_a and some other items to the mapping files. I fixed a typo in one of the template files. I changed setup to create new directory server instances shutdown, so that when they are configured for the passthrough auth plugin, it will be working when started. Otherwise, directory servers you create with setup will not be manageable in the console until after they are restarted. This is the same way that ds_create works. The second part of the fix is to allow people to fix "broken" installs. I added a -u (update) option to setup. This will scan for exsiting installations are re-register all servers found. The dialog flow is pretty simple - it just confirms that you want to run update mode, then asks for the config ds information, then re-registers all servers with the config ds, updating any information that is missing or outdated. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: Yes - need to document the new -u option. Index: AdminServer.pm.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminServer.pm.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- AdminServer.pm.in 7 Dec 2007 00:09:36 -0000 1.12 +++ AdminServer.pm.in 14 Jul 2008 18:43:02 -0000 1.13 @@ -186,12 +186,37 @@ return 1; } +# sub addDefaultSecurityInfo { +# my $setup = shift; +# my $inf = $setup->{inf}; +# my $configdir = shift; +# my $reconfig = shift; +# my @errs; + +# my $admConf = getAdmConf($configdir); +# my $localconf = "$configdir/local.conf"; +# if (!open(LOCALCONF, ">$localconf")) { +# $setup->msg($FATAL, 'error_updating_localconf', $localconf, $!); +# return 0; +# } + +# if (!open(CONSOLECONF, "$admConf->{configdir}/console.conf")) { +# debug(0, "Error opening $admConf->{configdir}/console.conf: $!"); +# return 0; +# } + +# print LOCALCONF "configuration.Encryption\n"; + +# close(LOCALCONF); +# return 1; +# } + # This is how we extract the sie and isie as the as entries are # being added sub registercb { my ($context, $entry, $errs) = @_; - my $rc = check_and_add_entry([$context->{conn}, $context->{reconfig}], $entry, $errs); + my $rc = check_and_add_entry([$context->{conn}], $entry, $errs); my $setup = $context->{setup}; if ($rc) { if ($entry->hasValue('objectclass', 'nsApplication', 1)) { @@ -218,7 +243,6 @@ my $setup = shift; my $inf = $setup->{inf}; my $configdir = shift; - my $reconfig = shift; my @errs; $setup->msg('registering_adminserver'); @@ -261,7 +285,7 @@ $setup->msg($FATAL, 'error_updating_localconf', $localconf, $!); return 0; } - my $context = {conn => $conn, localfh => \*LOCALCONF, setup => $setup, reconfig => $reconfig}; + my $context = {conn => $conn, localfh => \*LOCALCONF, setup => $setup}; getMappedEntries($mapper, \@ldiffiles, \@errs, \®istercb, $context); close(LOCALCONF); @@ -418,6 +442,14 @@ $ENV{ADMSERV_PID_DIR} || "@piddir@"; + # if we're just doing the update, just register and return + if ($setup->{update}) { + if (!registerASWithConfigDS($setup, $configdir)) { + return 0; + } + return 1; + } + if (!createASFilesAndDirs($setup, $configdir, $securitydir, $logdir, $rundir)) { return 0; } @@ -426,7 +458,7 @@ return 0; } - if (!registerASWithConfigDS($setup, $configdir, $reconfig)) { + if (!registerASWithConfigDS($setup, $configdir)) { return 0; } Index: ConfigDSDialogs.pm =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ConfigDSDialogs.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ConfigDSDialogs.pm 27 Jul 2007 01:42:46 -0000 1.6 +++ ConfigDSDialogs.pm 14 Jul 2008 18:43:02 -0000 1.7 @@ -409,6 +409,23 @@ ['dialog_useconfigds_prompt'], ); +my $updatedialog = new DialogYesNo ( + $EXPRESS, + 'dialog_update_text', + 1, + sub { + my $self = shift; + my $ans = shift; + my $res = $self->handleResponse($ans); + if ($res == $DialogManager::NEXT) { + $res = $DialogManager::ERR if (!$self->isYes()); + } + return $res; + }, + ['dialog_update_prompt'], +); + + sub getDialogs { return ($useconfigds, $configdsinfo, $configdsadmin, $configdsadmindomain); } @@ -417,4 +434,8 @@ return ($regconfigdsinfo, $configdsadmindomain); } +sub getUpdateDialogs { + return ($updatedialog, $configdsinfo); +} + 1; Index: adminserver.map.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/adminserver.map.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- adminserver.map.in 15 Aug 2007 22:08:14 -0000 1.9 +++ adminserver.map.in 14 Jul 2008 18:43:02 -0000 1.10 @@ -44,6 +44,8 @@ vendor = Vendor timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` +uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` +uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_port = Port admpw = "@configdir@/admpw" Index: dirserver.map.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/dirserver.map.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dirserver.map.in 17 Dec 2007 20:10:04 -0000 1.9 +++ dirserver.map.in 14 Jul 2008 18:43:02 -0000 1.10 @@ -43,6 +43,8 @@ vendor = Vendor timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` +uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` +uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_uid = ServerAdminID as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" Index: migrate-ds-admin.res.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/migrate-ds-admin.res.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- migrate-ds-admin.res.in 15 Aug 2007 22:08:14 -0000 1.2 +++ migrate-ds-admin.res.in 14 Jul 2008 18:43:02 -0000 1.3 @@ -18,7 +18,6 @@ error_opening_nssconf = Error: could not open NSS config file %s. Error: %s\n error_writing_nssconf = Error: could not write NSS config file %s. Error: %s\n -registering_dirserver_instances = Registering the migrated directory server instances with the configuration directory server . . .\n error_creating_asmigration_maptbl = Error: could not create maptable for use in admin server migration.\n error_creating_updateconsole_maptbl = Error: could not create maptable for use in admin server console migration.\n error_migrating_console_entries = Error: Could not find the console customization entries under '%s'. Error: %s\n Index: setup-ds-admin.pl.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.pl.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- setup-ds-admin.pl.in 2 Aug 2007 14:44:10 -0000 1.11 +++ setup-ds-admin.pl.in 14 Jul 2008 18:43:02 -0000 1.12 @@ -54,6 +54,7 @@ $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsserverport"}; $setup->{asorigport} = $pset->{"configuration.nsserverport"}; # save orig. port $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsserveraddress"}; + $setup->{inf}->{General}->{FullMachineName} = $pset->{"serverhostname"}; } my $admpw = AdminUtil::getAdmpw($admConf); if ($admpw && %{$admpw}) { @@ -67,6 +68,11 @@ $setup->{reconfigas} = 1; # allow AS reconfig } +# do not allow reconfig (setup -r) if no setup has been done +if (! $setup->{reconfigas}) { + delete $setup->{update}; +} + if (!$setup->{silent}) { my $dialogmgr = new DialogManager($setup, $res, $TYPICAL); @@ -75,10 +81,15 @@ require ConfigDSDialogs; require ASDialogs; - my @dialogs = SetupDialogs->getDialogs(); - push @dialogs, ConfigDSDialogs->getDialogs(); - push @dialogs, DSDialogs->getDialogs(); - push @dialogs, ASDialogs->getDialogs(); + my @dialogs; + if ($setup->{update}) { + push @dialogs, ConfigDSDialogs->getUpdateDialogs(); + } else { + push @dialogs, SetupDialogs->getDialogs(); + push @dialogs, ConfigDSDialogs->getDialogs(); + push @dialogs, DSDialogs->getDialogs(); + push @dialogs, ASDialogs->getDialogs(); + } my $readytoproceed = new DialogYesNo ( $EXPRESS, @@ -123,46 +134,85 @@ $setup->{inf}->write(); -$setup->msg('create_dirserver'); +my @errs; -# create a directory server instance -my @errs = createDSInstance($setup->{inf}); -if (@errs) { - $setup->msg(@errs); - $setup->msg($FATAL, 'error_creating_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); - $setup->doExit(1); -} else { - $setup->msg('created_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); -} +if (!$setup->{update}) { + $setup->msg('create_dirserver'); -# setup directory server instance to be the configuration DS -if ($createconfigds) { - $setup->msg('create_configds'); - if (!createConfigDS($setup->{inf}, \@errs)) { - $setup->msg($FATAL, @errs); - $setup->msg($FATAL, 'error_create_configds'); + # create a directory server instance + # if we are not creating the config DS instance, + # create but do not start the server - start + # after createSubDS so the pta plugin will take effect + my $start_server_after_reg = 1; # default - start server after registration + if (!$createconfigds) { + if (exists($setup->{inf}->{slapd}->{start_server}) && + defined($setup->{inf}->{slapd}->{start_server})) { + # user explicitly set this value + $start_server_after_reg = $setup->{inf}->{slapd}->{start_server}; + } + $setup->{inf}->{slapd}->{start_server} = 0; # create server un-started + } + + @errs = createDSInstance($setup->{inf}); + if (@errs) { + $setup->msg(@errs); + $setup->msg($FATAL, 'error_creating_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); $setup->doExit(1); + } else { + $setup->msg('created_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); + } + + # setup directory server instance to be the configuration DS + if ($createconfigds) { + $setup->msg('create_configds'); + if (!createConfigDS($setup->{inf}, \@errs)) { + $setup->msg($FATAL, @errs); + $setup->msg($FATAL, 'error_create_configds'); + $setup->doExit(1); + } + } else { + # set up directory server instance to be managed by the console/adminserver + $setup->msg('create_subds'); + if (!createSubDSNoConn($setup->{inf}, \@errs)) { + $setup->msg($FATAL, @errs); + $setup->msg($FATAL, 'error_create_configds'); + $setup->doExit(1); + } + if ($start_server_after_reg) { + delete $setup->{inf}->{slapd}->{start_server}; # remove to start server + if (@errs = DSCreate::startServer($setup->{inf})) { + $setup->msg(@errs); + $setup->doExit(1); + } + # add the aci that allows the admin user to administer the server + if (!addConfigACIsToSubDS($setup->{inf}, \@errs)) { + $setup->msg(@errs); + $setup->doExit(1); + } + } } } -else -{ - $setup->msg('create_configds'); - if (!createSubDS($setup->{inf}, \@errs)) { + +if (!$setup->{update}) { + # register ds instances with config DS + if (!registerDSWithConfigDS($setup->{inf}->{slapd}->{ServerIdentifier}, + \@errs, + $setup->{inf})) { + $setup->msg(@errs); + $setup->msg($FATAL, 'error_register_dirserver'); + $setup->doExit(1); + } +} else { + # register all instances + $setup->msg('registering_dirserver_instances'); + if (!registerManyDSWithConfigDS($setup->{inf}, \@errs, + $setup->{configdir}, + $setup->getDirServers())) { $setup->msg($FATAL, @errs); - $setup->msg($FATAL, 'error_create_configds'); $setup->doExit(1); } } -# register ds instances with config DS -if (!registerDSWithConfigDS($setup->{inf}->{slapd}->{ServerIdentifier}, - \@errs, - $setup->{inf})) { - $setup->msg(@errs); - $setup->msg($FATAL, 'error_register_dirserver'); - $setup->doExit(1); -} - # configure and register the admin server instance if (!$setup->{reconfigas}) { Index: setup-ds-admin.res.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.res.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- setup-ds-admin.res.in 11 Oct 2007 14:07:03 -0000 1.9 +++ setup-ds-admin.res.in 14 Jul 2008 18:43:02 -0000 1.10 @@ -63,6 +63,12 @@ dialog_configdsadmin_invalid = The password contains invalid characters. Please choose another one.\n\n dialog_configdsadmin_nomatch = The passwords do not match. Please try again.\n\n +# ----------- Update Intro Dialog Resource ---------------- +dialog_update_text = The update option will allow you to re-register your servers with the\ +configuration directory server and update the information about your\ +servers that the console and admin server uses. You will need your\ +configuration directory server admin ID and password to continue.\n\n +dialog_update_prompt = Continue? # ----------- Config DS admin domain Dialog Resource ---------------- dialog_configdsadmindomain_text = The information stored in the configuration directory server can be\nseparated into different Administration Domains. If you are managing\nmultiple software releases at the same time, or managing information\nabout multiple domains, you may use the Administration Domain to keep\nthem separate.\n\nIf you are not using administrative domains, press Enter to select the\ndefault. Otherwise, enter some descriptive, unique name for the\nadministration domain, such as the name of the organization\nresponsible for managing the domain.\n\n @@ -115,6 +121,7 @@ end_reconfig_adminserver = Admin server was successfully reconfigured and started.\n create_dirserver = Creating directory server . . .\n create_configds = Creating the configuration directory server . . .\n +create_subds = Creating the new directory server . . .\n setup_complete = Setup is complete.\n\n error_register_dirserver = Could not register the directory server with the configuration directory server.\n registering_dirserver = Registering directory server with the configuration directory server . . .\n @@ -129,3 +136,4 @@ error_return2_certutil = The certutil program returned error code '%s' from attempting to add the CA certificate. Error: %s\nHere is the output of the command: %s cacert_already_exists = The certificate database in '%s' already contains a CA certificate. Please remove it first, or use the certutil program to add the CA certificate with a different name.\n error_connection_failed = Error: failed to open an LDAP connection to host '%s' port '%s' as user '%s'. Error: %s.\n +registering_dirserver_instances = Registering the directory server instances with the configuration directory server . . .\n From fedora-directory-commits at redhat.com Mon Jul 14 18:43:23 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 14:43:23 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Setup.pm.in, 1.10, 1.11 Message-ID: <200807141843.m6EIhNbH011712@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11695/ldapserver/ldap/admin/src/scripts Modified Files: Setup.pm.in Log Message: Resolves: bug 431103 Bug Description: Cannot setup ds with remote config DS Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: This fix has two main parts. The first part is to fix setup. I took parts out of the 01nsroot template and put them into the templates that set up the directory server and admin server. So when those servers are registered, they will create those common entries if not present, or otherwise modify them to add the necessary information. I had to add uname_m and uname_a and some other items to the mapping files. I fixed a typo in one of the template files. I changed setup to create new directory server instances shutdown, so that when they are configured for the passthrough auth plugin, it will be working when started. Otherwise, directory servers you create with setup will not be manageable in the console until after they are restarted. This is the same way that ds_create works. The second part of the fix is to allow people to fix "broken" installs. I added a -u (update) option to setup. This will scan for exsiting installations are re-register all servers found. The dialog flow is pretty simple - it just confirms that you want to run update mode, then asks for the config ds information, then re-registers all servers with the config ds, updating any information that is missing or outdated. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: Yes - need to document the new -u option. Index: Setup.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Setup.pm.in 7 Sep 2007 15:02:25 -0000 1.10 +++ Setup.pm.in 14 Jul 2008 18:43:21 -0000 1.11 @@ -124,7 +124,7 @@ sub init { my $self = shift; $self->{res} = shift; - my ($silent, $inffile, $keep, $preonly, $logfile); + my ($silent, $inffile, $keep, $preonly, $logfile, $update); GetOptions('help|h|?' => sub { VersionMessage(); HelpMessage(); exit 0 }, 'version|v' => sub { VersionMessage(); exit 0 }, @@ -133,13 +133,15 @@ 'file|f=s' => \$inffile, 'keepcache|k' => \$keep, 'preonly|p' => \$preonly, - 'logfile|l=s' => \$logfile + 'logfile|l=s' => \$logfile, + 'update|u' => \$update ); $self->{silent} = $silent; $self->{inffile} = $inffile; $self->{keep} = $keep; $self->{preonly} = $preonly; + $self->{update} = $update; $self->{logfile} = $logfile; $self->{log} = new SetupLog($self->{logfile}); # if user supplied inf file, use that to initialize @@ -251,6 +253,7 @@ $self->{dirservers} = []; for my $dir (glob("$self->{configdir}/slapd-*")) { if (-d $dir) { + $dir =~ s,$self->{configdir}/,,; # strip off dir part push @{$self->{dirservers}}, $dir; } } From fedora-directory-commits at redhat.com Mon Jul 14 19:30:05 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 15:30:05 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Setup.pm.in, 1.10, 1.10.2.1 Message-ID: <200807141930.m6EJU5Xm022627@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22602/ldapserver/ldap/admin/src/scripts Modified Files: Tag: Directory_Server_8_0_Branch Setup.pm.in Log Message: Resolves: bug 431103 Bug Description: Cannot setup ds with remote config DS Reviewed by: nkinder (Thanks!) Branch: Directory_Server_8_0_Branch Fix Description: This fix has two main parts. The first part is to fix setup. I took parts out of the 01nsroot template and put them into the templates that set up the directory server and admin server. So when those servers are registered, they will create those common entries if not present, or otherwise modify them to add the necessary information. I had to add uname_m and uname_a and some other items to the mapping files. I fixed a typo in one of the template files. I changed setup to create new directory server instances shutdown, so that when they are configured for the passthrough auth plugin, it will be working when started. Otherwise, directory servers you create with setup will not be manageable in the console until after they are restarted. This is the same way that ds_create works. The second part of the fix is to allow people to fix "broken" installs. I added a -u (update) option to setup. This will scan for exsiting installations are re-register all servers found. The dialog flow is pretty simple - it just confirms that you want to run update mode, then asks for the config ds information, then re-registers all servers with the config ds, updating any information that is missing or outdated. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: Yes - need to document the new -u option. Index: Setup.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Setup.pm.in,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- Setup.pm.in 7 Sep 2007 15:02:25 -0000 1.10 +++ Setup.pm.in 14 Jul 2008 19:30:03 -0000 1.10.2.1 @@ -124,7 +124,7 @@ sub init { my $self = shift; $self->{res} = shift; - my ($silent, $inffile, $keep, $preonly, $logfile); + my ($silent, $inffile, $keep, $preonly, $logfile, $update); GetOptions('help|h|?' => sub { VersionMessage(); HelpMessage(); exit 0 }, 'version|v' => sub { VersionMessage(); exit 0 }, @@ -133,13 +133,15 @@ 'file|f=s' => \$inffile, 'keepcache|k' => \$keep, 'preonly|p' => \$preonly, - 'logfile|l=s' => \$logfile + 'logfile|l=s' => \$logfile, + 'update|u' => \$update ); $self->{silent} = $silent; $self->{inffile} = $inffile; $self->{keep} = $keep; $self->{preonly} = $preonly; + $self->{update} = $update; $self->{logfile} = $logfile; $self->{log} = new SetupLog($self->{logfile}); # if user supplied inf file, use that to initialize @@ -251,6 +253,7 @@ $self->{dirservers} = []; for my $dir (glob("$self->{configdir}/slapd-*")) { if (-d $dir) { + $dir =~ s,$self->{configdir}/,,; # strip off dir part push @{$self->{dirservers}}, $dir; } } From fedora-directory-commits at redhat.com Mon Jul 14 19:30:19 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 15:30:19 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/schema/ldif 01nsroot.ldif.tmpl, 1.6, 1.6.2.1 10dsdata.ldif.tmpl, 1.9, 1.9.2.1 20asdata.ldif.tmpl, 1.5, 1.5.2.1 Message-ID: <200807141930.m6EJUJQk022694@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/schema/ldif In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22641/adminserver/admserv/schema/ldif Modified Files: Tag: Directory_Server_8_0_Branch 01nsroot.ldif.tmpl 10dsdata.ldif.tmpl 20asdata.ldif.tmpl Log Message: Resolves: bug 431103 Bug Description: Cannot setup ds with remote config DS Reviewed by: nkinder (Thanks!) Branch: Directory_Server_8_0_Branch Fix Description: This fix has two main parts. The first part is to fix setup. I took parts out of the 01nsroot template and put them into the templates that set up the directory server and admin server. So when those servers are registered, they will create those common entries if not present, or otherwise modify them to add the necessary information. I had to add uname_m and uname_a and some other items to the mapping files. I fixed a typo in one of the template files. I changed setup to create new directory server instances shutdown, so that when they are configured for the passthrough auth plugin, it will be working when started. Otherwise, directory servers you create with setup will not be manageable in the console until after they are restarted. This is the same way that ds_create works. The second part of the fix is to allow people to fix "broken" installs. I added a -u (update) option to setup. This will scan for exsiting installations are re-register all servers found. The dialog flow is pretty simple - it just confirms that you want to run update mode, then asks for the config ds information, then re-registers all servers with the config ds, updating any information that is missing or outdated. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: Yes - need to document the new -u option. Index: 01nsroot.ldif.tmpl =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/01nsroot.ldif.tmpl,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- 01nsroot.ldif.tmpl 25 Jun 2007 18:23:53 -0000 1.6 +++ 01nsroot.ldif.tmpl 14 Jul 2008 19:30:17 -0000 1.6.2.1 @@ -91,33 +91,3 @@ objectClass: organizationalUnit aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) ou: uid=%as_uid%, ou=Administrators, ou=TopologyManagement, o=NetscapeRoot - -dn: ou="cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot",ou=UserPreferences, ou=%domain%, o=NetscapeRoot -objectClass: top -objectClass: organizationalUnit -aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) -ou: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=netscaperoot - -dn: cn=%fqdn%, ou=%domain%, o=NetscapeRoot -objectClass: top -objectClass: nsHost -objectClass: groupOfUniqueNames -cn: %fqdn% -serverHostName: %fqdn% -nsOsVersion: %uname_a% -nsHardwarePlatform: %uname_m% -uniqueMember: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot - -dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -objectClass: nsAdminGroup -objectClass: groupOfUniqueNames -objectClass: nsDirectoryInfo -objectClass: top -nsAdminGroupName: Server Group -nsDirectoryInfoRef: cn=UserDirectory, ou=Global Preferences, ou=%domain%, o=NetscapeRoot -nsAdminSIEDN: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -cn: Server Group -uniqueMember: cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -uniqueMember: cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -aci: (targetattr=*)(targetfilter=(nsconfigRoot=*))(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) -aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) userdn="ldap:///cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) Index: 10dsdata.ldif.tmpl =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/10dsdata.ldif.tmpl,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- 10dsdata.ldif.tmpl 27 Sep 2007 16:54:31 -0000 1.9 +++ 10dsdata.ldif.tmpl 14 Jul 2008 19:30:17 -0000 1.9.2.1 @@ -22,6 +22,27 @@ add: aci aci: (targetattr = "*")(version 3.0; acl "SIE Group (%dsid%)"; allow (all) groupdn = "ldap:///cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) +dn: cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: top +objectClass: nsHost +objectClass: groupOfUniqueNames +cn: %fqdn% +serverHostName: %fqdn% +nsOsVersion: %uname_a% +nsHardwarePlatform: %uname_m% +uniqueMember: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: nsAdminGroup +objectClass: groupOfUniqueNames +objectClass: nsDirectoryInfo +objectClass: top +nsAdminGroupName: Server Group +nsAdminSIEDN: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +nsDirectoryInfoRef: cn=UserDirectory, ou=Global Preferences, ou=%domain%, o=NetscapeRoot +cn: Server Group +aci: (targetattr=*)(targetfilter=(nsconfigRoot=*))(version 3.0; acl "Enable delegated access"; allow (read, search, compare) groupdn="ldap:///cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) + dn: cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot objectClass: nsApplication objectClass: groupOfUniqueNames @@ -39,6 +60,11 @@ nsServerMigrationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot nsServerCreationClassname: com.netscape.admin.dirserv.task.MigrateCreate@%ds_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +changetype: modify +add: uniqueMember +uniqueMember: cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + dn: cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot objectClass: netscapeServer objectClass: nsDirectoryServer @@ -70,7 +96,7 @@ objectClass: top cn: configuration nsClassname: com.netscape.admin.dirserv.DSAdmin@%ds_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot -nsJarfilename: @ds_console_jar@ +nsJarfilename: %ds_console_jar% nsDirectoryInfoRef: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=slapd-%dsid%, cn=%brand% Directory Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) Index: 20asdata.ldif.tmpl =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/schema/ldif/20asdata.ldif.tmpl,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- 20asdata.ldif.tmpl 25 Jun 2007 18:23:53 -0000 1.5 +++ 20asdata.ldif.tmpl 14 Jul 2008 19:30:17 -0000 1.5.2.1 @@ -17,6 +17,27 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # END COPYRIGHT BLOCK +dn: cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: top +objectClass: nsHost +objectClass: groupOfUniqueNames +cn: %fqdn% +serverHostName: %fqdn% +nsOsVersion: %uname_a% +nsHardwarePlatform: %uname_m% +uniqueMember: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +objectClass: nsAdminGroup +objectClass: groupOfUniqueNames +objectClass: nsDirectoryInfo +objectClass: top +nsAdminGroupName: Server Group +nsDirectoryInfoRef: cn=UserDirectory, ou=Global Preferences, ou=%domain%, o=NetscapeRoot +nsAdminSIEDN: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +cn: Server Group +uniqueMember: cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot + dn: cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot objectClass: top objectClass: nsApplication @@ -73,3 +94,14 @@ nsClassname: com.netscape.management.admserv.AdminServer@%as_console_jar%@cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot aci: (targetattr=*)(version 3.0; acl "Enable delegated admin to access configuration"; allow (read, search) groupdn="ldap:///cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) aci: (targetattr=*)(version 3.0; acl "Enable Server configuration"; allow (all) groupdn="ldap:///cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) + +dn: ou="cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot",ou=UserPreferences, ou=%domain%, o=NetscapeRoot +objectClass: top +objectClass: organizationalUnit +aci: (targetattr=*)(version 3.0; acl "UserDNControl"; allow (all) userdnattr="creatorsname";) +ou: cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=netscaperoot + +dn: cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot +changetype: modify +add: aci +aci: (targetattr=*)(version 3.0; acl "Enable delegated access"; allow (read, search, compare) userdn="ldap:///cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot";) From fedora-directory-commits at redhat.com Mon Jul 14 19:30:19 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 15:30:19 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/newinst/src AdminServer.pm.in, 1.12, 1.12.2.1 ConfigDSDialogs.pm, 1.6, 1.6.2.1 adminserver.map.in, 1.9, 1.9.2.1 dirserver.map.in, 1.9, 1.9.2.1 migrate-ds-admin.res.in, 1.2, 1.2.2.1 setup-ds-admin.pl.in, 1.11, 1.11.2.1 setup-ds-admin.res.in, 1.9, 1.9.2.1 Message-ID: <200807141930.m6EJUJvG022679@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/newinst/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22641/adminserver/admserv/newinst/src Modified Files: Tag: Directory_Server_8_0_Branch AdminServer.pm.in ConfigDSDialogs.pm adminserver.map.in dirserver.map.in migrate-ds-admin.res.in setup-ds-admin.pl.in setup-ds-admin.res.in Log Message: Resolves: bug 431103 Bug Description: Cannot setup ds with remote config DS Reviewed by: nkinder (Thanks!) Branch: Directory_Server_8_0_Branch Fix Description: This fix has two main parts. The first part is to fix setup. I took parts out of the 01nsroot template and put them into the templates that set up the directory server and admin server. So when those servers are registered, they will create those common entries if not present, or otherwise modify them to add the necessary information. I had to add uname_m and uname_a and some other items to the mapping files. I fixed a typo in one of the template files. I changed setup to create new directory server instances shutdown, so that when they are configured for the passthrough auth plugin, it will be working when started. Otherwise, directory servers you create with setup will not be manageable in the console until after they are restarted. This is the same way that ds_create works. The second part of the fix is to allow people to fix "broken" installs. I added a -u (update) option to setup. This will scan for exsiting installations are re-register all servers found. The dialog flow is pretty simple - it just confirms that you want to run update mode, then asks for the config ds information, then re-registers all servers with the config ds, updating any information that is missing or outdated. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: Yes - need to document the new -u option. Index: AdminServer.pm.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminServer.pm.in,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -u -r1.12 -r1.12.2.1 --- AdminServer.pm.in 7 Dec 2007 00:09:36 -0000 1.12 +++ AdminServer.pm.in 14 Jul 2008 19:30:16 -0000 1.12.2.1 @@ -186,12 +186,37 @@ return 1; } +# sub addDefaultSecurityInfo { +# my $setup = shift; +# my $inf = $setup->{inf}; +# my $configdir = shift; +# my $reconfig = shift; +# my @errs; + +# my $admConf = getAdmConf($configdir); +# my $localconf = "$configdir/local.conf"; +# if (!open(LOCALCONF, ">$localconf")) { +# $setup->msg($FATAL, 'error_updating_localconf', $localconf, $!); +# return 0; +# } + +# if (!open(CONSOLECONF, "$admConf->{configdir}/console.conf")) { +# debug(0, "Error opening $admConf->{configdir}/console.conf: $!"); +# return 0; +# } + +# print LOCALCONF "configuration.Encryption\n"; + +# close(LOCALCONF); +# return 1; +# } + # This is how we extract the sie and isie as the as entries are # being added sub registercb { my ($context, $entry, $errs) = @_; - my $rc = check_and_add_entry([$context->{conn}, $context->{reconfig}], $entry, $errs); + my $rc = check_and_add_entry([$context->{conn}], $entry, $errs); my $setup = $context->{setup}; if ($rc) { if ($entry->hasValue('objectclass', 'nsApplication', 1)) { @@ -218,7 +243,6 @@ my $setup = shift; my $inf = $setup->{inf}; my $configdir = shift; - my $reconfig = shift; my @errs; $setup->msg('registering_adminserver'); @@ -261,7 +285,7 @@ $setup->msg($FATAL, 'error_updating_localconf', $localconf, $!); return 0; } - my $context = {conn => $conn, localfh => \*LOCALCONF, setup => $setup, reconfig => $reconfig}; + my $context = {conn => $conn, localfh => \*LOCALCONF, setup => $setup}; getMappedEntries($mapper, \@ldiffiles, \@errs, \®istercb, $context); close(LOCALCONF); @@ -418,6 +442,14 @@ $ENV{ADMSERV_PID_DIR} || "@piddir@"; + # if we're just doing the update, just register and return + if ($setup->{update}) { + if (!registerASWithConfigDS($setup, $configdir)) { + return 0; + } + return 1; + } + if (!createASFilesAndDirs($setup, $configdir, $securitydir, $logdir, $rundir)) { return 0; } @@ -426,7 +458,7 @@ return 0; } - if (!registerASWithConfigDS($setup, $configdir, $reconfig)) { + if (!registerASWithConfigDS($setup, $configdir)) { return 0; } Index: ConfigDSDialogs.pm =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/ConfigDSDialogs.pm,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- ConfigDSDialogs.pm 27 Jul 2007 01:42:46 -0000 1.6 +++ ConfigDSDialogs.pm 14 Jul 2008 19:30:16 -0000 1.6.2.1 @@ -409,6 +409,23 @@ ['dialog_useconfigds_prompt'], ); +my $updatedialog = new DialogYesNo ( + $EXPRESS, + 'dialog_update_text', + 1, + sub { + my $self = shift; + my $ans = shift; + my $res = $self->handleResponse($ans); + if ($res == $DialogManager::NEXT) { + $res = $DialogManager::ERR if (!$self->isYes()); + } + return $res; + }, + ['dialog_update_prompt'], +); + + sub getDialogs { return ($useconfigds, $configdsinfo, $configdsadmin, $configdsadmindomain); } @@ -417,4 +434,8 @@ return ($regconfigdsinfo, $configdsadmindomain); } +sub getUpdateDialogs { + return ($updatedialog, $configdsinfo); +} + 1; Index: adminserver.map.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/adminserver.map.in,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- adminserver.map.in 15 Aug 2007 22:08:14 -0000 1.9 +++ adminserver.map.in 14 Jul 2008 19:30:16 -0000 1.9.2.1 @@ -44,6 +44,8 @@ vendor = Vendor timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` +uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` +uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_port = Port admpw = "@configdir@/admpw" Index: dirserver.map.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/dirserver.map.in,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- dirserver.map.in 17 Dec 2007 20:10:04 -0000 1.9 +++ dirserver.map.in 14 Jul 2008 19:30:16 -0000 1.9.2.1 @@ -43,6 +43,8 @@ vendor = Vendor timestamp = `use Time::gmtime; my $gm = gmtime; $returnvalue = sprintf ("%04d%02d%02d%02d%02d%02dZ", 1900+$gm->year, 1+$gm->mon, $gm->mday, $gm->hour, $gm->min, $gm->sec);` +uname_a = `open(UNAMEA, "uname -a |"); $returnvalue = ; chomp $returnvalue; close(UNAMEA);` +uname_m = `open(UNAMEM, "uname -m |"); $returnvalue = ; chomp $returnvalue; close(UNAMEM);` asid = `$returnvalue = $mapper->{fqdn}; $returnvalue =~ s/\..*$//;` as_uid = ServerAdminID as_sie = "cn=admin-serv-%asid%, cn=%brand% Administration Server, cn=Server Group, cn=%fqdn%, ou=%domain%, o=NetscapeRoot" Index: migrate-ds-admin.res.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/migrate-ds-admin.res.in,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- migrate-ds-admin.res.in 15 Aug 2007 22:08:14 -0000 1.2 +++ migrate-ds-admin.res.in 14 Jul 2008 19:30:16 -0000 1.2.2.1 @@ -18,7 +18,6 @@ error_opening_nssconf = Error: could not open NSS config file %s. Error: %s\n error_writing_nssconf = Error: could not write NSS config file %s. Error: %s\n -registering_dirserver_instances = Registering the migrated directory server instances with the configuration directory server . . .\n error_creating_asmigration_maptbl = Error: could not create maptable for use in admin server migration.\n error_creating_updateconsole_maptbl = Error: could not create maptable for use in admin server console migration.\n error_migrating_console_entries = Error: Could not find the console customization entries under '%s'. Error: %s\n Index: setup-ds-admin.pl.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.pl.in,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- setup-ds-admin.pl.in 2 Aug 2007 14:44:10 -0000 1.11 +++ setup-ds-admin.pl.in 14 Jul 2008 19:30:16 -0000 1.11.2.1 @@ -54,6 +54,7 @@ $setup->{inf}->{admin}->{Port} = $pset->{"configuration.nsserverport"}; $setup->{asorigport} = $pset->{"configuration.nsserverport"}; # save orig. port $setup->{inf}->{admin}->{ServerIpAddress} = $pset->{"configuration.nsserveraddress"}; + $setup->{inf}->{General}->{FullMachineName} = $pset->{"serverhostname"}; } my $admpw = AdminUtil::getAdmpw($admConf); if ($admpw && %{$admpw}) { @@ -67,6 +68,11 @@ $setup->{reconfigas} = 1; # allow AS reconfig } +# do not allow reconfig (setup -r) if no setup has been done +if (! $setup->{reconfigas}) { + delete $setup->{update}; +} + if (!$setup->{silent}) { my $dialogmgr = new DialogManager($setup, $res, $TYPICAL); @@ -75,10 +81,15 @@ require ConfigDSDialogs; require ASDialogs; - my @dialogs = SetupDialogs->getDialogs(); - push @dialogs, ConfigDSDialogs->getDialogs(); - push @dialogs, DSDialogs->getDialogs(); - push @dialogs, ASDialogs->getDialogs(); + my @dialogs; + if ($setup->{update}) { + push @dialogs, ConfigDSDialogs->getUpdateDialogs(); + } else { + push @dialogs, SetupDialogs->getDialogs(); + push @dialogs, ConfigDSDialogs->getDialogs(); + push @dialogs, DSDialogs->getDialogs(); + push @dialogs, ASDialogs->getDialogs(); + } my $readytoproceed = new DialogYesNo ( $EXPRESS, @@ -123,46 +134,85 @@ $setup->{inf}->write(); -$setup->msg('create_dirserver'); +my @errs; -# create a directory server instance -my @errs = createDSInstance($setup->{inf}); -if (@errs) { - $setup->msg(@errs); - $setup->msg($FATAL, 'error_creating_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); - $setup->doExit(1); -} else { - $setup->msg('created_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); -} +if (!$setup->{update}) { + $setup->msg('create_dirserver'); -# setup directory server instance to be the configuration DS -if ($createconfigds) { - $setup->msg('create_configds'); - if (!createConfigDS($setup->{inf}, \@errs)) { - $setup->msg($FATAL, @errs); - $setup->msg($FATAL, 'error_create_configds'); + # create a directory server instance + # if we are not creating the config DS instance, + # create but do not start the server - start + # after createSubDS so the pta plugin will take effect + my $start_server_after_reg = 1; # default - start server after registration + if (!$createconfigds) { + if (exists($setup->{inf}->{slapd}->{start_server}) && + defined($setup->{inf}->{slapd}->{start_server})) { + # user explicitly set this value + $start_server_after_reg = $setup->{inf}->{slapd}->{start_server}; + } + $setup->{inf}->{slapd}->{start_server} = 0; # create server un-started + } + + @errs = createDSInstance($setup->{inf}); + if (@errs) { + $setup->msg(@errs); + $setup->msg($FATAL, 'error_creating_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); $setup->doExit(1); + } else { + $setup->msg('created_dsinstance', $setup->{inf}->{slapd}->{ServerIdentifier}); + } + + # setup directory server instance to be the configuration DS + if ($createconfigds) { + $setup->msg('create_configds'); + if (!createConfigDS($setup->{inf}, \@errs)) { + $setup->msg($FATAL, @errs); + $setup->msg($FATAL, 'error_create_configds'); + $setup->doExit(1); + } + } else { + # set up directory server instance to be managed by the console/adminserver + $setup->msg('create_subds'); + if (!createSubDSNoConn($setup->{inf}, \@errs)) { + $setup->msg($FATAL, @errs); + $setup->msg($FATAL, 'error_create_configds'); + $setup->doExit(1); + } + if ($start_server_after_reg) { + delete $setup->{inf}->{slapd}->{start_server}; # remove to start server + if (@errs = DSCreate::startServer($setup->{inf})) { + $setup->msg(@errs); + $setup->doExit(1); + } + # add the aci that allows the admin user to administer the server + if (!addConfigACIsToSubDS($setup->{inf}, \@errs)) { + $setup->msg(@errs); + $setup->doExit(1); + } + } } } -else -{ - $setup->msg('create_configds'); - if (!createSubDS($setup->{inf}, \@errs)) { + +if (!$setup->{update}) { + # register ds instances with config DS + if (!registerDSWithConfigDS($setup->{inf}->{slapd}->{ServerIdentifier}, + \@errs, + $setup->{inf})) { + $setup->msg(@errs); + $setup->msg($FATAL, 'error_register_dirserver'); + $setup->doExit(1); + } +} else { + # register all instances + $setup->msg('registering_dirserver_instances'); + if (!registerManyDSWithConfigDS($setup->{inf}, \@errs, + $setup->{configdir}, + $setup->getDirServers())) { $setup->msg($FATAL, @errs); - $setup->msg($FATAL, 'error_create_configds'); $setup->doExit(1); } } -# register ds instances with config DS -if (!registerDSWithConfigDS($setup->{inf}->{slapd}->{ServerIdentifier}, - \@errs, - $setup->{inf})) { - $setup->msg(@errs); - $setup->msg($FATAL, 'error_register_dirserver'); - $setup->doExit(1); -} - # configure and register the admin server instance if (!$setup->{reconfigas}) { Index: setup-ds-admin.res.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/setup-ds-admin.res.in,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- setup-ds-admin.res.in 11 Oct 2007 14:07:03 -0000 1.9 +++ setup-ds-admin.res.in 14 Jul 2008 19:30:16 -0000 1.9.2.1 @@ -63,6 +63,12 @@ dialog_configdsadmin_invalid = The password contains invalid characters. Please choose another one.\n\n dialog_configdsadmin_nomatch = The passwords do not match. Please try again.\n\n +# ----------- Update Intro Dialog Resource ---------------- +dialog_update_text = The update option will allow you to re-register your servers with the\ +configuration directory server and update the information about your\ +servers that the console and admin server uses. You will need your\ +configuration directory server admin ID and password to continue.\n\n +dialog_update_prompt = Continue? # ----------- Config DS admin domain Dialog Resource ---------------- dialog_configdsadmindomain_text = The information stored in the configuration directory server can be\nseparated into different Administration Domains. If you are managing\nmultiple software releases at the same time, or managing information\nabout multiple domains, you may use the Administration Domain to keep\nthem separate.\n\nIf you are not using administrative domains, press Enter to select the\ndefault. Otherwise, enter some descriptive, unique name for the\nadministration domain, such as the name of the organization\nresponsible for managing the domain.\n\n @@ -115,6 +121,7 @@ end_reconfig_adminserver = Admin server was successfully reconfigured and started.\n create_dirserver = Creating directory server . . .\n create_configds = Creating the configuration directory server . . .\n +create_subds = Creating the new directory server . . .\n setup_complete = Setup is complete.\n\n error_register_dirserver = Could not register the directory server with the configuration directory server.\n registering_dirserver = Registering directory server with the configuration directory server . . .\n @@ -129,3 +136,4 @@ error_return2_certutil = The certutil program returned error code '%s' from attempting to add the CA certificate. Error: %s\nHere is the output of the command: %s cacert_already_exists = The certificate database in '%s' already contains a CA certificate. Please remove it first, or use the certutil program to add the CA certificate with a different name.\n error_connection_failed = Error: failed to open an LDAP connection to host '%s' port '%s' as user '%s'. Error: %s.\n +registering_dirserver_instances = Registering the directory server instances with the configuration directory server . . .\n From fedora-directory-commits at redhat.com Mon Jul 14 19:37:17 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 15:37:17 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSCreate.pm.in, 1.11, 1.12 Message-ID: <200807141937.m6EJbHhm023415@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23383/ldapserver/ldap/admin/src/scripts Modified Files: DSCreate.pm.in Log Message: Resolves: bug 452323 Bug Description: rhds80 console - create new instance fails (only) after admin server restart Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: The problem was that the temp LDIF file used to init the new database was not created with the proper mode and ownership, so slapd could not load it. The fix is to make sure the ownership and mode is correct. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: DSCreate.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- DSCreate.pm.in 16 May 2008 16:25:54 -0000 1.11 +++ DSCreate.pm.in 14 Jul 2008 19:37:15 -0000 1.12 @@ -499,6 +499,10 @@ if (@errs) { return @errs; } + if (@errs = changeOwnerMode($inf, 4, $templdif)) { + unlink($ldiffile); + return @errs; + } # $templdif now contains the ldif to import $ldiffile = $templdif; $istempldif = 1; From fedora-directory-commits at redhat.com Mon Jul 14 19:40:14 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 15:40:14 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSCreate.pm.in, 1.9, 1.9.2.1 Message-ID: <200807141940.m6EJeExR023984@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23942 Modified Files: Tag: Directory_Server_8_0_Branch DSCreate.pm.in Log Message: Resolves: bug 452323 Bug Description: rhds80 console - create new instance fails (only) after admin server restart Reviewed by: nkinder (Thanks!) Branch: Directory_Server_8_0_Branch Fix Description: The problem was that the temp LDIF file used to init the new database was not created with the proper mode and ownership, so slapd could not load it. The fix is to make sure the ownership and mode is correct. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none Index: DSCreate.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- DSCreate.pm.in 17 Dec 2007 20:08:46 -0000 1.9 +++ DSCreate.pm.in 14 Jul 2008 19:40:12 -0000 1.9.2.1 @@ -498,6 +498,10 @@ if (@errs) { return @errs; } + if (@errs = changeOwnerMode($inf, 4, $templdif)) { + unlink($ldiffile); + return @errs; + } # $templdif now contains the ldif to import $ldiffile = $templdif; $istempldif = 1; From fedora-directory-commits at redhat.com Mon Jul 14 20:00:05 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:00:05 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/newinst/src AdminServer.pm.in, 1.13, 1.14 Message-ID: <200807142000.m6EK055d026983@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/newinst/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26918/adminserver/admserv/newinst/src Modified Files: AdminServer.pm.in Log Message: Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: I changed security to get the security file directory for the directory server from cn=config from that directory server. Unfortunately, I didn't take into consideration that the CGI might have to use LDAPS to connect. If you have checked the Use SSL for Console button in the console when configuring that directory server for SSL, the CGIs will attempt to use LDAPS. In this case, there were several problems: 1) NSS was not initialized - need to use the admin server key/cert db to talk LDAPS to the directory server 2) When I did do the NSS init, it failed because the admin server key/cert db did not exist, and the directory was not writable. 3) I needed to shutdown NSS so that the key/cert db for the directory server itself could be opened in order to get its contents The consequences of this are that now, when you attempt to use NSS for the first time, if the key/cert databases do not exist, they will be created empty. If the user sets up the directory server for SSL, and tells the console to use SSL with this directory server, the user will have to install the CA certificate in the admin server key/cert db, so that the console and admin CGIs can talk to that directory server using LDAPS. I changed all of the admin server CGIs to properly initialize NSS in case they too needed to speak LDAPS for some reason. I also cleaned up several compiler warnings in the admin server CGIs. I believe this is also the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=430499 Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no QA impact: Will need to test various console interactions with SSL with admin server and directory server. New Tests integrated into TET: none Index: AdminServer.pm.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminServer.pm.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- AdminServer.pm.in 14 Jul 2008 18:43:02 -0000 1.13 +++ AdminServer.pm.in 14 Jul 2008 20:00:03 -0000 1.14 @@ -66,6 +66,15 @@ my $admConf = getAdmConf($configdir); my $uid = getpwnam $admConf->{sysuser}; + # chown the config directory + $! = 0; # clear errno + chown $uid, -1, $configdir; + if ($!) { + $setup->msg($FATAL, 'error_chowning_file', $configdir, + $admConf->{sysuser}, $!); + return 0; + } + # chown and chmod other files appropriately for (glob("$configdir/*")) { # these are owned by root From fedora-directory-commits at redhat.com Mon Jul 14 20:00:05 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:00:05 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cgi-src40 config.c, 1.14, 1.15 getport.c, 1.6, 1.7 htmladmin.c, 1.9, 1.10 migrateConfig.c, 1.7, 1.8 restartsrv.c, 1.8, 1.9 sec-activate.c, 1.10, 1.11 security.c, 1.14, 1.15 setport.c, 1.6, 1.7 statpingserv.c, 1.6, 1.7 ugdsconfig.c, 1.10, 1.11 viewdata.c, 1.8, 1.9 viewlog.c, 1.10, 1.11 Message-ID: <200807142000.m6EK05Tf026974@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cgi-src40 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26918/adminserver/admserv/cgi-src40 Modified Files: config.c getport.c htmladmin.c migrateConfig.c restartsrv.c sec-activate.c security.c setport.c statpingserv.c ugdsconfig.c viewdata.c viewlog.c Log Message: Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: I changed security to get the security file directory for the directory server from cn=config from that directory server. Unfortunately, I didn't take into consideration that the CGI might have to use LDAPS to connect. If you have checked the Use SSL for Console button in the console when configuring that directory server for SSL, the CGIs will attempt to use LDAPS. In this case, there were several problems: 1) NSS was not initialized - need to use the admin server key/cert db to talk LDAPS to the directory server 2) When I did do the NSS init, it failed because the admin server key/cert db did not exist, and the directory was not writable. 3) I needed to shutdown NSS so that the key/cert db for the directory server itself could be opened in order to get its contents The consequences of this are that now, when you attempt to use NSS for the first time, if the key/cert databases do not exist, they will be created empty. If the user sets up the directory server for SSL, and tells the console to use SSL with this directory server, the user will have to install the CA certificate in the admin server key/cert db, so that the console and admin CGIs can talk to that directory server using LDAPS. I changed all of the admin server CGIs to properly initialize NSS in case they too needed to speak LDAPS for some reason. I also cleaned up several compiler warnings in the admin server CGIs. I believe this is also the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=430499 Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no QA impact: Will need to test various console interactions with SSL with admin server and directory server. New Tests integrated into TET: none Index: config.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/config.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- config.c 15 Nov 2007 17:32:22 -0000 1.14 +++ config.c 14 Jul 2008 20:00:02 -0000 1.15 @@ -148,8 +148,6 @@ char *localAdmin = 0; char *binddn = 0; char *bindpw = 0; - char *newValue = 0; - char *portVal = 0; char **inputs = 0; char *operation = 0; char *qs = 0; @@ -263,7 +261,7 @@ adminfo = admldapBuildInfo(configdir, &rv); - errorCode = ADMSSL_InitSimple(configdir, secdir, 0); + errorCode = ADMSSL_InitSimple(configdir, secdir, 1); if (errorCode) { if (i18nResource) rpt_err(APP_ERROR, @@ -402,7 +400,7 @@ if (resultList) { nvl = resultList; - while (nv = *nvl++) { + while ((nv = *nvl++)) { fprintf(stdout, "%s: %s\n", nv->attrName, nv->attrVal ? (nv->attrVal[0] ? nv->attrVal[0] : "") : ""); @@ -697,6 +695,7 @@ if (addList) deleteAttributeList(addList); psetDelete(pset); + return 1; } @@ -870,6 +869,7 @@ else return 0; + return -1; } #endif @@ -1055,7 +1055,7 @@ pr_st = PR_GetHostByName(systemInfo, buf, PR_NETDB_BUF_SIZE, &hostentry); index = 0; - while (index = PR_EnumerateHostEnt(index, &hostentry, 8000, &netaddr1)) { + while ((index = PR_EnumerateHostEnt(index, &hostentry, 8000, &netaddr1))) { if (netaddr1.inet.ip == netaddr.inet.ip) return 1; } Index: getport.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/getport.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- getport.c 11 May 2007 19:44:05 -0000 1.6 +++ getport.c 14 Jul 2008 20:00:02 -0000 1.7 @@ -85,7 +85,7 @@ if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); /* Initialize the pset */ - rv = ADMSSL_InitSimple(configdir, secdir); + rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } Index: htmladmin.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/htmladmin.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- htmladmin.c 11 May 2007 19:44:05 -0000 1.9 +++ htmladmin.c 14 Jul 2008 20:00:02 -0000 1.10 @@ -325,7 +325,7 @@ if(!ldapInfo) exit(0); - rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 0); + rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1); if(rv) exit(0); @@ -481,8 +481,6 @@ LDAPMessage *entry; int ldapError; - char *security = NULL; - char **vals; char sie_conf[BIG_LINE]; @@ -810,7 +808,7 @@ char *endptr = NULL; int rate = 300; - if (val = admldapGetExpressRefreshRate(admInfo)) { + if ((val = admldapGetExpressRefreshRate(admInfo))) { rate = strtol(val, &endptr, 10); PL_strfree(val); } @@ -826,7 +824,7 @@ char *val = NULL; int rate = 60; - if (val = admldapGetExpressCGITimeout(admInfo)) { + if ((val = admldapGetExpressCGITimeout(admInfo))) { rate = strtol(val, &endptr, 10); PL_strfree(val); } @@ -1044,7 +1042,7 @@ img = strdup("oldservic.gif"); } - if(vals2 = ldap_get_values(server, isie_entry, ISIE_PRODVER_ATTR)) { + if((vals2 = ldap_get_values(server, isie_entry, ISIE_PRODVER_ATTR))) { version = (char *)malloc(4+strlen(vals2[0])); sprintf(version, " %s", vals2[0]); } Index: migrateConfig.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/migrateConfig.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- migrateConfig.c 11 May 2007 19:44:05 -0000 1.7 +++ migrateConfig.c 14 Jul 2008 20:00:02 -0000 1.8 @@ -228,7 +228,7 @@ } if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); - rv = ADMSSL_InitSimple(configdir, secdir); + rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { if (i18nResource && (errMsg = res_getstring(i18nResource, Index: restartsrv.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/restartsrv.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- restartsrv.c 15 May 2007 16:45:45 -0000 1.8 +++ restartsrv.c 14 Jul 2008 20:00:02 -0000 1.9 @@ -295,7 +295,6 @@ static char buf[BIG_LINE]; char * p = NULL; const char *configdir = util_get_conf_dir(); - const char *logdir = util_get_log_dir(); const char *piddir = util_get_pid_dir(); util_find_file_in_paths(filename, sizeof(filename), "console.conf", configdir, "", "admin-serv/config"); Index: sec-activate.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/sec-activate.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- sec-activate.c 6 Jul 2007 18:06:19 -0000 1.10 +++ sec-activate.c 14 Jul 2008 20:00:02 -0000 1.11 @@ -491,7 +491,6 @@ char error_info[BIG_LINE]; AdmldapInfo ldapInfo = NULL; char *lang; - char line[BIG_LINE]; memset((void *)errp, 0, sizeof(int)); method = getenv("REQUEST_METHOD"); Index: security.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/security.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- security.c 27 Nov 2007 16:55:49 -0000 1.14 +++ security.c 14 Jul 2008 20:00:02 -0000 1.15 @@ -54,6 +54,7 @@ #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "libadminutil/resource.h" +#include "libadmsslutil/admsslutil.h" #include "libadmsslutil/certmgt.h" #include "libadmsslutil/psetcssl.h" @@ -225,6 +226,7 @@ static void closeAllSecurityDB() { /* close all db */ + SSL_ClearSessionCache(); NSS_Shutdown(); } @@ -725,7 +727,7 @@ if (entry != NULL) { fprintf(stdout, "\t\n", x); - fprintf(stdout, "\t\t%d\n", Hexify(&entry->serialNumber)); + fprintf(stdout, "\t\t%s\n", processNullString(Hexify(&entry->serialNumber))); fprintf(stdout, "\t\t%s\n",DER_UTCTimeToAscii(&entry->revocationDate)); fprintf(stdout, "\t\n", x); x++; @@ -837,22 +839,22 @@ return; } - internal_slot = PK11_GetInternalKeySlot(); - if (!internal_slot) { - errorRpt(GENERAL_FAILURE, getResourceString(DBT_INIT_FAIL)); - return; + if (PK11_IsInternal(slot)) { + internal_slot = slot; + } else { + internal_slot = PK11_GetInternalKeySlot(); + if (!internal_slot) { + errorRpt(GENERAL_FAILURE, getResourceString(DBT_INIT_FAIL)); + return; + } } internalTokenName = PK11_GetTokenName(internal_slot); - { - PK11SlotInfo *slot = PK11_GetInternalKeySlot(); - - if (PK11_NeedUserInit(slot) == PR_TRUE) { - fprintf(stdout, "TRUE\n"); - } else { - fprintf(stdout, "FALSE\n"); - } + if (PK11_NeedUserInit(internal_slot) == PR_TRUE) { + fprintf(stdout, "TRUE\n"); + } else { + fprintf(stdout, "FALSE\n"); } certList = PK11_ListCerts(PK11CertListUnique, NULL); @@ -884,11 +886,18 @@ printCert(cln->cert, /*showDetail=*/PR_FALSE, NULL); } } + CERT_DestroyCertList(certList); if (PK11_IsInternal(slot)) { showCRL(certdb, SEC_CRL_TYPE); showCRL(certdb, SEC_KRL_TYPE); } + + if (slot != internal_slot) { + PK11_FreeSlot(internal_slot); + } + PK11_FreeSlot(slot); + } /* @@ -1511,7 +1520,6 @@ FILE *f; PR_snprintf(full_path, sizeof(full_path), "%s%c%s", secdir, FILE_PATHSEP, filename); - form_unescape(full_path); if( !(f = fopen(full_path, "rb")) ) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_NO_FILE_EXISTS), full_path); @@ -1764,9 +1772,6 @@ PK11SlotList* slotList; PK11SlotListElement *slot; - /* Mechanism to be used to get all the tokens in PK11_GetAllTokens */ - CK_MECHANISM_TYPE all = CKM_INVALID_MECHANISM; - slotList = PK11_GetAllTokens(CKM_RSA_PKCS, PR_FALSE, PR_FALSE, NULL); fprintf(stdout, "\n"); @@ -1956,13 +1961,13 @@ /* cgi env setup */ int _ai = ADMUTIL_Init(); char * m = getenv("REQUEST_METHOD"); - char * qs = 0; char *securitydir = NULL; /* looked up via sie */ char msg[BIG_LINE]; AdmldapInfo ldapInfo; /* our config */ int rc = 0; char *sie; char *configdir = util_get_conf_dir(); + const char *secdir = util_get_security_dir(); #if 0 CGI_Debug("security"); @@ -1998,6 +2003,10 @@ errorRpt(FILE_ERROR, line); } + if(ADMSSL_InitSimple((char *)configdir, (char *)secdir, 1)) { + errorRpt(SYSTEM_ERROR, getResourceString(CMN_SSL_INIT_ERROR)); + } + securitydir = getSecurityDir(ldapInfo, sie); { @@ -2021,6 +2030,9 @@ } /* we got here, we think sie is a valid prefix */ + /* close all db - we may have had to open the admin server key/cert db + in order to use LDAPS before - now have to shut down NSS and reinit */ + closeAllSecurityDB(); securityInitialization(securitydir); if (!PORT_Strcmp(operation, "LIST_CERTIFICATE")) { Index: setport.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/setport.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- setport.c 11 May 2007 19:44:05 -0000 1.6 +++ setport.c 14 Jul 2008 20:00:02 -0000 1.7 @@ -114,7 +114,7 @@ if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); - rv = ADMSSL_InitSimple(configdir, secdir); + rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } Index: statpingserv.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/statpingserv.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- statpingserv.c 9 May 2007 00:26:30 -0000 1.6 +++ statpingserv.c 14 Jul 2008 20:00:02 -0000 1.7 @@ -74,8 +74,6 @@ int port; PRFileDesc *gif; - int character; - int count=0; char *file; char *portstr; struct PRFileInfo64 prfileinfo; Index: ugdsconfig.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/ugdsconfig.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ugdsconfig.c 18 Dec 2007 19:55:23 -0000 1.10 +++ ugdsconfig.c 14 Jul 2008 20:00:02 -0000 1.11 @@ -236,7 +236,7 @@ AdmldapInfo adminfo; int rc; - if(ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 0)) { + if(ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1)) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_ADMSSL_INIT_FAILED,"Cannot initialize SSL"), NULL, NULL); return NULL; } Index: viewdata.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewdata.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- viewdata.c 11 May 2007 19:44:05 -0000 1.8 +++ viewdata.c 14 Jul 2008 20:00:02 -0000 1.9 @@ -113,7 +113,7 @@ if(!ldapInfo) exit(0); - rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 0); + rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1); if(rv) exit(0); @@ -261,11 +261,11 @@ } PR_smprintf_free(dn); - if(vals = ldap_get_values(server, entry, "nshtmladminproducturl")) { + if((vals = ldap_get_values(server, entry, "nshtmladminproducturl"))) { *url = strdup(vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nshtmladminproducttext")) { + if((vals = ldap_get_values(server, entry, "nshtmladminproducttext"))) { *text = strdup(vals[0]); ldap_value_free(vals); } @@ -292,13 +292,13 @@ return; - if(vals = ldap_get_values(server, entry, "serverproductname")) { + if((vals = ldap_get_values(server, entry, "serverproductname"))) { fprintf(stdout,(const char*)getResourceString(DBT_OUTPUT_DATA_SERVER_PRODUCT_NAME), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "installationtimestamp")) { + if((vals = ldap_get_values(server, entry, "installationtimestamp"))) { struct tm tm; char buf[BIG_LINE]; @@ -323,7 +323,7 @@ } - if(vals = ldap_get_values(server, entry, "serverroot")) { + if((vals = ldap_get_values(server, entry, "serverroot"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_SERVER_ROOT), vals[0]); ldap_value_free(vals); } @@ -358,37 +358,37 @@ "(objectclass=*)", NULL, 0, &entry)) != LDAP_SUCCESS) return; - if(vals = ldap_get_values(server, entry, "nsproductname")) { + if((vals = ldap_get_values(server, entry, "nsproductname"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_PRODUCT_NAME), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsvendor")) { + if((vals = ldap_get_values(server, entry, "nsvendor"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_VENDOR), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsproductversion")) { + if((vals = ldap_get_values(server, entry, "nsproductversion"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_PRODUCT_VERSION), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsbuildnumber")) { + if((vals = ldap_get_values(server, entry, "nsbuildnumber"))) { fprintf(stdout,(const char*)getResourceString(DBT_OUTPUT_DATA_BUILD_NUMBER), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsbuildsecurity")) { + if((vals = ldap_get_values(server, entry, "nsbuildsecurity"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_BUILD_SECURITY), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsrevisionnumber")) { + if((vals = ldap_get_values(server, entry, "nsrevisionnumber"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_REVISION_NUMBER), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "description")) { + if((vals = ldap_get_values(server, entry, "description"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_DESCRIPTION), vals[0]); ldap_value_free(vals); } @@ -403,12 +403,6 @@ char line[BIG_LINE]; FILE *html = open_html_file(MY_PAGE); char *sie = NULL; - - char *request; - int errorcode; - PRFileDesc *sockd; - bufstruct *nbuf; - char *binddn, *bindpw; LDAP *server; LDAPMessage *entry; @@ -453,7 +447,7 @@ "(objectclass=*)", NULL, 0, &entry)) != LDAP_SUCCESS) continue; - if(vals = ldap_get_values(server, entry, "nsserverid")) { + if((vals = ldap_get_values(server, entry, "nsserverid"))) { fprintf(stdout, (const char*)getResourceString(DBT_MAIN_SERVER_ID), vals[0]); ldap_value_free(vals); } Index: viewlog.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewlog.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- viewlog.c 31 Oct 2007 05:30:53 -0000 1.10 +++ viewlog.c 14 Jul 2008 20:00:02 -0000 1.11 @@ -156,7 +156,6 @@ void display_logfiles(char *logdir, char *default_logfile) { int x; - int cnt=0; char *seps = "/"; char *token; char *curlog = NULL; @@ -289,7 +288,6 @@ char *file; char *logdir = NULL; char *id; - char **logfiles = NULL; char tmp[BIG_LINE]; int x; int print_html = 1; @@ -353,6 +351,11 @@ configdir ? configdir : "(null)", rc); rpt_err(APP_ERROR, line, NULL, NULL); } else { + const char *secdir = util_get_security_dir(); + if(ADMSSL_InitSimple((char *)configdir, (char *)secdir, 1)) { + rpt_err(SYSTEM_ERROR, getResourceString(CMN_SSL_INIT_ERROR), NULL, NULL); + } + logdir = getLogDir(ldapInfo, id); if(!logdir) { PR_snprintf(msg, sizeof(msg), @@ -407,7 +410,6 @@ } PR_snprintf(full_path, sizeof(full_path), "%s%c%s", logdir, FILE_PATHSEP, file); - form_unescape(full_path); /* bug 27409, 31807 */ cmd = fopen(full_path, "r"); fprintf(stdout, getResourceString(DBT_MAIN_WIDTH)); PR_snprintf(tmp, sizeof(tmp), getResourceString(DBT_SUBTITLE), num, file, (str)? getResourceString(DBT_WITH) : "", @@ -435,7 +437,6 @@ if (file || *file || util_is_valid_path_string(file) || util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) { PR_snprintf(full_path, sizeof(full_path), "%s%c%s", logdir, FILE_PATHSEP, file); - form_unescape(full_path); /* bug 27409, 31807 */ cmd = fopen(full_path, "r"); /* begin search */ From fedora-directory-commits at redhat.com Mon Jul 14 20:14:19 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:14:19 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/newinst/src AdminServer.pm.in, 1.12.2.1, 1.12.2.2 Message-ID: <200807142014.m6EKEJgE003487@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/newinst/src In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3405/adminserver/admserv/newinst/src Modified Files: Tag: Directory_Server_8_0_Branch AdminServer.pm.in Log Message: Reviewed by: nkinder (Thanks!) Branch: Directory_Server_8_0_Branch Fix Description: I changed security to get the security file directory for the directory server from cn=config from that directory server. Unfortunately, I didn't take into consideration that the CGI might have to use LDAPS to connect. If you have checked the Use SSL for Console button in the console when configuring that directory server for SSL, the CGIs will attempt to use LDAPS. In this case, there were several problems: 1) NSS was not initialized - need to use the admin server key/cert db to talk LDAPS to the directory server 2) When I did do the NSS init, it failed because the admin server key/cert db did not exist, and the directory was not writable. 3) I needed to shutdown NSS so that the key/cert db for the directory server itself could be opened in order to get its contents The consequences of this are that now, when you attempt to use NSS for the first time, if the key/cert databases do not exist, they will be created empty. If the user sets up the directory server for SSL, and tells the console to use SSL with this directory server, the user will have to install the CA certificate in the admin server key/cert db, so that the console and admin CGIs can talk to that directory server using LDAPS. I changed all of the admin server CGIs to properly initialize NSS in case they too needed to speak LDAPS for some reason. I also cleaned up several compiler warnings in the admin server CGIs. I believe this is also the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=430499 Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no QA impact: Will need to test various console interactions with SSL with admin server and directory server. New Tests integrated into TET: none Index: AdminServer.pm.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/newinst/src/AdminServer.pm.in,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -r1.12.2.1 -r1.12.2.2 --- AdminServer.pm.in 14 Jul 2008 19:30:16 -0000 1.12.2.1 +++ AdminServer.pm.in 14 Jul 2008 20:14:16 -0000 1.12.2.2 @@ -66,6 +66,15 @@ my $admConf = getAdmConf($configdir); my $uid = getpwnam $admConf->{sysuser}; + # chown the config directory + $! = 0; # clear errno + chown $uid, -1, $configdir; + if ($!) { + $setup->msg($FATAL, 'error_chowning_file', $configdir, + $admConf->{sysuser}, $!); + return 0; + } + # chown and chmod other files appropriately for (glob("$configdir/*")) { # these are owned by root From fedora-directory-commits at redhat.com Mon Jul 14 20:14:18 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:14:18 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cgi-src40 config.c, 1.14, 1.14.2.1 getport.c, 1.6, 1.6.2.1 htmladmin.c, 1.9, 1.9.2.1 migrateConfig.c, 1.7, 1.7.2.1 restartsrv.c, 1.8, 1.8.2.1 sec-activate.c, 1.10, 1.10.2.1 security.c, 1.14, 1.14.2.1 setport.c, 1.6, 1.6.2.1 statpingserv.c, 1.6, 1.6.2.1 ugdsconfig.c, 1.10, 1.10.2.1 viewdata.c, 1.8, 1.8.2.1 viewlog.c, 1.10, 1.10.2.1 Message-ID: <200807142014.m6EKEIPB003476@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cgi-src40 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3405/adminserver/admserv/cgi-src40 Modified Files: Tag: Directory_Server_8_0_Branch config.c getport.c htmladmin.c migrateConfig.c restartsrv.c sec-activate.c security.c setport.c statpingserv.c ugdsconfig.c viewdata.c viewlog.c Log Message: Reviewed by: nkinder (Thanks!) Branch: Directory_Server_8_0_Branch Fix Description: I changed security to get the security file directory for the directory server from cn=config from that directory server. Unfortunately, I didn't take into consideration that the CGI might have to use LDAPS to connect. If you have checked the Use SSL for Console button in the console when configuring that directory server for SSL, the CGIs will attempt to use LDAPS. In this case, there were several problems: 1) NSS was not initialized - need to use the admin server key/cert db to talk LDAPS to the directory server 2) When I did do the NSS init, it failed because the admin server key/cert db did not exist, and the directory was not writable. 3) I needed to shutdown NSS so that the key/cert db for the directory server itself could be opened in order to get its contents The consequences of this are that now, when you attempt to use NSS for the first time, if the key/cert databases do not exist, they will be created empty. If the user sets up the directory server for SSL, and tells the console to use SSL with this directory server, the user will have to install the CA certificate in the admin server key/cert db, so that the console and admin CGIs can talk to that directory server using LDAPS. I changed all of the admin server CGIs to properly initialize NSS in case they too needed to speak LDAPS for some reason. I also cleaned up several compiler warnings in the admin server CGIs. I believe this is also the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=430499 Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no QA impact: Will need to test various console interactions with SSL with admin server and directory server. New Tests integrated into TET: none Index: config.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/config.c,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -r1.14 -r1.14.2.1 --- config.c 15 Nov 2007 17:32:22 -0000 1.14 +++ config.c 14 Jul 2008 20:14:16 -0000 1.14.2.1 @@ -148,8 +148,6 @@ char *localAdmin = 0; char *binddn = 0; char *bindpw = 0; - char *newValue = 0; - char *portVal = 0; char **inputs = 0; char *operation = 0; char *qs = 0; @@ -263,7 +261,7 @@ adminfo = admldapBuildInfo(configdir, &rv); - errorCode = ADMSSL_InitSimple(configdir, secdir, 0); + errorCode = ADMSSL_InitSimple(configdir, secdir, 1); if (errorCode) { if (i18nResource) rpt_err(APP_ERROR, @@ -402,7 +400,7 @@ if (resultList) { nvl = resultList; - while (nv = *nvl++) { + while ((nv = *nvl++)) { fprintf(stdout, "%s: %s\n", nv->attrName, nv->attrVal ? (nv->attrVal[0] ? nv->attrVal[0] : "") : ""); @@ -697,6 +695,7 @@ if (addList) deleteAttributeList(addList); psetDelete(pset); + return 1; } @@ -870,6 +869,7 @@ else return 0; + return -1; } #endif @@ -1055,7 +1055,7 @@ pr_st = PR_GetHostByName(systemInfo, buf, PR_NETDB_BUF_SIZE, &hostentry); index = 0; - while (index = PR_EnumerateHostEnt(index, &hostentry, 8000, &netaddr1)) { + while ((index = PR_EnumerateHostEnt(index, &hostentry, 8000, &netaddr1))) { if (netaddr1.inet.ip == netaddr.inet.ip) return 1; } Index: getport.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/getport.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- getport.c 11 May 2007 19:44:05 -0000 1.6 +++ getport.c 14 Jul 2008 20:14:16 -0000 1.6.2.1 @@ -85,7 +85,7 @@ if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); /* Initialize the pset */ - rv = ADMSSL_InitSimple(configdir, secdir); + rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } Index: htmladmin.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/htmladmin.c,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- htmladmin.c 11 May 2007 19:44:05 -0000 1.9 +++ htmladmin.c 14 Jul 2008 20:14:16 -0000 1.9.2.1 @@ -325,7 +325,7 @@ if(!ldapInfo) exit(0); - rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 0); + rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1); if(rv) exit(0); @@ -481,8 +481,6 @@ LDAPMessage *entry; int ldapError; - char *security = NULL; - char **vals; char sie_conf[BIG_LINE]; @@ -810,7 +808,7 @@ char *endptr = NULL; int rate = 300; - if (val = admldapGetExpressRefreshRate(admInfo)) { + if ((val = admldapGetExpressRefreshRate(admInfo))) { rate = strtol(val, &endptr, 10); PL_strfree(val); } @@ -826,7 +824,7 @@ char *val = NULL; int rate = 60; - if (val = admldapGetExpressCGITimeout(admInfo)) { + if ((val = admldapGetExpressCGITimeout(admInfo))) { rate = strtol(val, &endptr, 10); PL_strfree(val); } @@ -1044,7 +1042,7 @@ img = strdup("oldservic.gif"); } - if(vals2 = ldap_get_values(server, isie_entry, ISIE_PRODVER_ATTR)) { + if((vals2 = ldap_get_values(server, isie_entry, ISIE_PRODVER_ATTR))) { version = (char *)malloc(4+strlen(vals2[0])); sprintf(version, " %s", vals2[0]); } Index: migrateConfig.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/migrateConfig.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- migrateConfig.c 11 May 2007 19:44:05 -0000 1.7 +++ migrateConfig.c 14 Jul 2008 20:14:16 -0000 1.7.2.1 @@ -228,7 +228,7 @@ } if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); - rv = ADMSSL_InitSimple(configdir, secdir); + rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { if (i18nResource && (errMsg = res_getstring(i18nResource, Index: restartsrv.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/restartsrv.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -r1.8 -r1.8.2.1 --- restartsrv.c 15 May 2007 16:45:45 -0000 1.8 +++ restartsrv.c 14 Jul 2008 20:14:16 -0000 1.8.2.1 @@ -295,7 +295,6 @@ static char buf[BIG_LINE]; char * p = NULL; const char *configdir = util_get_conf_dir(); - const char *logdir = util_get_log_dir(); const char *piddir = util_get_pid_dir(); util_find_file_in_paths(filename, sizeof(filename), "console.conf", configdir, "", "admin-serv/config"); Index: sec-activate.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/sec-activate.c,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- sec-activate.c 6 Jul 2007 18:06:19 -0000 1.10 +++ sec-activate.c 14 Jul 2008 20:14:16 -0000 1.10.2.1 @@ -491,7 +491,6 @@ char error_info[BIG_LINE]; AdmldapInfo ldapInfo = NULL; char *lang; - char line[BIG_LINE]; memset((void *)errp, 0, sizeof(int)); method = getenv("REQUEST_METHOD"); Index: security.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/security.c,v retrieving revision 1.14 retrieving revision 1.14.2.1 diff -u -r1.14 -r1.14.2.1 --- security.c 27 Nov 2007 16:55:49 -0000 1.14 +++ security.c 14 Jul 2008 20:14:16 -0000 1.14.2.1 @@ -54,6 +54,7 @@ #include "libadminutil/admutil.h" #include "libadminutil/distadm.h" #include "libadminutil/resource.h" +#include "libadmsslutil/admsslutil.h" #include "libadmsslutil/certmgt.h" #include "libadmsslutil/psetcssl.h" @@ -225,6 +226,7 @@ static void closeAllSecurityDB() { /* close all db */ + SSL_ClearSessionCache(); NSS_Shutdown(); } @@ -725,7 +727,7 @@ if (entry != NULL) { fprintf(stdout, "\t\n", x); - fprintf(stdout, "\t\t%d\n", Hexify(&entry->serialNumber)); + fprintf(stdout, "\t\t%s\n", processNullString(Hexify(&entry->serialNumber))); fprintf(stdout, "\t\t%s\n",DER_UTCTimeToAscii(&entry->revocationDate)); fprintf(stdout, "\t\n", x); x++; @@ -837,22 +839,22 @@ return; } - internal_slot = PK11_GetInternalKeySlot(); - if (!internal_slot) { - errorRpt(GENERAL_FAILURE, getResourceString(DBT_INIT_FAIL)); - return; + if (PK11_IsInternal(slot)) { + internal_slot = slot; + } else { + internal_slot = PK11_GetInternalKeySlot(); + if (!internal_slot) { + errorRpt(GENERAL_FAILURE, getResourceString(DBT_INIT_FAIL)); + return; + } } internalTokenName = PK11_GetTokenName(internal_slot); - { - PK11SlotInfo *slot = PK11_GetInternalKeySlot(); - - if (PK11_NeedUserInit(slot) == PR_TRUE) { - fprintf(stdout, "TRUE\n"); - } else { - fprintf(stdout, "FALSE\n"); - } + if (PK11_NeedUserInit(internal_slot) == PR_TRUE) { + fprintf(stdout, "TRUE\n"); + } else { + fprintf(stdout, "FALSE\n"); } certList = PK11_ListCerts(PK11CertListUnique, NULL); @@ -884,11 +886,18 @@ printCert(cln->cert, /*showDetail=*/PR_FALSE, NULL); } } + CERT_DestroyCertList(certList); if (PK11_IsInternal(slot)) { showCRL(certdb, SEC_CRL_TYPE); showCRL(certdb, SEC_KRL_TYPE); } + + if (slot != internal_slot) { + PK11_FreeSlot(internal_slot); + } + PK11_FreeSlot(slot); + } /* @@ -1511,7 +1520,6 @@ FILE *f; PR_snprintf(full_path, sizeof(full_path), "%s%c%s", secdir, FILE_PATHSEP, filename); - form_unescape(full_path); if( !(f = fopen(full_path, "rb")) ) { PR_snprintf(msg, sizeof(msg), getResourceString(DBT_NO_FILE_EXISTS), full_path); @@ -1764,9 +1772,6 @@ PK11SlotList* slotList; PK11SlotListElement *slot; - /* Mechanism to be used to get all the tokens in PK11_GetAllTokens */ - CK_MECHANISM_TYPE all = CKM_INVALID_MECHANISM; - slotList = PK11_GetAllTokens(CKM_RSA_PKCS, PR_FALSE, PR_FALSE, NULL); fprintf(stdout, "\n"); @@ -1956,13 +1961,13 @@ /* cgi env setup */ int _ai = ADMUTIL_Init(); char * m = getenv("REQUEST_METHOD"); - char * qs = 0; char *securitydir = NULL; /* looked up via sie */ char msg[BIG_LINE]; AdmldapInfo ldapInfo; /* our config */ int rc = 0; char *sie; char *configdir = util_get_conf_dir(); + const char *secdir = util_get_security_dir(); #if 0 CGI_Debug("security"); @@ -1998,6 +2003,10 @@ errorRpt(FILE_ERROR, line); } + if(ADMSSL_InitSimple((char *)configdir, (char *)secdir, 1)) { + errorRpt(SYSTEM_ERROR, getResourceString(CMN_SSL_INIT_ERROR)); + } + securitydir = getSecurityDir(ldapInfo, sie); { @@ -2021,6 +2030,9 @@ } /* we got here, we think sie is a valid prefix */ + /* close all db - we may have had to open the admin server key/cert db + in order to use LDAPS before - now have to shut down NSS and reinit */ + closeAllSecurityDB(); securityInitialization(securitydir); if (!PORT_Strcmp(operation, "LIST_CERTIFICATE")) { Index: setport.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/setport.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- setport.c 11 May 2007 19:44:05 -0000 1.6 +++ setport.c 14 Jul 2008 20:14:16 -0000 1.6.2.1 @@ -114,7 +114,7 @@ if (binddn) rv = ADM_GetCurrentPassword(&err, &bindpw); - rv = ADMSSL_InitSimple(configdir, secdir); + rv = ADMSSL_InitSimple(configdir, secdir, 1); if (rv) { rpt_err(APP_ERROR, "SSL related initialization failed", NULL, NULL); } Index: statpingserv.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/statpingserv.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- statpingserv.c 9 May 2007 00:26:30 -0000 1.6 +++ statpingserv.c 14 Jul 2008 20:14:16 -0000 1.6.2.1 @@ -74,8 +74,6 @@ int port; PRFileDesc *gif; - int character; - int count=0; char *file; char *portstr; struct PRFileInfo64 prfileinfo; Index: ugdsconfig.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/ugdsconfig.c,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- ugdsconfig.c 18 Dec 2007 19:55:23 -0000 1.10 +++ ugdsconfig.c 14 Jul 2008 20:14:16 -0000 1.10.2.1 @@ -236,7 +236,7 @@ AdmldapInfo adminfo; int rc; - if(ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 0)) { + if(ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1)) { rpt_err(SYSTEM_ERROR, i18nMsg(DBT_ADMSSL_INIT_FAILED,"Cannot initialize SSL"), NULL, NULL); return NULL; } Index: viewdata.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewdata.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -r1.8 -r1.8.2.1 --- viewdata.c 11 May 2007 19:44:05 -0000 1.8 +++ viewdata.c 14 Jul 2008 20:14:16 -0000 1.8.2.1 @@ -113,7 +113,7 @@ if(!ldapInfo) exit(0); - rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 0); + rv = ADMSSL_InitSimple((char *)configdir, (char *)securitydir, 1); if(rv) exit(0); @@ -261,11 +261,11 @@ } PR_smprintf_free(dn); - if(vals = ldap_get_values(server, entry, "nshtmladminproducturl")) { + if((vals = ldap_get_values(server, entry, "nshtmladminproducturl"))) { *url = strdup(vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nshtmladminproducttext")) { + if((vals = ldap_get_values(server, entry, "nshtmladminproducttext"))) { *text = strdup(vals[0]); ldap_value_free(vals); } @@ -292,13 +292,13 @@ return; - if(vals = ldap_get_values(server, entry, "serverproductname")) { + if((vals = ldap_get_values(server, entry, "serverproductname"))) { fprintf(stdout,(const char*)getResourceString(DBT_OUTPUT_DATA_SERVER_PRODUCT_NAME), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "installationtimestamp")) { + if((vals = ldap_get_values(server, entry, "installationtimestamp"))) { struct tm tm; char buf[BIG_LINE]; @@ -323,7 +323,7 @@ } - if(vals = ldap_get_values(server, entry, "serverroot")) { + if((vals = ldap_get_values(server, entry, "serverroot"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_SERVER_ROOT), vals[0]); ldap_value_free(vals); } @@ -358,37 +358,37 @@ "(objectclass=*)", NULL, 0, &entry)) != LDAP_SUCCESS) return; - if(vals = ldap_get_values(server, entry, "nsproductname")) { + if((vals = ldap_get_values(server, entry, "nsproductname"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_PRODUCT_NAME), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsvendor")) { + if((vals = ldap_get_values(server, entry, "nsvendor"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_VENDOR), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsproductversion")) { + if((vals = ldap_get_values(server, entry, "nsproductversion"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_PRODUCT_VERSION), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsbuildnumber")) { + if((vals = ldap_get_values(server, entry, "nsbuildnumber"))) { fprintf(stdout,(const char*)getResourceString(DBT_OUTPUT_DATA_BUILD_NUMBER), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsbuildsecurity")) { + if((vals = ldap_get_values(server, entry, "nsbuildsecurity"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_BUILD_SECURITY), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "nsrevisionnumber")) { + if((vals = ldap_get_values(server, entry, "nsrevisionnumber"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_REVISION_NUMBER), vals[0]); ldap_value_free(vals); } - if(vals = ldap_get_values(server, entry, "description")) { + if((vals = ldap_get_values(server, entry, "description"))) { fprintf(stdout, (const char*)getResourceString(DBT_OUTPUT_DATA_DESCRIPTION), vals[0]); ldap_value_free(vals); } @@ -403,12 +403,6 @@ char line[BIG_LINE]; FILE *html = open_html_file(MY_PAGE); char *sie = NULL; - - char *request; - int errorcode; - PRFileDesc *sockd; - bufstruct *nbuf; - char *binddn, *bindpw; LDAP *server; LDAPMessage *entry; @@ -453,7 +447,7 @@ "(objectclass=*)", NULL, 0, &entry)) != LDAP_SUCCESS) continue; - if(vals = ldap_get_values(server, entry, "nsserverid")) { + if((vals = ldap_get_values(server, entry, "nsserverid"))) { fprintf(stdout, (const char*)getResourceString(DBT_MAIN_SERVER_ID), vals[0]); ldap_value_free(vals); } Index: viewlog.c =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/viewlog.c,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- viewlog.c 31 Oct 2007 05:30:53 -0000 1.10 +++ viewlog.c 14 Jul 2008 20:14:16 -0000 1.10.2.1 @@ -156,7 +156,6 @@ void display_logfiles(char *logdir, char *default_logfile) { int x; - int cnt=0; char *seps = "/"; char *token; char *curlog = NULL; @@ -289,7 +288,6 @@ char *file; char *logdir = NULL; char *id; - char **logfiles = NULL; char tmp[BIG_LINE]; int x; int print_html = 1; @@ -353,6 +351,11 @@ configdir ? configdir : "(null)", rc); rpt_err(APP_ERROR, line, NULL, NULL); } else { + const char *secdir = util_get_security_dir(); + if(ADMSSL_InitSimple((char *)configdir, (char *)secdir, 1)) { + rpt_err(SYSTEM_ERROR, getResourceString(CMN_SSL_INIT_ERROR), NULL, NULL); + } + logdir = getLogDir(ldapInfo, id); if(!logdir) { PR_snprintf(msg, sizeof(msg), @@ -407,7 +410,6 @@ } PR_snprintf(full_path, sizeof(full_path), "%s%c%s", logdir, FILE_PATHSEP, file); - form_unescape(full_path); /* bug 27409, 31807 */ cmd = fopen(full_path, "r"); fprintf(stdout, getResourceString(DBT_MAIN_WIDTH)); PR_snprintf(tmp, sizeof(tmp), getResourceString(DBT_SUBTITLE), num, file, (str)? getResourceString(DBT_WITH) : "", @@ -435,7 +437,6 @@ if (file || *file || util_is_valid_path_string(file) || util_verify_file_or_dir(logdir, PR_FILE_DIRECTORY, file, -1, PR_FILE_FILE)) { PR_snprintf(full_path, sizeof(full_path), "%s%c%s", logdir, FILE_PATHSEP, file); - form_unescape(full_path); /* bug 27409, 31807 */ cmd = fopen(full_path, "r"); /* begin search */ From fedora-directory-commits at redhat.com Mon Jul 14 20:25:56 2008 From: fedora-directory-commits at redhat.com (Robert Crittenden (rcritten)) Date: Mon, 14 Jul 2008 16:25:56 -0400 Subject: [Fedora-directory-commits] mod_nss nss_engine_init.c,1.32,1.33 Message-ID: <200807142025.m6EKPuAV005292@cvs-int.fedora.redhat.com> Author: rcritten Update of /cvs/dirsec/mod_nss In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5196 Modified Files: nss_engine_init.c Log Message: Don't inherit the MP cache when running in threaded mode Don't initialize the database if the SSL is disabled in the configuration 454701 Index: nss_engine_init.c =================================================================== RCS file: /cvs/dirsec/mod_nss/nss_engine_init.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- nss_engine_init.c 16 May 2008 15:16:02 -0000 1.32 +++ nss_engine_init.c 14 Jul 2008 20:25:53 -0000 1.33 @@ -1084,13 +1084,44 @@ SSLModConfigRec *mc = myModConfig(base_server); SSLSrvConfigRec *sc; server_rec *s; + int threaded = 0; + int sslenabled = FALSE; mc->pid = getpid(); /* only call getpid() once per-process */ - if (SSL_InheritMPServerSIDCache(NULL) != SECSuccess) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, - "SSL_InheritMPServerSIDCache failed"); - nss_log_nss_error(APLOG_MARK, APLOG_ERR, NULL); + /* + * First, see if ssl is enabled at all + */ + for (s = base_server; s; s = s->next) { + sc = mySrvConfig(s); + /* If any servers have SSL, we want sslenabled set so we + * can perform further initialization + */ + + if (sc->enabled == UNSET) { + sc->enabled = FALSE; + } + + if (sc->proxy_enabled == UNSET) { + sc->proxy_enabled = FALSE; + } + + if ((sc->enabled == TRUE) || (sc->proxy_enabled == TRUE)) { + sslenabled = TRUE; + } + } + + if (sslenabled == FALSE) { /* we are not an SSL/TLS server */ + return; + } + + ap_mpm_query(AP_MPMQ_MAX_THREADS, &threaded); + if (!threaded) { + if (SSL_InheritMPServerSIDCache(NULL) != SECSuccess) { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, + "SSL_InheritMPServerSIDCache failed"); + nss_log_nss_error(APLOG_MARK, APLOG_ERR, NULL); + } } nss_init_SSLLibrary(base_server); From fedora-directory-commits at redhat.com Mon Jul 14 20:27:04 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:27:04 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cfgstuff ds_removal.in, 1.1, 1.2 Message-ID: <200807142027.m6EKR4Lq005467@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cfgstuff In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5436/adminserver/admserv/cfgstuff Modified Files: ds_removal.in Log Message: Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: Added -f (force) flag to ds_removal. The -f (force) flag tells ds_removal to ignore errors and attempt to remove as much as possible. This is only suggested to be used if ds_removal without the -f flag fails, and you really, really want to remove the ds. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no Index: ds_removal.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cfgstuff/ds_removal.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ds_removal.in 27 Jul 2007 01:35:28 -0000 1.1 +++ ds_removal.in 14 Jul 2008 20:27:02 -0000 1.2 @@ -39,9 +39,10 @@ Usage() { - echo "Usage: $0 -s server_id -w admin_password" + echo "Usage: $0 [-f] -s server_id -w admin_password" echo " server_id: Directory server identifier; slapd-" echo " admin_password: Administration user password" + echo " -f - force - optional - ignore errors and force removal of as much as possible" } err0="" @@ -49,6 +50,7 @@ err2="" server_id="" admin_pw="" +forceflag= while [ "$1" != "" ] do @@ -58,6 +60,8 @@ elif [ "$1" = "-w" ]; then shift admin_pw=$1 + elif [ "$1" = "-f" ]; then + forceflag=1 elif [ "$1" = "-h" -o "$1" = "-H" -o "$1" = "--help" ]; then Usage exit 0 @@ -83,7 +87,7 @@ fi PASSWORD_PIPE=STDIN; export PASSWORD_PIPE -QUERY_STRING="InstanceName=slapd-${server_id}"; export QUERY_STRING +QUERY_STRING="InstanceName=slapd-${server_id}&force=$forceflag"; export QUERY_STRING SERVER_NAMES=slapd-${server_id}; export SERVER_NAMES REQUEST_METHOD=GET; export REQUEST_METHOD From fedora-directory-commits at redhat.com Mon Jul 14 20:27:04 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:27:04 -0400 Subject: [Fedora-directory-commits] adminserver/admserv/cgi-src40 ds_remove.in, 1.6, 1.7 Message-ID: <200807142027.m6EKR4be005473@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/admserv/cgi-src40 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5436/adminserver/admserv/cgi-src40 Modified Files: ds_remove.in Log Message: Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: Added -f (force) flag to ds_removal. The -f (force) flag tells ds_removal to ignore errors and attempt to remove as much as possible. This is only suggested to be used if ds_removal without the -f flag fails, and you really, really want to remove the ds. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no Index: ds_remove.in =================================================================== RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/ds_remove.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ds_remove.in 7 Aug 2007 23:30:01 -0000 1.6 +++ ds_remove.in 14 Jul 2008 20:27:02 -0000 1.7 @@ -136,6 +136,7 @@ $ENV{REQUEST_METHOD} = "GET"; $ENV{QUERY_STRING} = $query->query_string(); +my $force = $query->param('force'); my $instname = $query->param('InstanceName'); my ($slapd, $inst) = split(/-/, $instname, 2); my $configdir = "@instconfigdir@/slapd-$inst"; @@ -189,7 +190,7 @@ # must get admin password from input (PASSWORD_PIPE?) # get admin domain # config ds info -if (!unregisterDSWithConfigDS($inst, \@errs, $inf)) +if (!unregisterDSWithConfigDS($inst, \@errs, $inf) && !$force) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: ", $res->getText(@errs), "\n"; @@ -229,7 +230,7 @@ print STDERR "Warning: Could not stop directory server: $output\n"; } $instdir = $path; # need to use it later... - } else { + } elsif (!$force) { print "Content-type: text/plain\n\n"; print "NMC_ErrInfo: The program $prog does not exist\n"; print "NMC_Status: 1\n"; From fedora-directory-commits at redhat.com Mon Jul 14 20:34:44 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:34:44 -0400 Subject: [Fedora-directory-commits] adminserver/include i18n.h,1.6,1.7 Message-ID: <200807142034.m6EKYiqh006725@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/include In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6632/adminserver/include Modified Files: i18n.h Log Message: removing dead code Index: i18n.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/i18n.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- i18n.h 9 May 2007 00:26:35 -0000 1.6 +++ i18n.h 14 Jul 2008 20:34:41 -0000 1.7 @@ -26,34 +26,6 @@ #include "base/systems.h" #include "libadminutil/resource.h" -typedef res_RESOURCE_TABLE RESOURCE_TABLE; -typedef res_RESOURCE_GLOBAL RESOURCE_GLOBAL; - -/*******************************************************************************/ - -/* - * In accordance with the recommendations in the - * "Fedora Coding Standard for Server Internationalization", - * the following aliases are defined for fprintf, et al., and - * these aliases should be used to clearly indicate the intended - * destination for output. - */ - -#define AdminFprintf fprintf -#define DebugFprintf fprintf - -#define ClientSprintf sprintf -#define AdminSprintf sprintf -#define DebugSprintf sprintf - -#define ClientFputs fputs -#define AdminFputs fputs -#define DebugFputs fputs - -/* more #define, as needed */ - -/*******************************************************************************/ - /* * Function prototypes for application and libraries */ @@ -64,16 +36,6 @@ { #endif -/***************************/ -/* XP_InitStringDatabase() */ -/***************************/ - -NSAPI_PUBLIC -void -XP_InitStringDatabase(char* pathCWD, char* databaseName); - -/* Initialize the resource string database */ - /******************************/ /* XP_GetStringFromDatabase() */ /******************************/ @@ -84,125 +46,10 @@ char* strLanguage, int iToken); -/* Given the LibraryName, Language and Token, extracts the string corresponding - to that library and token from the database in the language requested and - returns a pointer to the string. Note: Use the macros XP_GetClientStr() and - XP_GetAdminStr() defined below to simplify source code. */ - -/*****************/ -/* SetLanguage() */ -/*****************/ -enum -{ - CLIENT_LANGUAGE, - ADMIN_LANGUAGE, - DEFAULT_LANGUAGE -}; - -NSAPI_PUBLIC -extern void -SetLanguage(int type, char *language); - -/* Set language for Client, Admin and Default, XP_GetStringFromDatabase will - base on the setting to retrieve correct string for specific language */ - -/***********************/ -/* GetClientLanguage() */ -/***********************/ - -NSAPI_PUBLIC -extern char* -GetClientLanguage(void); - -/* Returns a pointer to a string with the name of the language requested by - the current client; intended to be passed to XP_GetStringFromDatabase() - and used by the front end macro XP_GetClientStr(). */ - -/**********************/ -/* GetAdminLanguage() */ -/**********************/ - -NSAPI_PUBLIC -extern char* -GetAdminLanguage(void); - -/* Returns a pointer to a string with the name of the language requested by - the administrator; intended to be passed to XP_GetStringFromDatabase() - and used by the front end macro XP_GetAdminStr(). */ - -/************************/ -/* GetDefaultLanguage() */ -/************************/ - -NSAPI_PUBLIC -extern char* -GetDefaultLanguage(void); - -/* Returns a pointer to a string with the name of the default language - for the installation from the configuration file. */ - -/************************/ -/* GetFileForLanguage() */ -/************************/ - -NSAPI_PUBLIC -int -GetFileForLanguage(char* filepath,char* language,char* existingFilepath, size_t existingSize); - -/* Looks for a file in the appropriate language. - - Input: filePath,language - filePath is of the form "/xxx/xxx/$$LANGDIR/xxx/xxx/filename" - or of the form "/xxx/xxx/xxx/xxx/filename". - filename may or may not have an extension. - language is an Accept-Language list; each language-range will be - tried as a subdirectory name and possibly as a filename modifier. - "*" is ignored - default always provided if needed. - "-" is replaced by "_". - $$LANGDIR is a special string replaced by language. It is optional. - For the default case, $$LANGDIR/ is replaced by nothing - (so // is not created). - - Returned: existingPath - existingFilePath is the path of a satisfactory, existing file. - if no file is found, an empty string "" is returned. - - int returned: -1 if no file found (existingFilePath = "") - 0 if default file is returned - 1 if language file is returned (any in list) */ - -/********************/ -/* XP_AccLangList() */ -/********************/ - -#define MAX_ACCEPT_LANGUAGE 16 -#define MAX_ACCEPT_LENGTH 18 - -NSAPI_PUBLIC -int -XP_AccLangList(char* AcceptLanguage, - ACCEPT_LANGUAGE_LIST AcceptLanguageList); - #ifdef __cplusplus } #endif - -/*******************************************************************************/ - -/* - * Function prototypes for building string database - */ - -extern int XP_MakeStringDatabase(void); - -/* Used to create the string database at build time; not used by the application - itself. Returns 0 is successful. */ - -extern void XP_PrintStringDatabase(void); - -/* DEBUG: Prints out entire string database to standard output. */ - /*******************************************************************************/ /* @@ -210,11 +57,6 @@ * (need one argument instead of three) */ -#define XP_GetClientStr(DBTTokenName) \ - XP_GetStringFromDatabase(LIBRARY_NAME, \ - GetClientLanguage(), \ - DBTTokenName) - #define XP_GetAdminStr(DBTTokenName) \ XP_GetStringFromDatabase(LIBRARY_NAME, \ "en", \ @@ -222,37 +64,4 @@ /*******************************************************************************/ - -/*******************************************************************************/ - -/* - * Define the ResDef macro to simplify the maintenance of strings which are to - * be added to the library or application header file (dbtxxx.h). This enables - * source code to refer to the strings by theit TokenNames, and allows the - * strings to be stored in the database. - * - * Usage: ResDef(TokenName,TokenValue,String) - * - * Example: ResDef(DBT_HelloWorld_, \ - * 1,"Hello, World!") - * ResDef(DBT_TheCowJumpedOverTheMoon_, \ - * 2,"The cow jumped over the moon.") - * ResDef(DBT_TheValueOfPiIsAbout31415926536_, \ - * 3,"The value of PI is about 3.1415926536." - * - * RESOURCE_STR is used by makstrdb.c only. It is not used by getstrdb.c or - * in library or application source code. - */ - -#if 0 -#define BEGIN_STR(argLibraryName) \ - enum { -#define ResDef(argToken,argID,argString) \ - argToken = argID, -#define END_STR(argLibraryName) \ - argLibraryName ## top }; - -#endif -/*******************************************************************************/ - #endif From fedora-directory-commits at redhat.com Mon Jul 14 20:34:44 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:34:44 -0400 Subject: [Fedora-directory-commits] adminserver/include/base buffer.h, 1.4, 1.5 util.h, 1.4, 1.5 dbtbase.h, 1.4, NONE Message-ID: <200807142034.m6EKYiOt006732@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/include/base In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6632/adminserver/include/base Modified Files: buffer.h util.h Removed Files: dbtbase.h Log Message: removing dead code Index: buffer.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/base/buffer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- buffer.h 18 Aug 2005 19:14:43 -0000 1.4 +++ buffer.h 14 Jul 2008 20:34:42 -0000 1.5 @@ -91,14 +91,6 @@ filebuf_t *INTfilebuf_create(SYS_FILE fd, caddr_t mmap_ptr, int mmap_len, int bufsz); -/* - * filebuf_close_buffer is provided to cleanup a filebuf without closing - * the underlying file. If clean_mmap is 1, and the file is memory mapped, - * the file will be unmapped. If clean_mmap is 0, the file will not - * be unmapped. - */ -NSAPI_PUBLIC void INTfilebuf_close_buffer(filebuf_t *buf, int clean_mmap); - #ifdef FILE_MMAP #include NSAPI_PUBLIC @@ -122,12 +114,6 @@ NSAPI_PUBLIC int INTpipebuf_next(filebuf_t *buf, int advance); #endif /* XP_WIN32 */ -/* - * buffer_close deallocates a buffer and closes its associated files - * (does not close a network socket). - */ - -NSAPI_PUBLIC void INTfilebuf_close(filebuf_t *buf); #ifdef XP_WIN32 NSAPI_PUBLIC void INTpipebuf_close(filebuf_t *buf); #endif /* XP_WIN32 */ @@ -178,7 +164,6 @@ #define filebuf_next INTfilebuf_next #define filebuf_grab INTfilebuf_grab #define filebuf_create INTfilebuf_create -#define filebuf_close_buffer INTfilebuf_close_buffer #define filebuf_buf2sd INTfilebuf_buf2sd #ifdef XP_WIN32 Index: util.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/base/util.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- util.h 9 May 2007 00:26:35 -0000 1.4 +++ util.h 14 Jul 2008 20:34:42 -0000 1.5 @@ -148,17 +148,6 @@ /* --- End Unix-only function prototypes --- */ -/* --- Begin Windows-only function prototypes --- */ - -#ifdef XP_WIN32 - -NSAPI_PUBLIC -VOID INTutil_delete_directory(char *FileName, BOOL delete_directory); - -#endif /* XP_WIN32 */ - -/* --- End Windows-only function prototypes --- */ - NSPR_END_EXTERN_C #define util_getline INTutil_getline @@ -203,10 +192,6 @@ #define util_waitpid INTutil_waitpid #endif /* XP_UNIX */ -#ifdef XP_WIN32 -#define util_delete_directory INTutil_delete_directory -#endif /* XP_WIN32 */ - #ifdef NEED_STRCASECMP #define util_strcasecmp INTutil_strcasecmp #define strcasecmp INTutil_strcasecmp --- dbtbase.h DELETED --- From fedora-directory-commits at redhat.com Mon Jul 14 20:34:45 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:34:45 -0400 Subject: [Fedora-directory-commits] adminserver/include/libadmin libadmin.h, 1.9, 1.10 Message-ID: <200807142034.m6EKYjtV006738@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/include/libadmin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6632/adminserver/include/libadmin Modified Files: libadmin.h Log Message: removing dead code Index: libadmin.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/libadmin/libadmin.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- libadmin.h 31 Oct 2007 05:30:54 -0000 1.9 +++ libadmin.h 14 Jul 2008 20:34:42 -0000 1.10 @@ -395,19 +395,6 @@ /* util.c */ NSAPI_PUBLIC int get_file_size(char *path); -/* Create a directory path if it does not exist (mkdir -p) */ -/* util.c */ -NSAPI_PUBLIC int ADM_mkdir_p(char *dir, int mode); - -/* Copy a directory recursively. */ -/* util.c */ -NSAPI_PUBLIC int ADM_copy_directory(char *src_dir, char *dest_dir); - -/* Remove a directory recursively. Same as remove_directory except that - filenames arent printed on stdout */ -/* util.c */ -NSAPI_PUBLIC void ADM_remove_directory(char *path); - /* Return: LastModificationTime(f1) < LastModificationTime(f2) ? */ /* util.c */ NSAPI_PUBLIC int mtime_is_earlier(char *file1, char *file2); From fedora-directory-commits at redhat.com Mon Jul 14 20:34:45 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:34:45 -0400 Subject: [Fedora-directory-commits] adminserver/lib/libadmin install.c, 1.6, 1.7 util.c, 1.10, 1.11 Message-ID: <200807142034.m6EKYjrb006751@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/lib/libadmin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6632/adminserver/lib/libadmin Modified Files: install.c util.c Log Message: removing dead code Index: install.c =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libadmin/install.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- install.c 9 May 2007 00:26:37 -0000 1.6 +++ install.c 14 Jul 2008 20:34:43 -0000 1.7 @@ -51,7 +51,7 @@ { int sd; struct sockaddr_in sa_server; - int one = 1, ret; + int ret; #ifdef XP_WIN32 WSADATA wsd; Index: util.c =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libadmin/util.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- util.c 31 Oct 2007 05:30:54 -0000 1.10 +++ util.c 14 Jul 2008 20:34:43 -0000 1.11 @@ -186,130 +186,6 @@ return ans; } -int ADM_mkdir_p(char *dir, int mode) -{ - char path[PATH_MAX]; - struct stat fi; - char *slash = NULL; - - if (dir) - PL_strncpyz (path, dir, sizeof(path)); - else - return 0; - - if (slash = strchr(path, FILE_PATHSEP)) - slash++; /* go past root */ - else - return 0; - - while (slash && *slash) { - slash = strchr(slash, FILE_PATHSEP); - if (slash) *slash = '\0'; /* check path till here */ - - if (stat(path, &fi) == -1) { -#ifdef XP_UNIX - if (mkdir(path, mode) == -1) -#else /* XP_WIN32 */ - if (!CreateDirectory(path, NULL)) -#endif - return 0; - } - - if (slash) { - *slash = FILE_PATHSEP; /* restore path */ - slash++; /* check remaining path */ - } - } - return 1; -} - -int ADM_copy_directory(char *src_dir, char *dest_dir) -{ - SYS_DIR ds; - SYS_DIRENT *d; - struct stat fi; - char src_file[PATH_MAX], dest_file[PATH_MAX], fullname[PATH_MAX]; - - if (!(ds = dir_open(src_dir))) - report_error(FILE_ERROR, "Can't read directory", src_dir); - - while (d = dir_read(ds)) { - if (d->d_name[0] != '.') { - PR_snprintf(fullname, sizeof(fullname), "%s/%s", src_dir, d->d_name); - if (system_stat(fullname, &fi) == -1) - continue; - - PR_snprintf(src_file, sizeof(src_file), "%s%c%s", src_dir, FILE_PATHSEP, d->d_name); - PR_snprintf(dest_file, sizeof(dest_file), "%s%c%s", dest_dir, FILE_PATHSEP, d->d_name); - if (S_ISDIR(fi.st_mode)) { - char *sub_src_dir = STRDUP(src_file); - char *sub_dest_dir = STRDUP(dest_file); - if (!ADM_mkdir_p(sub_dest_dir, 0755)) { - report_error(FILE_ERROR, "Cannot create directory", - sub_dest_dir); - return 0; - } - if (!ADM_copy_directory(sub_src_dir, sub_dest_dir)) - return 0; - FREE(sub_src_dir); - FREE(sub_dest_dir); - } - else - cp_file(src_file, dest_file, 0644); - } - } - dir_close(ds); - return(1); -} - -void ADM_remove_directory(char *path) -{ - struct stat finfo; - char **dirlisting; - register int x=0; - int stat_good = 0; - char *fullpath = NULL; - -#ifdef XP_UNIX - stat_good = (lstat(path, &finfo) == -1 ? 0 : 1); -#else /* XP_WIN32 */ - stat_good = (stat(path, &finfo) == -1 ? 0 : 1); -#endif - - if(!stat_good) return; - - if(S_ISDIR(finfo.st_mode)) { - dirlisting = list_directory(path,1); - if(!dirlisting) return; - - for(x=0; dirlisting[x]; x++) { - fullpath = (char *) MALLOC(strlen(path) + - strlen(dirlisting[x]) + 4); - sprintf(fullpath, "%s%c%s", path, FILE_PATHSEP, dirlisting[x]); -#ifdef XP_UNIX - stat_good = (lstat(fullpath, &finfo) == -1 ? 0 : 1); -#else /* XP_WIN32 */ - stat_good = (stat(fullpath, &finfo) == -1 ? 0 : 1); -#endif - if(!stat_good) continue; - if(S_ISDIR(finfo.st_mode)) { - ADM_remove_directory(fullpath); - } else { - unlink(fullpath); - } - FREE(fullpath); - } -#ifdef XP_UNIX - rmdir(path); -#else /* XP_WIN32 */ - RemoveDirectory(path); -#endif - } else { - delete_file(path); - } - return; -} - /* return: mtime(f1) < mtime(f2) ? */ int mtime_is_earlier(char *file1, char *file2) { @@ -1382,7 +1258,7 @@ ptr = PL_strdup(ptr); } /* copy now points at the parent, ptr at the child */ - if (pdir = PR_OpenDir(copy)) { + if ((pdir = PR_OpenDir(copy))) { for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { ret = !strcmp(pent->name, ptr); @@ -1393,7 +1269,7 @@ ret = 0; /* we've verified that name is a valid directory - see if the given filename exists in that directory */ - if (pdir = PR_OpenDir(name)) { + if ((pdir = PR_OpenDir(name))) { for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { if (childlen > 0) { From fedora-directory-commits at redhat.com Mon Jul 14 20:34:45 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:34:45 -0400 Subject: [Fedora-directory-commits] adminserver/lib/base nscputil.cpp, 1.3, 1.4 buffer.cpp, 1.4, NONE eventhandler.cpp, 1.3, NONE eventlog.cpp, 1.3, NONE ntdaemon.cpp, 1.3, NONE nterrors.cpp, 1.3, NONE ntpipe.cpp, 1.3, NONE Message-ID: <200807142034.m6EKYjUN006744@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/lib/base In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6632/adminserver/lib/base Modified Files: nscputil.cpp Removed Files: buffer.cpp eventhandler.cpp eventlog.cpp ntdaemon.cpp nterrors.cpp ntpipe.cpp Log Message: removing dead code Index: nscputil.cpp =================================================================== RCS file: /cvs/dirsec/adminserver/lib/base/nscputil.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- nscputil.cpp 22 Jun 2007 01:34:20 -0000 1.3 +++ nscputil.cpp 14 Jul 2008 20:34:43 -0000 1.4 @@ -44,9 +44,6 @@ #include "base/util.h" -#include "base/dbtbase.h" - - #ifdef XP_UNIX #include #endif /* WIN32 */ @@ -850,66 +847,6 @@ } #endif /* NEED_STRNCASECMP */ -#ifdef XP_WIN32 - - -/* util_delete_directory() - * This routine deletes all the files in a directory. If delete_directory is - * TRUE it will also delete the directory itself. - */ -VOID -util_delete_directory(char *FileName, BOOL delete_directory) -{ - HANDLE firstFile; - WIN32_FIND_DATA findData; - char *TmpFile, *NewFile; - - if (FileName == NULL) - return; - - TmpFile = (char *)MALLOC(strlen(FileName) + 5); - sprintf(TmpFile, "%s\\*.*", FileName); - firstFile = FindFirstFile(TmpFile, &findData); - FREE(TmpFile); - - if (firstFile == INVALID_HANDLE_VALUE) - return; - - if(strcmp(findData.cFileName, ".") && - strcmp(findData.cFileName, "..")) { - NewFile = (char *)MALLOC(strlen(FileName) + 1 + - strlen(findData.cFileName) + 1); - sprintf(NewFile, "%s\\%s",FileName, findData.cFileName); - DeleteFile(NewFile); - FREE(NewFile); - } - while (TRUE) { - if(!(FindNextFile(firstFile, &findData))) { - if (GetLastError() != ERROR_NO_MORE_FILES) { -// ereport(LOG_WARN, XP_GetAdminStr(DBT_couldNotRemoveTemporaryDirectory_), FileName, GetLastError()); - } else { - FindClose(firstFile); - if (delete_directory) - if(!RemoveDirectory(FileName)) { -// ereport(LOG_WARN, - XP_GetAdminStr(DBT_couldNotRemoveTemporaryDirectory_1), - FileName, GetLastError()); - } - return; - } - } else { - if(strcmp(findData.cFileName, ".") && - strcmp(findData.cFileName, "..")) { - NewFile = (char *)MALLOC(strlen(FileName) + 5 + - strlen(findData.cFileName) + 1); - sprintf(NewFile,"%s\\%s", FileName, findData.cFileName); - DeleteFile(NewFile); - FREE(NewFile); - } - } - } -} -#endif /* ------------------------------ util_strftime --------------------------- */ /* --- buffer.cpp DELETED --- --- eventhandler.cpp DELETED --- --- eventlog.cpp DELETED --- --- ntdaemon.cpp DELETED --- --- nterrors.cpp DELETED --- --- ntpipe.cpp DELETED --- From fedora-directory-commits at redhat.com Mon Jul 14 20:34:45 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:34:45 -0400 Subject: [Fedora-directory-commits] adminserver/lib/libsi18n getstrprop.c, 1.4, 1.5 gsadmserv.h, 1.6, 1.7 coreres.c, 1.3, NONE coreres.h, 1.3, NONE getlang.c, 1.5, NONE lock.h, 1.3, NONE makstrdb.c, 1.4, NONE propset.c, 1.4, NONE propset.h, 1.3, NONE reshash.c, 1.3, NONE reshash.h, 1.3, NONE txtfile.c, 1.4, NONE txtfile.h, 1.3, NONE Message-ID: <200807142034.m6EKYjlW006758@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/lib/libsi18n In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6632/adminserver/lib/libsi18n Modified Files: getstrprop.c gsadmserv.h Removed Files: coreres.c coreres.h getlang.c lock.h makstrdb.c propset.c propset.h reshash.c reshash.h txtfile.c txtfile.h Log Message: removing dead code Index: getstrprop.c =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libsi18n/getstrprop.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- getstrprop.c 31 Mar 2006 22:58:34 -0000 1.4 +++ getstrprop.c 14 Jul 2008 20:34:43 -0000 1.5 @@ -27,71 +27,20 @@ #include "getstrmem.h" -#include "libadminutil/resource.h" -#include "coreres.h" - -Resource *hResource = NULL; -char empty_string[] = ""; - char* XP_GetStringFromMemory(char* strLibraryName,int iToken); - -void -XP_InitStringDatabase(char* pathCWD, char* databaseName) -{ - hResource = core_res_init_resource (pathCWD, databaseName); -} - -char *XP_GetPropertyString(char* strLibraryName,int iToken, ACCEPT_LANGUAGE_LIST lang) -{ - char *key_name; - char *result = NULL; - - if (hResource == NULL) - return NULL; - - /*creating the key*/ - key_name=(char*)malloc(strlen(strLibraryName) + 10); - sprintf(key_name, "%s-%d", strLibraryName, iToken); - if(key_name == NULL) - return NULL; - - result = (char *) core_res_getstring(hResource, key_name, lang) ; - - if (key_name) - free (key_name); - - if (result == NULL) - return empty_string; - else - return result ; -} - char* XP_GetStringFromDatabase(char* strLibraryName, char* strLanguage, int key) { char *result = NULL; - ACCEPT_LANGUAGE_LIST alanglist; - int n; - /* - * display first choice language if available, otherwise - * use default which is english in most case - */ - if (hResource) { - n = XP_AccLangList (strLanguage, alanglist); - if (n >= MAX_ACCEPT_LANGUAGE) - alanglist[MAX_ACCEPT_LANGUAGE-1][0] = '\0'; - else - alanglist[n][0] = '\0'; - result = XP_GetPropertyString(strLibraryName, key, alanglist); - } - - /* we should never come here. */ + /* we should eventually port this to use proper adminutil + resources, but for now, only the in-memory resource + model is supported */ if (result == NULL) result = XP_GetStringFromMemory(strLibraryName,key); return result; @@ -150,115 +99,3 @@ } } - -#if 0 -#include "base/crit.h" -#include "base/systhr.h" -static int Initialized = 0; - -#ifdef XP_UNIX - -#include -#include -#include -#include - -union _semarg -{ - int val; - struct semid_ds *buf; - ushort *array; -}; - -int _si18n_semMutex; -pid_t _lockOwner = 0; -int _si18n_waitQueue; -struct sembuf _semop_p[1] = {0,-1,0}; -struct sembuf _semop_v[1] = {0,1,0}; - - -void _si18n_lock(MutexPointer p) -{ - pid_t current_pid = getpid(); - - semop(*((int*)p),_semop_p,1); - if (current_pid != _lockOwner) - { - semop(*((int*)p),_semop_v,1); - semop(_si18n_waitQueue,_semop_p,1); /* wait for access */ - semop(*((int*)p),_semop_p,1); - _lockOwner = current_pid; - } - - semop(*((int*)p),_semop_v,1); - -} - -void _si18n_unlock(MutexPointer p) -{ - semop(*((int*)p),_semop_p,1); - - _lockOwner = 0; - semop(_si18n_waitQueue,_semop_v,1); /* signal one waiter */ - - semop(*((int*)p),_semop_v,1); - -} - -MutexImplementation _nlsMutexImplementation = -{ - &_si18n_semMutex, - _si18n_lock, - _si18n_unlock -}; - -MutexImplementation* _pMutexImplementation = &_nlsMutexImplementation; - - -void InitSynchronization(void) -{ - union _semarg val; - - val.val = 1; /* to avoid an aligment fault on certain platforms */ - - _si18n_semMutex = semget(IPC_PRIVATE,1,IPC_CREAT | 0600); - _si18n_waitQueue = semget(IPC_PRIVATE,1,IPC_CREAT | 0600); - - semctl(_si18n_semMutex,0,SETVAL,val); - semctl(_si18n_waitQueue,0,SETVAL,val); -} - -#else -#include "lock.h" -#include - -static CRITICAL_SECTION _csMutex; - -void _lock(MutexPointer p) -{ - EnterCriticalSection((CRITICAL_SECTION*)p); -} - -void _unlock(MutexPointer p) -{ - LeaveCriticalSection((CRITICAL_SECTION*)p); -} - -MutexImplementation _nlsMutexImplementation = -{ - &_csMutex, - _lock, - _unlock -}; - -MutexImplementation* _pMutexImplementation = &_nlsMutexImplementation; - -void InitSynchronization(void) -{ - InitializeCriticalSection(&_csMutex); -} - -#endif - -#endif - Index: gsadmserv.h =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libsi18n/gsadmserv.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- gsadmserv.h 18 Jul 2007 22:10:31 -0000 1.6 +++ gsadmserv.h 14 Jul 2008 20:34:43 -0000 1.7 @@ -26,13 +26,10 @@ #undef LIBRARY_NAME #include "../admserv/cgi-src40/dbtcgiadmin.h" #undef LIBRARY_NAME -#include "base/dbtbase.h" -#undef LIBRARY_NAME #include "libadmin/dbtlibadmin.h" -static RESOURCE_GLOBAL allxpstr[] = { +static res_RESOURCE_GLOBAL allxpstr[] = { admserv, - base, 0 }; --- coreres.c DELETED --- --- coreres.h DELETED --- --- getlang.c DELETED --- --- lock.h DELETED --- --- makstrdb.c DELETED --- --- propset.c DELETED --- --- propset.h DELETED --- --- reshash.c DELETED --- --- reshash.h DELETED --- --- txtfile.c DELETED --- --- txtfile.h DELETED --- From fedora-directory-commits at redhat.com Mon Jul 14 20:58:48 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:58:48 -0400 Subject: [Fedora-directory-commits] adminserver/include/base buffer.h, 1.4, 1.4.2.1 util.h, 1.4, 1.4.2.1 dbtbase.h, 1.4, NONE Message-ID: <200807142058.m6EKwmIr009717@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/include/base In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9594/adminserver/include/base Modified Files: Tag: Directory_Server_8_0_Branch buffer.h util.h Removed Files: Tag: Directory_Server_8_0_Branch dbtbase.h Log Message: remove obsolete code from 8.0 branch Index: buffer.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/base/buffer.h,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- buffer.h 18 Aug 2005 19:14:43 -0000 1.4 +++ buffer.h 14 Jul 2008 20:58:46 -0000 1.4.2.1 @@ -91,14 +91,6 @@ filebuf_t *INTfilebuf_create(SYS_FILE fd, caddr_t mmap_ptr, int mmap_len, int bufsz); -/* - * filebuf_close_buffer is provided to cleanup a filebuf without closing - * the underlying file. If clean_mmap is 1, and the file is memory mapped, - * the file will be unmapped. If clean_mmap is 0, the file will not - * be unmapped. - */ -NSAPI_PUBLIC void INTfilebuf_close_buffer(filebuf_t *buf, int clean_mmap); - #ifdef FILE_MMAP #include NSAPI_PUBLIC @@ -122,12 +114,6 @@ NSAPI_PUBLIC int INTpipebuf_next(filebuf_t *buf, int advance); #endif /* XP_WIN32 */ -/* - * buffer_close deallocates a buffer and closes its associated files - * (does not close a network socket). - */ - -NSAPI_PUBLIC void INTfilebuf_close(filebuf_t *buf); #ifdef XP_WIN32 NSAPI_PUBLIC void INTpipebuf_close(filebuf_t *buf); #endif /* XP_WIN32 */ @@ -178,7 +164,6 @@ #define filebuf_next INTfilebuf_next #define filebuf_grab INTfilebuf_grab #define filebuf_create INTfilebuf_create -#define filebuf_close_buffer INTfilebuf_close_buffer #define filebuf_buf2sd INTfilebuf_buf2sd #ifdef XP_WIN32 Index: util.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/base/util.h,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- util.h 9 May 2007 00:26:35 -0000 1.4 +++ util.h 14 Jul 2008 20:58:46 -0000 1.4.2.1 @@ -148,17 +148,6 @@ /* --- End Unix-only function prototypes --- */ -/* --- Begin Windows-only function prototypes --- */ - -#ifdef XP_WIN32 - -NSAPI_PUBLIC -VOID INTutil_delete_directory(char *FileName, BOOL delete_directory); - -#endif /* XP_WIN32 */ - -/* --- End Windows-only function prototypes --- */ - NSPR_END_EXTERN_C #define util_getline INTutil_getline @@ -203,10 +192,6 @@ #define util_waitpid INTutil_waitpid #endif /* XP_UNIX */ -#ifdef XP_WIN32 -#define util_delete_directory INTutil_delete_directory -#endif /* XP_WIN32 */ - #ifdef NEED_STRCASECMP #define util_strcasecmp INTutil_strcasecmp #define strcasecmp INTutil_strcasecmp --- dbtbase.h DELETED --- From fedora-directory-commits at redhat.com Mon Jul 14 20:58:48 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:58:48 -0400 Subject: [Fedora-directory-commits] adminserver/include i18n.h,1.6,1.6.2.1 Message-ID: <200807142058.m6EKwmUo009710@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/include In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9594/adminserver/include Modified Files: Tag: Directory_Server_8_0_Branch i18n.h Log Message: remove obsolete code from 8.0 branch Index: i18n.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/i18n.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- i18n.h 9 May 2007 00:26:35 -0000 1.6 +++ i18n.h 14 Jul 2008 20:58:46 -0000 1.6.2.1 @@ -26,34 +26,6 @@ #include "base/systems.h" #include "libadminutil/resource.h" -typedef res_RESOURCE_TABLE RESOURCE_TABLE; -typedef res_RESOURCE_GLOBAL RESOURCE_GLOBAL; - -/*******************************************************************************/ - -/* - * In accordance with the recommendations in the - * "Fedora Coding Standard for Server Internationalization", - * the following aliases are defined for fprintf, et al., and - * these aliases should be used to clearly indicate the intended - * destination for output. - */ - -#define AdminFprintf fprintf -#define DebugFprintf fprintf - -#define ClientSprintf sprintf -#define AdminSprintf sprintf -#define DebugSprintf sprintf - -#define ClientFputs fputs -#define AdminFputs fputs -#define DebugFputs fputs - -/* more #define, as needed */ - -/*******************************************************************************/ - /* * Function prototypes for application and libraries */ @@ -64,16 +36,6 @@ { #endif -/***************************/ -/* XP_InitStringDatabase() */ -/***************************/ - -NSAPI_PUBLIC -void -XP_InitStringDatabase(char* pathCWD, char* databaseName); - -/* Initialize the resource string database */ - /******************************/ /* XP_GetStringFromDatabase() */ /******************************/ @@ -84,125 +46,10 @@ char* strLanguage, int iToken); -/* Given the LibraryName, Language and Token, extracts the string corresponding - to that library and token from the database in the language requested and - returns a pointer to the string. Note: Use the macros XP_GetClientStr() and - XP_GetAdminStr() defined below to simplify source code. */ - -/*****************/ -/* SetLanguage() */ -/*****************/ -enum -{ - CLIENT_LANGUAGE, - ADMIN_LANGUAGE, - DEFAULT_LANGUAGE -}; - -NSAPI_PUBLIC -extern void -SetLanguage(int type, char *language); - -/* Set language for Client, Admin and Default, XP_GetStringFromDatabase will - base on the setting to retrieve correct string for specific language */ - -/***********************/ -/* GetClientLanguage() */ -/***********************/ - -NSAPI_PUBLIC -extern char* -GetClientLanguage(void); - -/* Returns a pointer to a string with the name of the language requested by - the current client; intended to be passed to XP_GetStringFromDatabase() - and used by the front end macro XP_GetClientStr(). */ - -/**********************/ -/* GetAdminLanguage() */ -/**********************/ - -NSAPI_PUBLIC -extern char* -GetAdminLanguage(void); - -/* Returns a pointer to a string with the name of the language requested by - the administrator; intended to be passed to XP_GetStringFromDatabase() - and used by the front end macro XP_GetAdminStr(). */ - -/************************/ -/* GetDefaultLanguage() */ -/************************/ - -NSAPI_PUBLIC -extern char* -GetDefaultLanguage(void); - -/* Returns a pointer to a string with the name of the default language - for the installation from the configuration file. */ - -/************************/ -/* GetFileForLanguage() */ -/************************/ - -NSAPI_PUBLIC -int -GetFileForLanguage(char* filepath,char* language,char* existingFilepath, size_t existingSize); - -/* Looks for a file in the appropriate language. - - Input: filePath,language - filePath is of the form "/xxx/xxx/$$LANGDIR/xxx/xxx/filename" - or of the form "/xxx/xxx/xxx/xxx/filename". - filename may or may not have an extension. - language is an Accept-Language list; each language-range will be - tried as a subdirectory name and possibly as a filename modifier. - "*" is ignored - default always provided if needed. - "-" is replaced by "_". - $$LANGDIR is a special string replaced by language. It is optional. - For the default case, $$LANGDIR/ is replaced by nothing - (so // is not created). - - Returned: existingPath - existingFilePath is the path of a satisfactory, existing file. - if no file is found, an empty string "" is returned. - - int returned: -1 if no file found (existingFilePath = "") - 0 if default file is returned - 1 if language file is returned (any in list) */ - -/********************/ -/* XP_AccLangList() */ -/********************/ - -#define MAX_ACCEPT_LANGUAGE 16 -#define MAX_ACCEPT_LENGTH 18 - -NSAPI_PUBLIC -int -XP_AccLangList(char* AcceptLanguage, - ACCEPT_LANGUAGE_LIST AcceptLanguageList); - #ifdef __cplusplus } #endif - -/*******************************************************************************/ - -/* - * Function prototypes for building string database - */ - -extern int XP_MakeStringDatabase(void); - -/* Used to create the string database at build time; not used by the application - itself. Returns 0 is successful. */ - -extern void XP_PrintStringDatabase(void); - -/* DEBUG: Prints out entire string database to standard output. */ - /*******************************************************************************/ /* @@ -210,11 +57,6 @@ * (need one argument instead of three) */ -#define XP_GetClientStr(DBTTokenName) \ - XP_GetStringFromDatabase(LIBRARY_NAME, \ - GetClientLanguage(), \ - DBTTokenName) - #define XP_GetAdminStr(DBTTokenName) \ XP_GetStringFromDatabase(LIBRARY_NAME, \ "en", \ @@ -222,37 +64,4 @@ /*******************************************************************************/ - -/*******************************************************************************/ - -/* - * Define the ResDef macro to simplify the maintenance of strings which are to - * be added to the library or application header file (dbtxxx.h). This enables - * source code to refer to the strings by theit TokenNames, and allows the - * strings to be stored in the database. - * - * Usage: ResDef(TokenName,TokenValue,String) - * - * Example: ResDef(DBT_HelloWorld_, \ - * 1,"Hello, World!") - * ResDef(DBT_TheCowJumpedOverTheMoon_, \ - * 2,"The cow jumped over the moon.") - * ResDef(DBT_TheValueOfPiIsAbout31415926536_, \ - * 3,"The value of PI is about 3.1415926536." - * - * RESOURCE_STR is used by makstrdb.c only. It is not used by getstrdb.c or - * in library or application source code. - */ - -#if 0 -#define BEGIN_STR(argLibraryName) \ - enum { -#define ResDef(argToken,argID,argString) \ - argToken = argID, -#define END_STR(argLibraryName) \ - argLibraryName ## top }; - -#endif -/*******************************************************************************/ - #endif From fedora-directory-commits at redhat.com Mon Jul 14 20:58:49 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:58:49 -0400 Subject: [Fedora-directory-commits] adminserver/include/libadmin libadmin.h, 1.9, 1.9.2.1 Message-ID: <200807142058.m6EKwnne009723@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/include/libadmin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9594/adminserver/include/libadmin Modified Files: Tag: Directory_Server_8_0_Branch libadmin.h Log Message: remove obsolete code from 8.0 branch Index: libadmin.h =================================================================== RCS file: /cvs/dirsec/adminserver/include/libadmin/libadmin.h,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -r1.9 -r1.9.2.1 --- libadmin.h 31 Oct 2007 05:30:54 -0000 1.9 +++ libadmin.h 14 Jul 2008 20:58:46 -0000 1.9.2.1 @@ -395,19 +395,6 @@ /* util.c */ NSAPI_PUBLIC int get_file_size(char *path); -/* Create a directory path if it does not exist (mkdir -p) */ -/* util.c */ -NSAPI_PUBLIC int ADM_mkdir_p(char *dir, int mode); - -/* Copy a directory recursively. */ -/* util.c */ -NSAPI_PUBLIC int ADM_copy_directory(char *src_dir, char *dest_dir); - -/* Remove a directory recursively. Same as remove_directory except that - filenames arent printed on stdout */ -/* util.c */ -NSAPI_PUBLIC void ADM_remove_directory(char *path); - /* Return: LastModificationTime(f1) < LastModificationTime(f2) ? */ /* util.c */ NSAPI_PUBLIC int mtime_is_earlier(char *file1, char *file2); From fedora-directory-commits at redhat.com Mon Jul 14 20:58:49 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:58:49 -0400 Subject: [Fedora-directory-commits] adminserver/lib/base nscputil.cpp, 1.3, 1.3.2.1 buffer.cpp, 1.4, NONE eventhandler.cpp, 1.3, NONE eventlog.cpp, 1.3, NONE ntdaemon.cpp, 1.3, NONE nterrors.cpp, 1.3, NONE ntpipe.cpp, 1.3, NONE Message-ID: <200807142058.m6EKwnX3009729@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/lib/base In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9594/adminserver/lib/base Modified Files: Tag: Directory_Server_8_0_Branch nscputil.cpp Removed Files: Tag: Directory_Server_8_0_Branch buffer.cpp eventhandler.cpp eventlog.cpp ntdaemon.cpp nterrors.cpp ntpipe.cpp Log Message: remove obsolete code from 8.0 branch Index: nscputil.cpp =================================================================== RCS file: /cvs/dirsec/adminserver/lib/base/nscputil.cpp,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -r1.3 -r1.3.2.1 --- nscputil.cpp 22 Jun 2007 01:34:20 -0000 1.3 +++ nscputil.cpp 14 Jul 2008 20:58:47 -0000 1.3.2.1 @@ -44,9 +44,6 @@ #include "base/util.h" -#include "base/dbtbase.h" - - #ifdef XP_UNIX #include #endif /* WIN32 */ @@ -850,66 +847,6 @@ } #endif /* NEED_STRNCASECMP */ -#ifdef XP_WIN32 - - -/* util_delete_directory() - * This routine deletes all the files in a directory. If delete_directory is - * TRUE it will also delete the directory itself. - */ -VOID -util_delete_directory(char *FileName, BOOL delete_directory) -{ - HANDLE firstFile; - WIN32_FIND_DATA findData; - char *TmpFile, *NewFile; - - if (FileName == NULL) - return; - - TmpFile = (char *)MALLOC(strlen(FileName) + 5); - sprintf(TmpFile, "%s\\*.*", FileName); - firstFile = FindFirstFile(TmpFile, &findData); - FREE(TmpFile); - - if (firstFile == INVALID_HANDLE_VALUE) - return; - - if(strcmp(findData.cFileName, ".") && - strcmp(findData.cFileName, "..")) { - NewFile = (char *)MALLOC(strlen(FileName) + 1 + - strlen(findData.cFileName) + 1); - sprintf(NewFile, "%s\\%s",FileName, findData.cFileName); - DeleteFile(NewFile); - FREE(NewFile); - } - while (TRUE) { - if(!(FindNextFile(firstFile, &findData))) { - if (GetLastError() != ERROR_NO_MORE_FILES) { -// ereport(LOG_WARN, XP_GetAdminStr(DBT_couldNotRemoveTemporaryDirectory_), FileName, GetLastError()); - } else { - FindClose(firstFile); - if (delete_directory) - if(!RemoveDirectory(FileName)) { -// ereport(LOG_WARN, - XP_GetAdminStr(DBT_couldNotRemoveTemporaryDirectory_1), - FileName, GetLastError()); - } - return; - } - } else { - if(strcmp(findData.cFileName, ".") && - strcmp(findData.cFileName, "..")) { - NewFile = (char *)MALLOC(strlen(FileName) + 5 + - strlen(findData.cFileName) + 1); - sprintf(NewFile,"%s\\%s", FileName, findData.cFileName); - DeleteFile(NewFile); - FREE(NewFile); - } - } - } -} -#endif /* ------------------------------ util_strftime --------------------------- */ /* --- buffer.cpp DELETED --- --- eventhandler.cpp DELETED --- --- eventlog.cpp DELETED --- --- ntdaemon.cpp DELETED --- --- nterrors.cpp DELETED --- --- ntpipe.cpp DELETED --- From fedora-directory-commits at redhat.com Mon Jul 14 20:58:49 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:58:49 -0400 Subject: [Fedora-directory-commits] adminserver/lib/libadmin install.c, 1.6, 1.6.2.1 util.c, 1.10, 1.10.2.1 Message-ID: <200807142058.m6EKwn6I009738@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/lib/libadmin In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9594/adminserver/lib/libadmin Modified Files: Tag: Directory_Server_8_0_Branch install.c util.c Log Message: remove obsolete code from 8.0 branch Index: install.c =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libadmin/install.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- install.c 9 May 2007 00:26:37 -0000 1.6 +++ install.c 14 Jul 2008 20:58:47 -0000 1.6.2.1 @@ -51,7 +51,7 @@ { int sd; struct sockaddr_in sa_server; - int one = 1, ret; + int ret; #ifdef XP_WIN32 WSADATA wsd; Index: util.c =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libadmin/util.c,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -r1.10 -r1.10.2.1 --- util.c 31 Oct 2007 05:30:54 -0000 1.10 +++ util.c 14 Jul 2008 20:58:47 -0000 1.10.2.1 @@ -186,130 +186,6 @@ return ans; } -int ADM_mkdir_p(char *dir, int mode) -{ - char path[PATH_MAX]; - struct stat fi; - char *slash = NULL; - - if (dir) - PL_strncpyz (path, dir, sizeof(path)); - else - return 0; - - if (slash = strchr(path, FILE_PATHSEP)) - slash++; /* go past root */ - else - return 0; - - while (slash && *slash) { - slash = strchr(slash, FILE_PATHSEP); - if (slash) *slash = '\0'; /* check path till here */ - - if (stat(path, &fi) == -1) { -#ifdef XP_UNIX - if (mkdir(path, mode) == -1) -#else /* XP_WIN32 */ - if (!CreateDirectory(path, NULL)) -#endif - return 0; - } - - if (slash) { - *slash = FILE_PATHSEP; /* restore path */ - slash++; /* check remaining path */ - } - } - return 1; -} - -int ADM_copy_directory(char *src_dir, char *dest_dir) -{ - SYS_DIR ds; - SYS_DIRENT *d; - struct stat fi; - char src_file[PATH_MAX], dest_file[PATH_MAX], fullname[PATH_MAX]; - - if (!(ds = dir_open(src_dir))) - report_error(FILE_ERROR, "Can't read directory", src_dir); - - while (d = dir_read(ds)) { - if (d->d_name[0] != '.') { - PR_snprintf(fullname, sizeof(fullname), "%s/%s", src_dir, d->d_name); - if (system_stat(fullname, &fi) == -1) - continue; - - PR_snprintf(src_file, sizeof(src_file), "%s%c%s", src_dir, FILE_PATHSEP, d->d_name); - PR_snprintf(dest_file, sizeof(dest_file), "%s%c%s", dest_dir, FILE_PATHSEP, d->d_name); - if (S_ISDIR(fi.st_mode)) { - char *sub_src_dir = STRDUP(src_file); - char *sub_dest_dir = STRDUP(dest_file); - if (!ADM_mkdir_p(sub_dest_dir, 0755)) { - report_error(FILE_ERROR, "Cannot create directory", - sub_dest_dir); - return 0; - } - if (!ADM_copy_directory(sub_src_dir, sub_dest_dir)) - return 0; - FREE(sub_src_dir); - FREE(sub_dest_dir); - } - else - cp_file(src_file, dest_file, 0644); - } - } - dir_close(ds); - return(1); -} - -void ADM_remove_directory(char *path) -{ - struct stat finfo; - char **dirlisting; - register int x=0; - int stat_good = 0; - char *fullpath = NULL; - -#ifdef XP_UNIX - stat_good = (lstat(path, &finfo) == -1 ? 0 : 1); -#else /* XP_WIN32 */ - stat_good = (stat(path, &finfo) == -1 ? 0 : 1); -#endif - - if(!stat_good) return; - - if(S_ISDIR(finfo.st_mode)) { - dirlisting = list_directory(path,1); - if(!dirlisting) return; - - for(x=0; dirlisting[x]; x++) { - fullpath = (char *) MALLOC(strlen(path) + - strlen(dirlisting[x]) + 4); - sprintf(fullpath, "%s%c%s", path, FILE_PATHSEP, dirlisting[x]); -#ifdef XP_UNIX - stat_good = (lstat(fullpath, &finfo) == -1 ? 0 : 1); -#else /* XP_WIN32 */ - stat_good = (stat(fullpath, &finfo) == -1 ? 0 : 1); -#endif - if(!stat_good) continue; - if(S_ISDIR(finfo.st_mode)) { - ADM_remove_directory(fullpath); - } else { - unlink(fullpath); - } - FREE(fullpath); - } -#ifdef XP_UNIX - rmdir(path); -#else /* XP_WIN32 */ - RemoveDirectory(path); -#endif - } else { - delete_file(path); - } - return; -} - /* return: mtime(f1) < mtime(f2) ? */ int mtime_is_earlier(char *file1, char *file2) { @@ -1382,7 +1258,7 @@ ptr = PL_strdup(ptr); } /* copy now points at the parent, ptr at the child */ - if (pdir = PR_OpenDir(copy)) { + if ((pdir = PR_OpenDir(copy))) { for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { ret = !strcmp(pent->name, ptr); @@ -1393,7 +1269,7 @@ ret = 0; /* we've verified that name is a valid directory - see if the given filename exists in that directory */ - if (pdir = PR_OpenDir(name)) { + if ((pdir = PR_OpenDir(name))) { for(pent = PR_ReadDir(pdir, PR_SKIP_BOTH); pent && !ret; pent = PR_ReadDir(pdir, PR_SKIP_BOTH)) { if (childlen > 0) { From fedora-directory-commits at redhat.com Mon Jul 14 20:58:50 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:58:50 -0400 Subject: [Fedora-directory-commits] adminserver/lib/libsi18n getstrprop.c, 1.4, 1.4.2.1 gsadmserv.h, 1.6, 1.6.2.1 coreres.c, 1.3, NONE coreres.h, 1.3, NONE getlang.c, 1.5, NONE lock.h, 1.3, NONE makstrdb.c, 1.4, NONE propset.c, 1.4, NONE propset.h, 1.3, NONE reshash.c, 1.3, NONE reshash.h, 1.3, NONE txtfile.c, 1.4, NONE txtfile.h, 1.3, NONE Message-ID: <200807142058.m6EKwoxY009745@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver/lib/libsi18n In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9594/adminserver/lib/libsi18n Modified Files: Tag: Directory_Server_8_0_Branch getstrprop.c gsadmserv.h Removed Files: Tag: Directory_Server_8_0_Branch coreres.c coreres.h getlang.c lock.h makstrdb.c propset.c propset.h reshash.c reshash.h txtfile.c txtfile.h Log Message: remove obsolete code from 8.0 branch Index: getstrprop.c =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libsi18n/getstrprop.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- getstrprop.c 31 Mar 2006 22:58:34 -0000 1.4 +++ getstrprop.c 14 Jul 2008 20:58:47 -0000 1.4.2.1 @@ -27,71 +27,20 @@ #include "getstrmem.h" -#include "libadminutil/resource.h" -#include "coreres.h" - -Resource *hResource = NULL; -char empty_string[] = ""; - char* XP_GetStringFromMemory(char* strLibraryName,int iToken); - -void -XP_InitStringDatabase(char* pathCWD, char* databaseName) -{ - hResource = core_res_init_resource (pathCWD, databaseName); -} - -char *XP_GetPropertyString(char* strLibraryName,int iToken, ACCEPT_LANGUAGE_LIST lang) -{ - char *key_name; - char *result = NULL; - - if (hResource == NULL) - return NULL; - - /*creating the key*/ - key_name=(char*)malloc(strlen(strLibraryName) + 10); - sprintf(key_name, "%s-%d", strLibraryName, iToken); - if(key_name == NULL) - return NULL; - - result = (char *) core_res_getstring(hResource, key_name, lang) ; - - if (key_name) - free (key_name); - - if (result == NULL) - return empty_string; - else - return result ; -} - char* XP_GetStringFromDatabase(char* strLibraryName, char* strLanguage, int key) { char *result = NULL; - ACCEPT_LANGUAGE_LIST alanglist; - int n; - /* - * display first choice language if available, otherwise - * use default which is english in most case - */ - if (hResource) { - n = XP_AccLangList (strLanguage, alanglist); - if (n >= MAX_ACCEPT_LANGUAGE) - alanglist[MAX_ACCEPT_LANGUAGE-1][0] = '\0'; - else - alanglist[n][0] = '\0'; - result = XP_GetPropertyString(strLibraryName, key, alanglist); - } - - /* we should never come here. */ + /* we should eventually port this to use proper adminutil + resources, but for now, only the in-memory resource + model is supported */ if (result == NULL) result = XP_GetStringFromMemory(strLibraryName,key); return result; @@ -150,115 +99,3 @@ } } - -#if 0 -#include "base/crit.h" -#include "base/systhr.h" -static int Initialized = 0; - -#ifdef XP_UNIX - -#include -#include -#include -#include - -union _semarg -{ - int val; - struct semid_ds *buf; - ushort *array; -}; - -int _si18n_semMutex; -pid_t _lockOwner = 0; -int _si18n_waitQueue; -struct sembuf _semop_p[1] = {0,-1,0}; -struct sembuf _semop_v[1] = {0,1,0}; - - -void _si18n_lock(MutexPointer p) -{ - pid_t current_pid = getpid(); - - semop(*((int*)p),_semop_p,1); - if (current_pid != _lockOwner) - { - semop(*((int*)p),_semop_v,1); - semop(_si18n_waitQueue,_semop_p,1); /* wait for access */ - semop(*((int*)p),_semop_p,1); - _lockOwner = current_pid; - } - - semop(*((int*)p),_semop_v,1); - -} - -void _si18n_unlock(MutexPointer p) -{ - semop(*((int*)p),_semop_p,1); - - _lockOwner = 0; - semop(_si18n_waitQueue,_semop_v,1); /* signal one waiter */ - - semop(*((int*)p),_semop_v,1); - -} - -MutexImplementation _nlsMutexImplementation = -{ - &_si18n_semMutex, - _si18n_lock, - _si18n_unlock -}; - -MutexImplementation* _pMutexImplementation = &_nlsMutexImplementation; - - -void InitSynchronization(void) -{ - union _semarg val; - - val.val = 1; /* to avoid an aligment fault on certain platforms */ - - _si18n_semMutex = semget(IPC_PRIVATE,1,IPC_CREAT | 0600); - _si18n_waitQueue = semget(IPC_PRIVATE,1,IPC_CREAT | 0600); - - semctl(_si18n_semMutex,0,SETVAL,val); - semctl(_si18n_waitQueue,0,SETVAL,val); -} - -#else -#include "lock.h" -#include - -static CRITICAL_SECTION _csMutex; - -void _lock(MutexPointer p) -{ - EnterCriticalSection((CRITICAL_SECTION*)p); -} - -void _unlock(MutexPointer p) -{ - LeaveCriticalSection((CRITICAL_SECTION*)p); -} - -MutexImplementation _nlsMutexImplementation = -{ - &_csMutex, - _lock, - _unlock -}; - -MutexImplementation* _pMutexImplementation = &_nlsMutexImplementation; - -void InitSynchronization(void) -{ - InitializeCriticalSection(&_csMutex); -} - -#endif - -#endif - Index: gsadmserv.h =================================================================== RCS file: /cvs/dirsec/adminserver/lib/libsi18n/gsadmserv.h,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -u -r1.6 -r1.6.2.1 --- gsadmserv.h 18 Jul 2007 22:10:31 -0000 1.6 +++ gsadmserv.h 14 Jul 2008 20:58:47 -0000 1.6.2.1 @@ -26,13 +26,10 @@ #undef LIBRARY_NAME #include "../admserv/cgi-src40/dbtcgiadmin.h" #undef LIBRARY_NAME -#include "base/dbtbase.h" -#undef LIBRARY_NAME #include "libadmin/dbtlibadmin.h" -static RESOURCE_GLOBAL allxpstr[] = { +static res_RESOURCE_GLOBAL allxpstr[] = { admserv, - base, 0 }; --- coreres.c DELETED --- --- coreres.h DELETED --- --- getlang.c DELETED --- --- lock.h DELETED --- --- makstrdb.c DELETED --- --- propset.c DELETED --- --- propset.h DELETED --- --- reshash.c DELETED --- --- reshash.h DELETED --- --- txtfile.c DELETED --- --- txtfile.h DELETED --- From fedora-directory-commits at redhat.com Mon Jul 14 20:58:48 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 16:58:48 -0400 Subject: [Fedora-directory-commits] adminserver Makefile.am, 1.38, 1.38.2.1 aclocal.m4, 1.38.2.2, 1.38.2.3 configure, 1.42.2.2, 1.42.2.3 missing, 1.28.2.2, 1.28.2.3 install-sh, 1.28.2.2, 1.28.2.3 Makefile.in, 1.45.2.2, 1.45.2.3 depcomp, 1.28.2.2, 1.28.2.3 config.sub, 1.28.2.2, 1.28.2.3 config.guess, 1.28.2.2, 1.28.2.3 compile, 1.27.2.2, 1.27.2.3 Message-ID: <200807142059.m6EKxIXa009823@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9594/adminserver Modified Files: Tag: Directory_Server_8_0_Branch Makefile.am aclocal.m4 configure missing install-sh Makefile.in depcomp config.sub config.guess compile Log Message: remove obsolete code from 8.0 branch Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile.am,v retrieving revision 1.38 retrieving revision 1.38.2.1 diff -u -r1.38 -r1.38.2.1 --- Makefile.am 17 Dec 2007 20:10:04 -0000 1.38 +++ Makefile.am 14 Jul 2008 20:58:45 -0000 1.38.2.1 @@ -48,15 +48,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; \ + progdir=`dirname $$file` ; \ + progname=`basename $$progdir` ; \ + destdir="$(DESTDIR)$(propertydir)/$$progname" ; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$$destdir'" ; \ + test -d "$$destdir" || mkdir -p "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir/en.res" || exit 1 ; \ + cp "$$file" "$$destdir/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) @@ -93,8 +96,7 @@ libbase_a_SOURCES = lib/base/file.cpp lib/base/nscperror.c \ lib/base/system.cpp lib/base/nscputil.cpp -libsi18n_a_SOURCES = lib/libsi18n/coreres.c lib/libsi18n/getlang.c \ - lib/libsi18n/getstrprop.c lib/libsi18n/propset.c lib/libsi18n/reshash.c lib/libsi18n/txtfile.c +libsi18n_a_SOURCES = lib/libsi18n/getstrprop.c libadmin_a_SOURCES = lib/libadmin/cluster.c lib/libadmin/dllglue.c \ lib/libadmin/error.c lib/libadmin/form_get.c lib/libadmin/httpcon.c lib/libadmin/install.c \ @@ -147,7 +149,7 @@ init_SCRIPTS = wrappers/$(PACKAGE_NAME) -initconfig_SCRIPTS = admserv/cfgstuff/$(PACKAGE_NAME) +initconfig_DATA = admserv/cfgstuff/$(PACKAGE_NAME) ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \ admserv/schema/ldif/01nsroot.ldif.tmpl \ @@ -198,7 +200,7 @@ admserv/newinst/src/migrate-ds-admin.pl \ admserv/newinst/src/register-ds-admin.pl -perl_SCRIPTS = admserv/newinst/src/ASDialogs.pm \ +perl_DATA = admserv/newinst/src/ASDialogs.pm \ admserv/newinst/src/AdminUtil.pm \ admserv/newinst/src/AdminServer.pm \ admserv/newinst/src/ConfigDSDialogs.pm \ @@ -367,14 +369,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 + properties/admpw/root.res \ + properties/security/root.res properties/config/root.res \ + properties/stopsrv/root.res \ + properties/dsconfig/root.res properties/monreplication/root.res \ + properties/ugdsconfig/root.res properties/htmladmin/root.res \ + properties/restartsrv/root.res properties/viewdata/root.res \ + properties/sec-activate/root.res properties/viewlog/root.res \ + properties/cgicommon/root.res MOSTLYCLEANFILES += $(RESOURCE_BUNDLES_ROOT) # ICU resource file installation is handled specially @@ -392,8 +394,13 @@ # 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 $* $+ +properties/%/root.res : admserv/cgi-src40/%.properties + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ + +%/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: Makefile.in =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile.in,v retrieving revision 1.45.2.2 retrieving revision 1.45.2.3 diff -u -r1.45.2.2 -r1.45.2.3 --- Makefile.in 15 Apr 2008 16:47:31 -0000 1.45.2.2 +++ Makefile.in 14 Jul 2008 20:58:45 -0000 1.45.2.3 @@ -93,20 +93,18 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" \ "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" \ - "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" \ - "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" \ + "$(DESTDIR)$(initdir)" "$(DESTDIR)$(cmdbindir)" \ "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" \ "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" \ - "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" \ - "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" + "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(ldifdir)" \ + "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" \ + "$(DESTDIR)$(perldir)" "$(DESTDIR)$(propertydir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libds_admin_serv_la_LIBADD = am__objects_1 = lib/base/file.lo lib/base/nscperror.lo \ lib/base/system.lo lib/base/nscputil.lo -am__objects_2 = lib/libsi18n/coreres.lo lib/libsi18n/getlang.lo \ - lib/libsi18n/getstrprop.lo lib/libsi18n/propset.lo \ - lib/libsi18n/reshash.lo lib/libsi18n/txtfile.lo +am__objects_2 = lib/libsi18n/getstrprop.lo am__objects_3 = lib/libadmin/cluster.lo lib/libadmin/dllglue.lo \ lib/libadmin/error.lo lib/libadmin/form_get.lo \ lib/libadmin/httpcon.lo lib/libadmin/install.lo \ @@ -202,11 +200,9 @@ cgibinSCRIPT_INSTALL = $(INSTALL_SCRIPT) cmdbinSCRIPT_INSTALL = $(INSTALL_SCRIPT) initSCRIPT_INSTALL = $(INSTALL_SCRIPT) -initconfigSCRIPT_INSTALL = $(INSTALL_SCRIPT) nodist_cmdbinSCRIPT_INSTALL = $(INSTALL_SCRIPT) -perlSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(cgibin_SCRIPTS) $(cmdbin_SCRIPTS) $(init_SCRIPTS) \ - $(initconfig_SCRIPTS) $(nodist_cmdbin_SCRIPTS) $(perl_SCRIPTS) + $(nodist_cmdbin_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -258,13 +254,16 @@ dist_htmlDATA_INSTALL = $(INSTALL_DATA) dist_iconDATA_INSTALL = $(INSTALL_DATA) infDATA_INSTALL = $(INSTALL_DATA) +initconfigDATA_INSTALL = $(INSTALL_DATA) ldifDATA_INSTALL = $(INSTALL_DATA) nodist_configDATA_INSTALL = $(INSTALL_DATA) nodist_propertyDATA_INSTALL = $(INSTALL_DATA) +perlDATA_INSTALL = $(INSTALL_DATA) propertyDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_help_DATA) $(dist_html_DATA) $(dist_icon_DATA) \ - $(inf_DATA) $(ldif_DATA) $(nodist_config_DATA) \ - $(nodist_property_DATA) $(property_DATA) + $(inf_DATA) $(initconfig_DATA) $(ldif_DATA) \ + $(nodist_config_DATA) $(nodist_property_DATA) $(perl_DATA) \ + $(property_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = mod_admserv mod_restartd @@ -505,9 +504,7 @@ libbase_a_SOURCES = lib/base/file.cpp lib/base/nscperror.c \ lib/base/system.cpp lib/base/nscputil.cpp -libsi18n_a_SOURCES = lib/libsi18n/coreres.c lib/libsi18n/getlang.c \ - lib/libsi18n/getstrprop.c lib/libsi18n/propset.c lib/libsi18n/reshash.c lib/libsi18n/txtfile.c - +libsi18n_a_SOURCES = lib/libsi18n/getstrprop.c libadmin_a_SOURCES = lib/libadmin/cluster.c lib/libadmin/dllglue.c \ lib/libadmin/error.c lib/libadmin/form_get.c lib/libadmin/httpcon.c lib/libadmin/install.c \ lib/libadmin/referer.c lib/libadmin/template.c lib/libadmin/util.c @@ -542,7 +539,7 @@ @CXXLINK_REQUIRED_FALSE at MYLINK = $(LINK) @CXXLINK_REQUIRED_TRUE at MYLINK = $(CXXLINK) init_SCRIPTS = wrappers/$(PACKAGE_NAME) -initconfig_SCRIPTS = admserv/cfgstuff/$(PACKAGE_NAME) +initconfig_DATA = admserv/cfgstuff/$(PACKAGE_NAME) ldif_DATA = admserv/schema/ldif/00nsroot_backend.ldif.tmpl \ admserv/schema/ldif/01nsroot.ldif.tmpl \ admserv/schema/ldif/02globalpreferences.ldif.tmpl \ @@ -587,7 +584,7 @@ admserv/newinst/src/migrate-ds-admin.pl \ admserv/newinst/src/register-ds-admin.pl -perl_SCRIPTS = admserv/newinst/src/ASDialogs.pm \ +perl_DATA = admserv/newinst/src/ASDialogs.pm \ admserv/newinst/src/AdminUtil.pm \ admserv/newinst/src/AdminServer.pm \ admserv/newinst/src/ConfigDSDialogs.pm \ @@ -740,14 +737,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 + properties/admpw/root.res \ + properties/security/root.res properties/config/root.res \ + properties/stopsrv/root.res \ + properties/dsconfig/root.res properties/monreplication/root.res \ + properties/ugdsconfig/root.res properties/htmladmin/root.res \ + properties/restartsrv/root.res properties/viewdata/root.res \ + properties/sec-activate/root.res properties/viewlog/root.res \ + properties/cgicommon/root.res # ICU resource file installation is handled specially nodist_property_DATA = $(RESOURCE_BUNDLES_ROOT) @@ -1005,18 +1002,8 @@ lib/libsi18n/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) lib/libsi18n/$(DEPDIR) @: > lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/coreres.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/getlang.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) lib/libsi18n/getstrprop.lo: lib/libsi18n/$(am__dirstamp) \ lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/propset.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/reshash.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/txtfile.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) lib/libadmin/$(am__dirstamp): @$(mkdir_p) lib/libadmin @: > lib/libadmin/$(am__dirstamp) @@ -1290,25 +1277,6 @@ echo " rm -f '$(DESTDIR)$(initdir)/$$f'"; \ rm -f "$(DESTDIR)$(initdir)/$$f"; \ done -install-initconfigSCRIPTS: $(initconfig_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(initconfigdir)" || $(mkdir_p) "$(DESTDIR)$(initconfigdir)" - @list='$(initconfig_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(initconfigSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(initconfigdir)/$$f'"; \ - $(initconfigSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(initconfigdir)/$$f"; \ - else :; fi; \ - done - -uninstall-initconfigSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(initconfig_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(initconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(initconfigdir)/$$f"; \ - done install-nodist_cmdbinSCRIPTS: $(nodist_cmdbin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(cmdbindir)" || $(mkdir_p) "$(DESTDIR)$(cmdbindir)" @@ -1328,25 +1296,6 @@ echo " rm -f '$(DESTDIR)$(cmdbindir)/$$f'"; \ rm -f "$(DESTDIR)$(cmdbindir)/$$f"; \ done -install-perlSCRIPTS: $(perl_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(perldir)" || $(mkdir_p) "$(DESTDIR)$(perldir)" - @list='$(perl_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(perlSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(perldir)/$$f'"; \ - $(perlSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(perldir)/$$f"; \ - else :; fi; \ - done - -uninstall-perlSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(perl_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(perldir)/$$f'"; \ - rm -f "$(DESTDIR)$(perldir)/$$f"; \ - done mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -1412,18 +1361,8 @@ -rm -f lib/libdsa/libdsa_a-dsalib_tailf.$(OBJEXT) -rm -f lib/libdsa/libdsa_a-dsalib_updown.$(OBJEXT) -rm -f lib/libdsa/libdsa_a-dsalib_util.$(OBJEXT) - -rm -f lib/libsi18n/coreres.$(OBJEXT) - -rm -f lib/libsi18n/coreres.lo - -rm -f lib/libsi18n/getlang.$(OBJEXT) - -rm -f lib/libsi18n/getlang.lo -rm -f lib/libsi18n/getstrprop.$(OBJEXT) -rm -f lib/libsi18n/getstrprop.lo - -rm -f lib/libsi18n/propset.$(OBJEXT) - -rm -f lib/libsi18n/propset.lo - -rm -f lib/libsi18n/reshash.$(OBJEXT) - -rm -f lib/libsi18n/reshash.lo - -rm -f lib/libsi18n/txtfile.$(OBJEXT) - -rm -f lib/libsi18n/txtfile.lo distclean-compile: -rm -f *.tab.c @@ -1477,12 +1416,7 @@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Po at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Po at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Po at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/coreres.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/getlang.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/getstrprop.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/propset.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/reshash.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/txtfile.Plo at am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \ @@ -1864,6 +1798,23 @@ echo " rm -f '$(DESTDIR)$(infdir)/$$f'"; \ rm -f "$(DESTDIR)$(infdir)/$$f"; \ done +install-initconfigDATA: $(initconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(initconfigdir)" || $(mkdir_p) "$(DESTDIR)$(initconfigdir)" + @list='$(initconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(initconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(initconfigdir)/$$f'"; \ + $(initconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(initconfigdir)/$$f"; \ + done + +uninstall-initconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(initconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(initconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(initconfigdir)/$$f"; \ + done install-ldifDATA: $(ldif_DATA) @$(NORMAL_INSTALL) test -z "$(ldifdir)" || $(mkdir_p) "$(DESTDIR)$(ldifdir)" @@ -1915,6 +1866,23 @@ echo " rm -f '$(DESTDIR)$(propertydir)/$$f'"; \ rm -f "$(DESTDIR)$(propertydir)/$$f"; \ done +install-perlDATA: $(perl_DATA) + @$(NORMAL_INSTALL) + test -z "$(perldir)" || $(mkdir_p) "$(DESTDIR)$(perldir)" + @list='$(perl_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(perlDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(perldir)/$$f'"; \ + $(perlDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(perldir)/$$f"; \ + done + +uninstall-perlDATA: + @$(NORMAL_UNINSTALL) + @list='$(perl_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(perldir)/$$f'"; \ + rm -f "$(DESTDIR)$(perldir)/$$f"; \ + done install-propertyDATA: $(property_DATA) @$(NORMAL_INSTALL) test -z "$(propertydir)" || $(mkdir_p) "$(DESTDIR)$(propertydir)" @@ -2213,7 +2181,7 @@ $(DATA) config.h installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)"; do \ + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cgibindir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(cmdbindir)" "$(DESTDIR)$(helpdir)" "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(icondir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(ldifdir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(propertydir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive @@ -2278,9 +2246,9 @@ install-data-am: install-cgibinPROGRAMS install-cgibinSCRIPTS \ install-cmdbinSCRIPTS install-dist_helpDATA \ install-dist_htmlDATA install-dist_iconDATA install-infDATA \ - install-initSCRIPTS install-initconfigSCRIPTS install-ldifDATA \ + install-initSCRIPTS install-initconfigDATA install-ldifDATA \ install-nodist_cmdbinSCRIPTS install-nodist_configDATA \ - install-nodist_propertyDATA install-perlSCRIPTS \ + install-nodist_propertyDATA install-perlDATA \ install-propertyDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook @@ -2317,10 +2285,10 @@ uninstall-cmdbinSCRIPTS uninstall-dist_helpDATA \ uninstall-dist_htmlDATA uninstall-dist_iconDATA \ uninstall-infDATA uninstall-info-am uninstall-initSCRIPTS \ - uninstall-initconfigSCRIPTS uninstall-ldifDATA \ + uninstall-initconfigDATA uninstall-ldifDATA \ uninstall-libLTLIBRARIES uninstall-nodist_cmdbinSCRIPTS \ uninstall-nodist_configDATA uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA + uninstall-perlDATA uninstall-propertyDATA uninstall-info: uninstall-info-recursive @@ -2337,10 +2305,10 @@ install-data-am install-data-hook install-dist_helpDATA \ install-dist_htmlDATA install-dist_iconDATA install-exec \ install-exec-am install-infDATA install-info install-info-am \ - install-initSCRIPTS install-initconfigSCRIPTS install-ldifDATA \ + install-initSCRIPTS install-initconfigDATA install-ldifDATA \ install-libLTLIBRARIES install-man \ install-nodist_cmdbinSCRIPTS install-nodist_configDATA \ - install-nodist_propertyDATA install-perlSCRIPTS \ + install-nodist_propertyDATA install-perlDATA \ install-propertyDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ @@ -2351,10 +2319,10 @@ uninstall-cmdbinSCRIPTS uninstall-dist_helpDATA \ uninstall-dist_htmlDATA uninstall-dist_iconDATA \ uninstall-infDATA uninstall-info-am uninstall-initSCRIPTS \ - uninstall-initconfigSCRIPTS uninstall-ldifDATA \ + uninstall-initconfigDATA uninstall-ldifDATA \ uninstall-libLTLIBRARIES uninstall-nodist_cmdbinSCRIPTS \ uninstall-nodist_configDATA uninstall-nodist_propertyDATA \ - uninstall-perlSCRIPTS uninstall-propertyDATA + uninstall-perlDATA uninstall-propertyDATA define NL \\n @@ -2362,15 +2330,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 + progdir=`dirname $$file` ; \ + progname=`basename $$progdir` ; \ + destdir="$(DESTDIR)$(propertydir)/$$progname" ; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$$destdir'" ; \ + test -d "$$destdir" || mkdir -p "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir/en.res" || exit 1 ; \ + cp "$$file" "$$destdir/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 @@ -2378,8 +2349,13 @@ # 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 $* $+ +properties/%/root.res : admserv/cgi-src40/%.properties + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ + +%/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 Jul 14 23:16:51 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 19:16:51 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSCreate.pm.in, 1.12, 1.13 Message-ID: <200807142316.m6ENGpOg013511@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13491/ldapserver/ldap/admin/src/scripts Modified Files: DSCreate.pm.in Log Message: Resolves: bug 435774 Bug Description: Unhandled error during setup: Could not import LDIF file Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: This doesn't allow you to re-prompt for the file, but this will at least cause setup to output a sensible error message if it detects that the given LDIF file is not readable. Platforms tested: Fedora 8, Fedora 9 Flag Day: no Doc impact: no Index: DSCreate.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- DSCreate.pm.in 14 Jul 2008 19:37:15 -0000 1.12 +++ DSCreate.pm.in 14 Jul 2008 23:16:47 -0000 1.13 @@ -467,8 +467,11 @@ if ($ldiffile =~ /none/i) { debug(1, "No ldif file or org entries specified - no initial database will be created\n"); return (); - } elsif ($ldiffile && -f $ldiffile) { + } elsif ($ldiffile && ($ldiffile !~ /suggest/i)) { debug(1, "Loading initial ldif file $ldiffile\n"); + if (! -r $ldiffile) { + return ('error_opening_init_ldif', $ldiffile); + } } elsif (($inf->{slapd}->{Suffix} =~ /^(.*?)=/) && $suffixTable{$1}) { my @errs; my $template = $inf->{General}->{prefix} . $suffixTable{$1}; From fedora-directory-commits at redhat.com Mon Jul 14 23:20:25 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 19:20:25 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts setup-ds.res.in, 1.12, 1.13 Message-ID: <200807142320.m6ENKPbX013778@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13757/ldapserver/ldap/admin/src/scripts Modified Files: setup-ds.res.in Log Message: Resolves: bug 440899 Bug Description: setup-ds.pl password prompt loops in Confirm prompt Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: Just make sure the prompt tells the user that they can hit Control-B Enter at any time to go back if they need to re-enter the password. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no Index: setup-ds.res.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/setup-ds.res.in,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- setup-ds.res.in 21 Nov 2007 20:27:38 -0000 1.12 +++ setup-ds.res.in 14 Jul 2008 23:20:23 -0000 1.13 @@ -68,7 +68,7 @@ dialog_dssuffix_error = The suffix '%s' is not a valid DN. Please choose another one.\n\n # ----------- DS Root DN and password Dialog Resource ---------------- -dialog_dsrootdn_text = Certain directory server operations require an administrative user.\nThis user is referred to as the Directory Manager and typically has a\nbind Distinguished Name (DN) of cn=Directory Manager.\nYou will also be prompted for the password for this user. The password must\nbe at least 8 characters long, and contain no spaces.\n\n +dialog_dsrootdn_text = Certain directory server operations require an administrative user.\nThis user is referred to as the Directory Manager and typically has a\nbind Distinguished Name (DN) of cn=Directory Manager.\nYou will also be prompted for the password for this user. The password must\nbe at least 8 characters long, and contain no spaces.\nPress Control-B then Enter to back up and start over.\n\n dialog_dsrootdn_prompt = Directory Manager DN dialog_dsrootdn_error = The input '%s' is not a valid DN. Please choose another one.\n\n dialog_dsrootpw_prompt1 = Password @@ -125,3 +125,5 @@ error_server_already_exists = Error: the server already exists at '%s'\ Please remove it first if you really want to recreate it,\ or use a different ServerIdentifier to create another instance.\n +error_opening_init_ldif = Could not open the initial LDIF file '%s'.\ +The file was not found or could not be read.\n \ No newline at end of file From fedora-directory-commits at redhat.com Mon Jul 14 23:25:44 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 19:25:44 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts Util.pm.in, 1.16, 1.17 Message-ID: <200807142325.m6ENPigY014375@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/admin/src/scripts In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14358/ldapserver/ldap/admin/src/scripts Modified Files: Util.pm.in Log Message: Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: Set SO_REUSEADDR to make sure the port is really available. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no Index: Util.pm.in =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/Util.pm.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Util.pm.in 17 Dec 2007 23:49:50 -0000 1.16 +++ Util.pm.in 14 Jul 2008 23:25:41 -0000 1.17 @@ -78,6 +78,7 @@ my $proto = getprotobyname('tcp'); my $rc = socket(SOCK, PF_INET, SOCK_STREAM, $proto); if ($rc == 1) { + setsockopt(SOCK, SOL_SOCKET, SO_REUSEADDR, 1); $rc = bind(SOCK, sockaddr_in($port, INADDR_ANY)); } close(SOCK); From fedora-directory-commits at redhat.com Mon Jul 14 23:31:35 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 19:31:35 -0400 Subject: [Fedora-directory-commits] ldapserver/ldap/servers/plugins/bitwise bitwise.c, 1.2, 1.3 Message-ID: <200807142331.m6ENVZds015705@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/bitwise In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15672/ldapserver/ldap/servers/plugins/bitwise Modified Files: bitwise.c Log Message: Resolves: bug 428765 Bug Description: leak in bitwise plugin Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The bitwise plugin should first check to make sure the requested OID is one that it can handle. Platforms tested: RHEL5, Fedora 8, Fedora 9 Flag Day: no Doc impact: no Index: bitwise.c =================================================================== RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/bitwise/bitwise.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- bitwise.c 18 Oct 2007 00:08:28 -0000 1.2 +++ bitwise.c 14 Jul 2008 23:31:33 -0000 1.3 @@ -167,14 +167,18 @@ !slapi_pblock_get (pb, SLAPI_PLUGIN_MR_TYPE, &mrTYPE) && mrTYPE != NULL && !slapi_pblock_get (pb, SLAPI_PLUGIN_MR_VALUE, &mrVALUE) && mrVALUE != NULL) { - struct bitwise_match_cb *bmc = new_bitwise_match_cb(mrTYPE, mrVALUE); - slapi_pblock_set (pb, SLAPI_PLUGIN_OBJECT, bmc); - slapi_pblock_set (pb, SLAPI_PLUGIN_DESTROY_FN, (void*)bitwise_filter_destroy); + struct bitwise_match_cb *bmc = NULL; if (strcmp(mrOID, "1.2.840.113556.1.4.803") == 0) { slapi_pblock_set (pb, SLAPI_PLUGIN_MR_FILTER_MATCH_FN, (void*)bitwise_filter_match_and); } else if (strcmp(mrOID, "1.2.840.113556.1.4.804") == 0) { slapi_pblock_set (pb, SLAPI_PLUGIN_MR_FILTER_MATCH_FN, (void*)bitwise_filter_match_or); + } else { /* this oid not handled by this plugin */ + LDAPDebug (LDAP_DEBUG_FILTER, "=> bitwise_filter_create OID (%s) not handled\n", mrOID, 0, 0); + return rc; } + bmc = new_bitwise_match_cb(mrTYPE, mrVALUE); + slapi_pblock_set (pb, SLAPI_PLUGIN_OBJECT, bmc); + slapi_pblock_set (pb, SLAPI_PLUGIN_DESTROY_FN, (void*)bitwise_filter_destroy); rc = LDAP_SUCCESS; } else { LDAPDebug (LDAP_DEBUG_FILTER, "=> bitwise_filter_create missing parameter(s)\n", 0, 0, 0); @@ -190,9 +194,6 @@ bitwise_init (Slapi_PBlock* pb) { int rc; - int argc; - char** argv; - char* cfgpath; rc = slapi_pblock_set (pb, SLAPI_PLUGIN_MR_FILTER_CREATE_FN, (void*)bitwise_filter_create); if ( rc == 0 ) { From fedora-directory-commits at redhat.com Mon Jul 14 23:51:46 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Mon, 14 Jul 2008 19:51:46 -0400 Subject: [Fedora-directory-commits] adminserver Makefile.am, 1.40, 1.41 configure.ac, 1.26, 1.27 aclocal.m4, 1.40, 1.41 configure, 1.44, 1.45 missing, 1.30, 1.31 install-sh, 1.30, 1.31 Makefile.in, 1.47, 1.48 depcomp, 1.30, 1.31 config.sub, 1.30, 1.31 config.guess, 1.30, 1.31 compile, 1.29, 1.30 Message-ID: <200807142351.m6ENpkfd019025@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/adminserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18946/adminserver Modified Files: Makefile.am configure.ac aclocal.m4 configure missing install-sh Makefile.in depcomp config.sub config.guess compile Log Message: bump version to 1.1.6 Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/adminserver/Makefile.am,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- Makefile.am 9 Jun 2008 15:57:12 -0000 1.40 +++ Makefile.am 14 Jul 2008 23:51:43 -0000 1.41 @@ -48,19 +48,15 @@ install-data-hook: @for file in $(RESOURCE_BUNDLES_ROOT) ; do \ - basefile=`basename $$file` ; \ - 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; \ + progdir=`dirname $$file` ; \ + progname=`basename $$progdir` ; \ + destdir="$(DESTDIR)$(propertydir)/$$progname" ; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$$destdir'" ; \ + test -d "$$destdir" || mkdir -p "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir/en.res" || exit 1 ; \ + cp "$$file" "$$destdir/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) @@ -97,8 +93,7 @@ libbase_a_SOURCES = lib/base/file.cpp lib/base/nscperror.c \ lib/base/system.cpp lib/base/nscputil.cpp -libsi18n_a_SOURCES = lib/libsi18n/coreres.c lib/libsi18n/getlang.c \ - lib/libsi18n/getstrprop.c lib/libsi18n/propset.c lib/libsi18n/reshash.c lib/libsi18n/txtfile.c +libsi18n_a_SOURCES = lib/libsi18n/getstrprop.c libadmin_a_SOURCES = lib/libadmin/cluster.c lib/libadmin/dllglue.c \ lib/libadmin/error.c lib/libadmin/form_get.c lib/libadmin/httpcon.c lib/libadmin/install.c \ @@ -371,14 +366,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 + properties/admpw/root.res \ + properties/security/root.res properties/config/root.res \ + properties/stopsrv/root.res \ + properties/dsconfig/root.res properties/monreplication/root.res \ + properties/ugdsconfig/root.res properties/htmladmin/root.res \ + properties/restartsrv/root.res properties/viewdata/root.res \ + properties/sec-activate/root.res properties/viewlog/root.res \ + properties/cgicommon/root.res MOSTLYCLEANFILES += $(RESOURCE_BUNDLES_ROOT) # ICU resource file installation is handled specially @@ -396,6 +391,10 @@ # German resource bundles (for the German localization in the future) #RESOURCE_BUNDLES_DE = foo_de.res +properties/%/root.res : admserv/cgi-src40/%.properties + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ + %/root.res : %.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ Index: configure.ac =================================================================== RCS file: /cvs/dirsec/adminserver/configure.ac,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- configure.ac 9 Jun 2008 15:57:12 -0000 1.26 +++ configure.ac 14 Jul 2008 23:51:43 -0000 1.27 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([dirsrv-admin], [1.1.5], [http://bugzilla.redhat.com/]) +AC_INIT([dirsrv-admin], [1.1.6], [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.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- configure 9 Jun 2008 15:57:12 -0000 1.44 +++ configure 14 Jul 2008 23:51:43 -0000 1.45 @@ -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.5. +# Generated by GNU Autoconf 2.59 for dirsrv-admin 1.1.6. # # Report bugs to . # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='dirsrv-admin' PACKAGE_TARNAME='dirsrv-admin' -PACKAGE_VERSION='1.1.5' -PACKAGE_STRING='dirsrv-admin 1.1.5' +PACKAGE_VERSION='1.1.6' +PACKAGE_STRING='dirsrv-admin 1.1.6' 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.5 to adapt to many kinds of systems. +\`configure' configures dirsrv-admin 1.1.6 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.5:";; + short | recursive ) echo "Configuration of dirsrv-admin 1.1.6:";; 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.5 +dirsrv-admin configure 1.1.6 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.5, which was +It was created by dirsrv-admin $as_me 1.1.6, 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.5' + VERSION='1.1.6' cat >>confdefs.h <<_ACEOF @@ -25613,7 +25613,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by dirsrv-admin $as_me 1.1.5, which was +This file was extended by dirsrv-admin $as_me 1.1.6, 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.5 +dirsrv-admin config.status 1.1.6 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.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- Makefile.in 9 Jun 2008 15:57:12 -0000 1.47 +++ Makefile.in 14 Jul 2008 23:51:43 -0000 1.48 @@ -104,9 +104,7 @@ libds_admin_serv_la_LIBADD = am__objects_1 = lib/base/file.lo lib/base/nscperror.lo \ lib/base/system.lo lib/base/nscputil.lo -am__objects_2 = lib/libsi18n/coreres.lo lib/libsi18n/getlang.lo \ - lib/libsi18n/getstrprop.lo lib/libsi18n/propset.lo \ - lib/libsi18n/reshash.lo lib/libsi18n/txtfile.lo +am__objects_2 = lib/libsi18n/getstrprop.lo am__objects_3 = lib/libadmin/cluster.lo lib/libadmin/dllglue.lo \ lib/libadmin/error.lo lib/libadmin/form_get.lo \ lib/libadmin/httpcon.lo lib/libadmin/install.lo \ @@ -506,9 +504,7 @@ libbase_a_SOURCES = lib/base/file.cpp lib/base/nscperror.c \ lib/base/system.cpp lib/base/nscputil.cpp -libsi18n_a_SOURCES = lib/libsi18n/coreres.c lib/libsi18n/getlang.c \ - lib/libsi18n/getstrprop.c lib/libsi18n/propset.c lib/libsi18n/reshash.c lib/libsi18n/txtfile.c - +libsi18n_a_SOURCES = lib/libsi18n/getstrprop.c libadmin_a_SOURCES = lib/libadmin/cluster.c lib/libadmin/dllglue.c \ lib/libadmin/error.c lib/libadmin/form_get.c lib/libadmin/httpcon.c lib/libadmin/install.c \ lib/libadmin/referer.c lib/libadmin/template.c lib/libadmin/util.c @@ -741,14 +737,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 + properties/admpw/root.res \ + properties/security/root.res properties/config/root.res \ + properties/stopsrv/root.res \ + properties/dsconfig/root.res properties/monreplication/root.res \ + properties/ugdsconfig/root.res properties/htmladmin/root.res \ + properties/restartsrv/root.res properties/viewdata/root.res \ + properties/sec-activate/root.res properties/viewlog/root.res \ + properties/cgicommon/root.res # ICU resource file installation is handled specially nodist_property_DATA = $(RESOURCE_BUNDLES_ROOT) @@ -1006,18 +1002,8 @@ lib/libsi18n/$(DEPDIR)/$(am__dirstamp): @$(mkdir_p) lib/libsi18n/$(DEPDIR) @: > lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/coreres.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/getlang.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) lib/libsi18n/getstrprop.lo: lib/libsi18n/$(am__dirstamp) \ lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/propset.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/reshash.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) -lib/libsi18n/txtfile.lo: lib/libsi18n/$(am__dirstamp) \ - lib/libsi18n/$(DEPDIR)/$(am__dirstamp) lib/libadmin/$(am__dirstamp): @$(mkdir_p) lib/libadmin @: > lib/libadmin/$(am__dirstamp) @@ -1375,18 +1361,8 @@ -rm -f lib/libdsa/libdsa_a-dsalib_tailf.$(OBJEXT) -rm -f lib/libdsa/libdsa_a-dsalib_updown.$(OBJEXT) -rm -f lib/libdsa/libdsa_a-dsalib_util.$(OBJEXT) - -rm -f lib/libsi18n/coreres.$(OBJEXT) - -rm -f lib/libsi18n/coreres.lo - -rm -f lib/libsi18n/getlang.$(OBJEXT) - -rm -f lib/libsi18n/getlang.lo -rm -f lib/libsi18n/getstrprop.$(OBJEXT) -rm -f lib/libsi18n/getstrprop.lo - -rm -f lib/libsi18n/propset.$(OBJEXT) - -rm -f lib/libsi18n/propset.lo - -rm -f lib/libsi18n/reshash.$(OBJEXT) - -rm -f lib/libsi18n/reshash.lo - -rm -f lib/libsi18n/txtfile.$(OBJEXT) - -rm -f lib/libsi18n/txtfile.lo distclean-compile: -rm -f *.tab.c @@ -1440,12 +1416,7 @@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_tailf.Po at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_updown.Po at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libdsa/$(DEPDIR)/libdsa_a-dsalib_util.Po at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/coreres.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/getlang.Plo at am__quote@ @AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/getstrprop.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/propset.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/reshash.Plo at am__quote@ - at AMDEP_TRUE@@am__include@ @am__quote at lib/libsi18n/$(DEPDIR)/txtfile.Plo at am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \ @@ -2359,19 +2330,15 @@ install-data-hook: @for file in $(RESOURCE_BUNDLES_ROOT) ; do \ - basefile=`basename $$file` ; \ - 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 + progdir=`dirname $$file` ; \ + progname=`basename $$progdir` ; \ + destdir="$(DESTDIR)$(propertydir)/$$progname" ; \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) '$$file' '$$destdir'" ; \ + test -d "$$destdir" || mkdir -p "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir" || exit 1 ; \ + cp "$$file" "$$destdir/en.res" || exit 1 ; \ + cp "$$file" "$$destdir/en_US.res" || exit 1 ; \ + done # French resource bundles (for the French localization in the future) #RESOURCE_BUNDLES_FR = foo_fr.res @@ -2379,6 +2346,10 @@ # German resource bundles (for the German localization in the future) #RESOURCE_BUNDLES_DE = foo_de.res +properties/%/root.res : admserv/cgi-src40/%.properties + if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi + $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ + %/root.res : %.properties if [ ! -d $(dir $@) ] ; then mkdir -p $(dir $@) ; fi $(ICU_GENRB) -s. -d$(dir $@) --encoding 8859-1 $* $+ From fedora-directory-commits at redhat.com Tue Jul 15 15:50:57 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 15 Jul 2008 11:50:57 -0400 Subject: [Fedora-directory-commits] ldapserver Makefile.am, 1.71, 1.72 configure.ac, 1.48, 1.49 aclocal.m4, 1.69, 1.70 configure, 1.86, 1.87 Makefile.in, 1.91, 1.92 Message-ID: <200807151550.m6FFovxT021072@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20958/ldapserver Modified Files: Makefile.am configure.ac aclocal.m4 configure Makefile.in Log Message: Resolves: bug 447614 Bug Description: Lack of manpages Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: This adds man pages for the command line utilities. The configure.ac diffs were a little bit tricky - apparently, mandir is not set to a correct default value, so we have to make sure we set a reasonable default value it if the user has not set it (e.g. rpmbuild will override it with --mandir=something). Platforms tested: Fedora 8, Fedora 9 Flag Day: no Doc impact: no Index: Makefile.am =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.am,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- Makefile.am 2 Jul 2008 16:14:38 -0000 1.71 +++ Makefile.am 15 Jul 2008 15:50:55 -0000 1.72 @@ -39,7 +39,7 @@ # Linker Flags #------------------------ NSPR_LINK = @nspr_lib@ -lplc4 -lplds4 -lnspr4 -NSS_LINK = @nss_lib@ -lssl3 -lnss3 -lsoftokn3 +NSS_LINK = @nss_lib@ -lssl3 -lnss3 LDAPSDK_LINK = @ldapsdk_lib@ -lssldap60 -lprldap60 -lldap60 -lldif60 DB_LINK = @db_lib@ -ldb- at db_libver@ SASL_LINK = @sasl_lib@ -lsasl2 @@ -59,7 +59,32 @@ #------------------------ BUILT_SOURCES = dirver.h dberrstrs.h -CLEANFILES = dirver.h dberrstrs.h ns-slapd.properties +CLEANFILES = dirver.h dberrstrs.h ns-slapd.properties \ + ldap/admin/src/scripts/dscreate.map \ + ldap/admin/src/scripts/DSCreate.pm ldap/admin/src/scripts/DSMigration.pm \ + ldap/admin/src/scripts/dsorgentries.map ldap/admin/src/scripts/migrate-ds.pl \ + ldap/admin/src/scripts/Migration.pm ldap/admin/src/scripts/SetupDialogs.pm \ + ldap/admin/src/scripts/setup-ds.pl ldap/admin/src/scripts/setup-ds.res \ + ldap/admin/src/scripts/Setup.pm ldap/admin/src/scripts/template-bak2db \ + ldap/admin/src/scripts/template-bak2db.pl ldap/admin/src/scripts/template-db2bak \ + ldap/admin/src/scripts/template-db2bak.pl ldap/admin/src/scripts/template-db2index \ + ldap/admin/src/scripts/template-db2index.pl ldap/admin/src/scripts/template-db2ldif \ + ldap/admin/src/scripts/template-db2ldif.pl ldap/admin/src/scripts/template-dbverify \ + ldap/admin/src/scripts/template-ldif2db ldap/admin/src/scripts/template-ldif2db.pl \ + ldap/admin/src/scripts/template-ldif2ldap ldap/admin/src/scripts/template-monitor \ + ldap/admin/src/scripts/template-ns-accountstatus.pl ldap/admin/src/scripts/template-ns-activate.pl \ + ldap/admin/src/scripts/template-ns-inactivate.pl ldap/admin/src/scripts/template-ns-newpwpolicy.pl \ + ldap/admin/src/scripts/template-restart-slapd ldap/admin/src/scripts/template-restoreconfig \ + ldap/admin/src/scripts/template-saveconfig ldap/admin/src/scripts/template-start-slapd \ + ldap/admin/src/scripts/template-stop-slapd ldap/admin/src/scripts/template-suffix2instance \ + ldap/admin/src/scripts/template-upgradedb ldap/admin/src/scripts/template-verify-db.pl \ + ldap/admin/src/scripts/template-vlvindex ldap/admin/src/scripts/Util.pm \ + ldap/ldif/template-baseacis.ldif ldap/ldif/template-bitwise.ldif ldap/ldif/template-country.ldif \ + ldap/ldif/template-dnaplugin.ldif ldap/ldif/template-domain.ldif ldap/ldif/template-dse.ldif \ + ldap/ldif/template-ldapi-autobind.ldif ldap/ldif/template-ldapi-default.ldif \ + ldap/ldif/template-ldapi.ldif ldap/ldif/template-locality.ldif ldap/ldif/template-org.ldif \ + ldap/ldif/template-orgunit.ldif ldap/ldif/template-pampta.ldif ldap/ldif/template-sasl.ldif \ + ldap/ldif/template-state.ldif ldap/ldif/template-suffix-db.ldif dirver.h: Makefile perl $(srcdir)/dirver.pl -v "$(VERSION)" -o dirver.h @@ -262,6 +287,27 @@ ldap/servers/snmp/RFC1155-SMI.txt \ ldap/servers/snmp/SNMPv2-SMI.txt +#------------------------ +# man pages +#------------------------ +dist_man_MANS = man/man1/dbscan.1 \ + man/man1/cl-dump.1 \ + man/man1/dbgen.pl.1 \ + man/man1/dsktune.1 \ + man/man1/infadd.1 \ + man/man1/ldap-agent.1 \ + man/man1/ldclt.1 \ + man/man1/ldif.1 \ + man/man1/logconv.pl.1 \ + man/man1/migratecred.1 \ + man/man1/mmldif.1 \ + man/man1/pwdhash.1 \ + man/man1/repl-monitor.1 \ + man/man1/rsearch.1 \ + man/man8/migrate-ds.pl.8 \ + man/man8/ns-slapd.8 \ + man/man8/setup-ds.pl.8 + #//////////////////////////////////////////////////////////////// # # Server Strings Index: configure.ac =================================================================== RCS file: /cvs/dirsec/ldapserver/configure.ac,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- configure.ac 30 May 2008 15:38:59 -0000 1.48 +++ configure.ac 15 Jul 2008 15:50:55 -0000 1.49 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) # This version is the version returned by ns-slapd -v -AC_INIT([dirsrv], [1.1.1], [http://bugzilla.redhat.com/]) +AC_INIT([dirsrv], [1.1.2], [http://bugzilla.redhat.com/]) # AC_CONFIG_HEADER must be called right after AC_INIT. AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) @@ -214,6 +214,12 @@ perldir=/$PACKAGE_NAME/perl fi +# if mandir is the default value, override it +# otherwise, the user must have set it - just use it +if test X"$mandir" = X'${prefix}/man' ; then + mandir='$(datadir)/man' +fi + # Shared paths for all layouts # relative to sysconfdir configdir=/$PACKAGE_NAME/config @@ -234,6 +240,7 @@ AC_SUBST(perldir) AC_SUBST(infdir) AC_SUBST(mibdir) +AC_SUBST(mandir) AC_SUBST(defaultuser) AC_SUBST(defaultgroup) Index: aclocal.m4 =================================================================== RCS file: /cvs/dirsec/ldapserver/aclocal.m4,v retrieving revision 1.69 retrieving revision 1.70 diff -u -r1.69 -r1.70 --- aclocal.m4 2 Jul 2008 16:14:39 -0000 1.69 +++ aclocal.m4 15 Jul 2008 15:50:55 -0000 1.70 @@ -1578,10 +1578,27 @@ # 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)); 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -4288,6 +4305,9 @@ # 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 @@ -4421,11 +4441,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) +predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) +postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -4437,7 +4457,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) +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"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -4517,7 +4537,7 @@ link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +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"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -6353,6 +6373,7 @@ 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,6 +6406,7 @@ 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.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- configure 2 Jul 2008 16:14:39 -0000 1.86 +++ configure 15 Jul 2008 15:50:55 -0000 1.87 @@ -1,6 +1,6 @@ #! /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.59 for dirsrv 1.1.2. # # Report bugs to . # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='dirsrv' PACKAGE_TARNAME='dirsrv' -PACKAGE_VERSION='1.1.1' -PACKAGE_STRING='dirsrv 1.1.1' +PACKAGE_VERSION='1.1.2' +PACKAGE_STRING='dirsrv 1.1.2' PACKAGE_BUGREPORT='http://bugzilla.redhat.com/' # Factoring default headers for most tests. @@ -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 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_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_files='' # Initialize some variables set by options. @@ -954,7 +954,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 1.1.1 to adapt to many kinds of systems. +\`configure' configures dirsrv 1.1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1020,7 +1020,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dirsrv 1.1.1:";; + short | recursive ) echo "Configuration of dirsrv 1.1.2:";; esac cat <<\_ACEOF @@ -1203,7 +1203,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dirsrv configure 1.1.1 +dirsrv configure 1.1.2 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1217,7 +1217,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 $as_me 1.1.1, which was +It was created by dirsrv $as_me 1.1.2, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1863,7 +1863,7 @@ # Define the identity of the package. PACKAGE='dirsrv' - VERSION='1.1.1' + VERSION='1.1.2' cat >>confdefs.h <<_ACEOF @@ -3838,6 +3838,7 @@ 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 @@ -3872,6 +3873,7 @@ fi SED=$lt_cv_path_SED + echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 @@ -4312,7 +4314,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4315 "configure"' > conftest.$ac_ext + echo '#line 4317 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5447,7 +5449,7 @@ # Provide some information about the compiler. -echo "$as_me:5450:" \ +echo "$as_me:5452:" \ "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 @@ -6510,11 +6512,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:6513: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6515: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6517: \$? = $ac_status" >&5 + echo "$as_me:6519: \$? = $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. @@ -6778,11 +6780,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:6781: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6783: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6785: \$? = $ac_status" >&5 + echo "$as_me:6787: \$? = $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. @@ -6882,11 +6884,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:6885: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6887: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6889: \$? = $ac_status" >&5 + echo "$as_me:6891: \$? = $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 @@ -8347,10 +8349,31 @@ # 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)); 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -9227,7 +9250,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:11696: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11674: \$? = $ac_status" >&5 + echo "$as_me:11700: \$? = $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. @@ -11771,11 +11797,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:11774: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11800: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11778: \$? = $ac_status" >&5 + echo "$as_me:11804: \$? = $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 @@ -12303,10 +12329,31 @@ # 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)); 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -12690,6 +12737,9 @@ # 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 @@ -12823,11 +12873,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_CXX +predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_CXX +postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -12839,7 +12889,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_CXX +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"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -12919,7 +12969,7 @@ link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +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"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -13341,11 +13391,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:13344: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13394: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13348: \$? = $ac_status" >&5 + echo "$as_me:13398: \$? = $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. @@ -13445,11 +13495,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:13448: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13498: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13452: \$? = $ac_status" >&5 + echo "$as_me:13502: \$? = $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 @@ -14890,10 +14940,31 @@ # 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)); 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15277,6 +15348,9 @@ # 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 @@ -15410,11 +15484,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_F77 +predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_F77 +postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -15426,7 +15500,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_F77 +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"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -15506,7 +15580,7 @@ link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +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"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -15648,11 +15722,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:15651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15725: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15655: \$? = $ac_status" >&5 + echo "$as_me:15729: \$? = $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. @@ -15916,11 +15990,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:15919: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15993: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15923: \$? = $ac_status" >&5 + echo "$as_me:15997: \$? = $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. @@ -16020,11 +16094,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:16023: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16097: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16027: \$? = $ac_status" >&5 + echo "$as_me:16101: \$? = $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 @@ -17485,10 +17559,31 @@ # 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)); 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -17872,6 +17967,9 @@ # 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 @@ -18005,11 +18103,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_GCJ +predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_GCJ +postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18021,7 +18119,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ +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"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18101,7 +18199,7 @@ link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +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"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -18353,6 +18451,9 @@ # 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 @@ -18486,11 +18587,11 @@ # Dependencies to place before the objects being linked to create a # shared library. -predep_objects=$lt_predep_objects_RC +predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects=$lt_postdep_objects_RC +postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. @@ -18502,7 +18603,7 @@ # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path=$lt_compiler_lib_search_path_RC +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"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18582,7 +18683,7 @@ link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec +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"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec @@ -23126,6 +23227,12 @@ perldir=/$PACKAGE_NAME/perl fi +# if mandir is the default value, override it +# otherwise, the user must have set it - just use it +if test X"$mandir" = X'${prefix}/man' ; then + mandir='$(datadir)/man' +fi + # Shared paths for all layouts # relative to sysconfdir configdir=/$PACKAGE_NAME/config @@ -23150,6 +23257,7 @@ + # check for --with-instconfigdir echo "$as_me:$LINENO: checking for --with-instconfigdir" >&5 echo $ECHO_N "checking for --with-instconfigdir... $ECHO_C" >&6 @@ -25687,7 +25795,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by dirsrv $as_me 1.1.1, which was +This file was extended by dirsrv $as_me 1.1.2, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25750,7 +25858,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -dirsrv config.status 1.1.1 +dirsrv config.status 1.1.2 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -26003,6 +26111,7 @@ 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: Makefile.in =================================================================== RCS file: /cvs/dirsec/ldapserver/Makefile.in,v retrieving revision 1.91 retrieving revision 1.92 diff -u -r1.91 -r1.92 --- Makefile.in 2 Jul 2008 16:14:38 -0000 1.91 +++ Makefile.in 15 Jul 2008 15:50:55 -0000 1.92 @@ -47,10 +47,10 @@ pwdhash-bin$(EXEEXT) rsearch-bin$(EXEEXT) noinst_PROGRAMS = makstrdb$(EXEEXT) @SOLARIS_TRUE at am__append_1 = ldap/servers/slapd/tools/ldclt/opCheck.c -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 +DIST_COMMON = $(am__configure_deps) $(dist_man_MANS) \ + $(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 \ @@ -95,7 +95,8 @@ "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" \ "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" \ - "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(configdir)" \ + "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(man1dir)" \ + "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(configdir)" \ "$(DESTDIR)$(infdir)" "$(DESTDIR)$(mibdir)" \ "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" \ "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)" @@ -775,6 +776,10 @@ $(makstrdb_SOURCES) $(migratecred_bin_SOURCES) \ $(mmldif_bin_SOURCES) $(am__ns_slapd_SOURCES_DIST) \ $(pwdhash_bin_SOURCES) $(rsearch_bin_SOURCES) +man1dir = $(mandir)/man1 +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(dist_man_MANS) configDATA_INSTALL = $(INSTALL_DATA) infDATA_INSTALL = $(INSTALL_DATA) mibDATA_INSTALL = $(INSTALL_DATA) @@ -862,6 +867,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_FALSE = @SOLARIS_FALSE@ @@ -1017,7 +1023,7 @@ # Linker Flags #------------------------ NSPR_LINK = @nspr_lib@ -lplc4 -lplds4 -lnspr4 -NSS_LINK = @nss_lib@ -lssl3 -lnss3 -lsoftokn3 +NSS_LINK = @nss_lib@ -lssl3 -lnss3 LDAPSDK_LINK = @ldapsdk_lib@ -lssldap60 -lprldap60 -lldap60 -lldif60 DB_LINK = @db_lib@ -ldb- at db_libver@ SASL_LINK = @sasl_lib@ -lsasl2 @@ -1030,7 +1036,33 @@ # Generated Sources #------------------------ BUILT_SOURCES = dirver.h dberrstrs.h -CLEANFILES = dirver.h dberrstrs.h ns-slapd.properties +CLEANFILES = dirver.h dberrstrs.h ns-slapd.properties \ + ldap/admin/src/scripts/dscreate.map \ + ldap/admin/src/scripts/DSCreate.pm ldap/admin/src/scripts/DSMigration.pm \ + ldap/admin/src/scripts/dsorgentries.map ldap/admin/src/scripts/migrate-ds.pl \ + ldap/admin/src/scripts/Migration.pm ldap/admin/src/scripts/SetupDialogs.pm \ + ldap/admin/src/scripts/setup-ds.pl ldap/admin/src/scripts/setup-ds.res \ + ldap/admin/src/scripts/Setup.pm ldap/admin/src/scripts/template-bak2db \ + ldap/admin/src/scripts/template-bak2db.pl ldap/admin/src/scripts/template-db2bak \ + ldap/admin/src/scripts/template-db2bak.pl ldap/admin/src/scripts/template-db2index \ + ldap/admin/src/scripts/template-db2index.pl ldap/admin/src/scripts/template-db2ldif \ + ldap/admin/src/scripts/template-db2ldif.pl ldap/admin/src/scripts/template-dbverify \ + ldap/admin/src/scripts/template-ldif2db ldap/admin/src/scripts/template-ldif2db.pl \ + ldap/admin/src/scripts/template-ldif2ldap ldap/admin/src/scripts/template-monitor \ + ldap/admin/src/scripts/template-ns-accountstatus.pl ldap/admin/src/scripts/template-ns-activate.pl \ + ldap/admin/src/scripts/template-ns-inactivate.pl ldap/admin/src/scripts/template-ns-newpwpolicy.pl \ + ldap/admin/src/scripts/template-restart-slapd ldap/admin/src/scripts/template-restoreconfig \ + ldap/admin/src/scripts/template-saveconfig ldap/admin/src/scripts/template-start-slapd \ + ldap/admin/src/scripts/template-stop-slapd ldap/admin/src/scripts/template-suffix2instance \ + ldap/admin/src/scripts/template-upgradedb ldap/admin/src/scripts/template-verify-db.pl \ + ldap/admin/src/scripts/template-vlvindex ldap/admin/src/scripts/Util.pm \ + ldap/ldif/template-baseacis.ldif ldap/ldif/template-bitwise.ldif ldap/ldif/template-country.ldif \ + ldap/ldif/template-dnaplugin.ldif ldap/ldif/template-domain.ldif ldap/ldif/template-dse.ldif \ + ldap/ldif/template-ldapi-autobind.ldif ldap/ldif/template-ldapi-default.ldif \ + ldap/ldif/template-ldapi.ldif ldap/ldif/template-locality.ldif ldap/ldif/template-org.ldif \ + ldap/ldif/template-orgunit.ldif ldap/ldif/template-pampta.ldif ldap/ldif/template-sasl.ldif \ + ldap/ldif/template-state.ldif ldap/ldif/template-suffix-db.ldif + taskdir = $(datadir)@scripttemplatedir@ server_LTLIBRARIES = libslapd.la libns-dshttpd.la @@ -1187,6 +1219,28 @@ ldap/servers/snmp/SNMPv2-SMI.txt +#------------------------ +# man pages +#------------------------ +dist_man_MANS = man/man1/dbscan.1 \ + man/man1/cl-dump.1 \ + man/man1/dbgen.pl.1 \ + man/man1/dsktune.1 \ + man/man1/infadd.1 \ + man/man1/ldap-agent.1 \ + man/man1/ldclt.1 \ + man/man1/ldif.1 \ + man/man1/logconv.pl.1 \ + man/man1/migratecred.1 \ + man/man1/mmldif.1 \ + man/man1/pwdhash.1 \ + man/man1/repl-monitor.1 \ + man/man1/rsearch.1 \ + man/man8/migrate-ds.pl.8 \ + man/man8/ns-slapd.8 \ + man/man8/setup-ds.pl.8 + + #//////////////////////////////////////////////////////////////// # # Server Strings @@ -8705,6 +8759,96 @@ distclean-libtool: -rm -f libtool uninstall-info-am: +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done +install-man8: $(man8_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ + done +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ + done install-configDATA: $(config_DATA) @$(NORMAL_INSTALL) test -z "$(configdir)" || $(mkdir_p) "$(DESTDIR)$(configdir)" @@ -8876,7 +9020,7 @@ distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/m4 + $(mkdir_p) $(distdir)/m4 $(distdir)/man/man1 $(distdir)/man/man8 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -9004,9 +9148,9 @@ check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) \ - $(DATA) config.h + $(MANS) $(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 \ + for dir in "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(serverplugindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(initconfigdir)" "$(DESTDIR)$(perldir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(taskdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(configdir)" "$(DESTDIR)$(infdir)" "$(DESTDIR)$(mibdir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(propertydir)" "$(DESTDIR)$(sampledatadir)" "$(DESTDIR)$(schemadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -9135,9 +9279,10 @@ info-am: install-data-am: install-configDATA install-infDATA \ - install-initSCRIPTS install-initconfigSCRIPTS install-mibDATA \ - install-nodist_propertyDATA install-perlSCRIPTS \ - install-propertyDATA install-sampledataDATA install-schemaDATA \ + install-initSCRIPTS install-initconfigSCRIPTS install-man \ + install-mibDATA install-nodist_propertyDATA \ + install-perlSCRIPTS install-propertyDATA \ + install-sampledataDATA install-schemaDATA \ install-serverLTLIBRARIES install-serverpluginLTLIBRARIES \ install-taskSCRIPTS @@ -9146,7 +9291,7 @@ install-info: install-info-am -install-man: +install-man: install-man1 install-man8 installcheck-am: @@ -9173,13 +9318,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-configDATA uninstall-infDATA uninstall-info-am \ uninstall-initSCRIPTS uninstall-initconfigSCRIPTS \ - uninstall-mibDATA uninstall-nodist_propertyDATA \ + uninstall-man uninstall-mibDATA uninstall-nodist_propertyDATA \ uninstall-perlSCRIPTS uninstall-propertyDATA \ uninstall-sampledataDATA uninstall-sbinPROGRAMS \ uninstall-sbinSCRIPTS uninstall-schemaDATA \ uninstall-serverLTLIBRARIES uninstall-serverpluginLTLIBRARIES \ uninstall-taskSCRIPTS +uninstall-man: uninstall-man1 uninstall-man8 + .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstPROGRAMS clean-sbinPROGRAMS \ @@ -9193,10 +9340,10 @@ install-data install-data-am install-exec install-exec-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-man1 install-man8 install-mibDATA \ + install-nodist_propertyDATA install-perlSCRIPTS \ + install-propertyDATA 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 \ @@ -9205,12 +9352,12 @@ 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-man uninstall-man1 uninstall-man8 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 From fedora-directory-commits at redhat.com Tue Jul 15 15:50:58 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 15 Jul 2008 11:50:58 -0400 Subject: [Fedora-directory-commits] ldapserver/man/man8 migrate-ds.pl.8, NONE, 1.1 ns-slapd.8, NONE, 1.1 setup-ds.pl.8, NONE, 1.1 Message-ID: <200807151550.m6FFowNE021083@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/man/man8 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20958/ldapserver/man/man8 Added Files: migrate-ds.pl.8 ns-slapd.8 setup-ds.pl.8 Log Message: Resolves: bug 447614 Bug Description: Lack of manpages Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: This adds man pages for the command line utilities. The configure.ac diffs were a little bit tricky - apparently, mandir is not set to a correct default value, so we have to make sure we set a reasonable default value it if the user has not set it (e.g. rpmbuild will override it with --mandir=something). Platforms tested: Fedora 8, Fedora 9 Flag Day: no Doc impact: no --- NEW FILE migrate-ds.pl.8 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH MIGRATE-DS.PL 8 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME migrate\-ds.pl \- Directory Server Migration script .SH SYNOPSIS .B migrate\-ds.pl [\-\-options] \fB\-\-\fR [args] .SH DESCRIPTION Directory Server Migration script - migrates Directory Server from older releases to the current release. .PP This script will copy instances (data and configuration) from the old server root directory to their new FHS locations. This script does a copy only \- the data in the old instances will be left untouched. The old instances must be shutdown first to ensure that the databases are copied safely. During migration your migrated instances will be started. .PP .SH OPTIONS A summary of options is included below: .TP .B \fB\-\-help\fR This message .TP .B \fB\-\-version\fR Print the version and exit .TP .B \fB\-\-debug\fR Turn on debugging .TP .B \fB\-\-oldsroot\fR The old server root directory to migrate from .TP .B \fB\-\-actualsroot\fR This is the old location of the old server root. .TP .B \fB\-\-silent\fR Use silent setup \- no user input .TP .B \fB\-\-file\fR=\fIname\fR Use the file 'name' in .inf format to supply the default answers .TP .B \fB\-\-keepcache\fR Do not delete the temporary .inf file generated by this program .TP .B \fB\-\-logfile\fR Log migration messages to this file \- otherwise, a temp file will be used .TP .B \fB\-\-instance\fR By default, all directory server instances will be migrated. You can use this argument to specify one or more (e.g. \fB\-i\fR slapd\-foo \fB\-i\fR slapd\-bar) if you do not want to migrate all of them. .TP .B \fB\-\-cross\fR See below. .PP For all options, you can also use the short name e.g. \fB\-h\fR, \fB\-d\fR, etc. For the \fB\-d\fR argument, specifying it more than once will increase the debug level e.g. \fB\-ddddd\fR .PP args: You can supply default .inf data in this format: .IP section.param=value .PP e.g. .IP General.FullMachineName=foo.example.com .PP or .IP "slapd.Suffix=dc=example, dc=com" .PP Values passed in this manner will override values in an .inf file given with the \fB\-f\fR argument. .PP actualsroot: This is used when you must migrate from one machine to another. The usual case is that you have mounted the old server root on a different root directory, either via a network mount, or by copying a tarball made using a relative directory on the source machine to the destination machine and untarring it. .PP For example: machineA is a 32bit machine, and you want to migrate your servers to a new 64bit machine. Lets assume your old server root on machineA was /opt/myds, and your new machine also wants to use a server root of /opt/myds. There are a couple of different ways to proceed. Either make a tarball of opt/myds from machineA using a relative path (i.e. NOT /opt/myds) or use NFS to mount machineA:/opt/myds on a different mount point (e.g. machineB:/migration/opt/myds). .PP If you do this, you should give the old "real" server root (/opt/myds) as the \fB\-\-actualsroot\fR argument, and use /migration/opt/myds for the \fB\-\-oldsroot\fR argument. That is, the oldsroot is the physical location of the files on disk. The actualsroot is the old value of the server root on the source machine. .PP cross: Also known as crossplatform, or 'c', or 'x'. This is when the source machine is a different architecture than the destination machine. In this case, only certain data will be available for migration. Changelog information will not be migrated, and replicas will need to be reinitialized (if migrating masters or hubs). This type of migration requires that all of your old databases have been dumped to LDIF format, and the LDIF file must be in the default database directory (usually /opt/fedora\-ds/slapd\-instance/db), and the LDIF file must have the same name as the database instance directory, with a ".ldif". For example, if you have .IP /opt/fedora\-ds/slapd\-instance/db/userRoot/ and /opt/fedora\-ds/slapd\-instance/db/NetscapeRoot/ .PP you must first use db2ldif to export these databases to LDIF e.g. .IP cd /opt/fedora\-ds/slapd\-instance \&./db2ldif \fB\-n\fR userRoot \fB\-a\fR /opt/fedora\-ds/slapd\-instance/db/userRoot.ldif and \&./db2ldif \fB\-n\fR NetscapeRoot \fB\-a\fR /opt/fedora\-ds/slapd\-instance/db/NetscapeRoot.ldif .PP Then you must somehow make your old server root directory available on the destination machine, either by creating a tar archive on the source and copying it to the destination, or by network mounting the source directory on the destination machine. .br .SH AUTHOR migrate-ds.pl was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE ns-slapd.8 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH NS-SLAPD 8 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME ns-slapd \- The main Directory Server daemon .SH SYNOPSIS .B ns-slapd -D configdir [\fI-d debuglevel\fR] [\fI-i pidlogfile\fR] [\fI-v\fR] [\fI-V\fR] .SH DESCRIPTION ns-slapd launches the LDAP Directory Server .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \-v Show version of program. .TP .B \-D configdir Specifies the configuration directory pointing at the instance to be started (e.g. /etc/dirsrv/slapd-localhost) .TP .B \-d debuglevel Specifies the debuglevel to be used .TP .B \-i pidlogfile Specifies file where the pid of the process will be stored .br .SH AUTHOR ns-slapd was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE setup-ds.pl.8 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH SETUP-DS.PL 8 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME setup\-ds.pl \- Set up an instance of Directory Server .SH SYNOPSIS .B setup-ds.pl [\fI--options\fR] \fI-- \fR[\fIargs\fR] .SH DESCRIPTION Set up a Directory Server instance. Creates the configuration files for an instance of Directory Server based on a few parameters like the hostname, port number, and directory manager information. Can be run in interactive mode with different levels of verbosity, or in silent mode with parameters supplied in a .inf format file or on the command line. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-\-help\fR This message .TP .B \fB\-\-version\fR Print the version and exit .TP .B \fB\-\-debug\fR Turn on debugging .TP .B \fB\-\-silent\fR Use silent setup \- no user input .TP .B \fB\-\-file\fR=\fIname\fR Use the file 'name' in .inf format to supply the default answers .TP .B \fB\-\-keepcache\fR Do not delete the temporary .inf file generated by this program .TP .B \fB\-\-logfile\fR Log setup messages to this file \- otherwise, a temp file will be used .PP For all options, you can also use the short name e.g. \fB\-h\fR, \fB\-d\fR, etc. For the \fB\-d\fR argument, specifying it more than once will increase the debug level e.g. \fB\-ddddd\fR .PP args: You can supply default .inf data in this format: .IP section.param=value .PP e.g. .IP General.FullMachineName=foo.example.com .PP or .IP "slapd.Suffix=dc=example, dc=com" .PP Values passed in this manner will override values in an .inf file given with the \fB\-f\fR argument. .br .SH AUTHOR setup-ds.pl was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. From fedora-directory-commits at redhat.com Tue Jul 15 15:50:58 2008 From: fedora-directory-commits at redhat.com (Richard Allen Megginson (rmeggins)) Date: Tue, 15 Jul 2008 11:50:58 -0400 Subject: [Fedora-directory-commits] ldapserver/man/man1 cl-dump.1, NONE, 1.1 dbgen.pl.1, NONE, 1.1 dbscan.1, NONE, 1.1 dsktune.1, NONE, 1.1 infadd.1, NONE, 1.1 ldap-agent.1, NONE, 1.1 ldclt.1, NONE, 1.1 ldif.1, NONE, 1.1 logconv.pl.1, NONE, 1.1 migratecred.1, NONE, 1.1 mmldif.1, NONE, 1.1 pwdhash.1, NONE, 1.1 repl-monitor.1, NONE, 1.1 rsearch.1, NONE, 1.1 Message-ID: <200807151550.m6FFowoK021078@cvs-int.fedora.redhat.com> Author: rmeggins Update of /cvs/dirsec/ldapserver/man/man1 In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20958/ldapserver/man/man1 Added Files: cl-dump.1 dbgen.pl.1 dbscan.1 dsktune.1 infadd.1 ldap-agent.1 ldclt.1 ldif.1 logconv.pl.1 migratecred.1 mmldif.1 pwdhash.1 repl-monitor.1 rsearch.1 Log Message: Resolves: bug 447614 Bug Description: Lack of manpages Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: This adds man pages for the command line utilities. The configure.ac diffs were a little bit tricky - apparently, mandir is not set to a correct default value, so we have to make sure we set a reasonable default value it if the user has not set it (e.g. rpmbuild will override it with --mandir=something). Platforms tested: Fedora 8, Fedora 9 Flag Day: no Doc impact: no --- NEW FILE cl-dump.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH CL-DUMP 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME cl-dump \- Dump and decode Directory Server replication change log .SH SYNOPSIS .B cl\-dump [\fI-h host\fR] [\fI-p port\fR] [\fI-D bind-dn\fR] -w bind-password | -P bind-cert [\fI-r replica-roots\fR] [\fI-o output-file\fR] [\fI-c\fR] [\fI-v\fR] .PP .B cl\-dump \-i changelog\-ldif\-file\-with\-base64encoding [\fI\-o output\-file\fR] [\fI\-c\fR] .PP .SH DESCRIPTION Dump and decode Directory Server replication change log .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below. .TP .B \-c Dump and interpret CSN only. This option can be used with or without -i option. .TP .B \-D bind\-dn Directory server's bind DN. Default to "cn=Directory Manager" if the option is omitted. .TP .B \-h host Directory server's host. Default to the server where the script is running. .TP .B \-i changelog\-ldif\-file\-with\-base64encoding If you already have a ldif-like changelog, but the changes in that file are encoded, you may use this option to decode that ldif-like changelog. .TP .B \-o output\-file Path name for the final result. Default to STDOUT if omitted. .TP .B \-p port Directory server's port. Default to 389. .TP .B \-P bind\-cert Pathname of binding certificate DB .TP .B \-r replica\-roots Specify replica roots whose changelog you want to dump. The replica roots may be seperated by comma. All the replica roots would be dumped if the option is omitted. .TP .B \-v Print the version of this script. .TP .B \-w bind\-password Password for the bind DN .SH RESTRICTIONS If you are not using \-i option, the script should be run when the server is running, and from where the server's changelog directory is accessible. .br .SH SEE ALSO .BR repl-monitor (1) .br .SH AUTHOR cl-dump was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE dbgen.pl.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH DBGEN.PL 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME dbgen.pl \- Random LDIF database creator .SH SYNOPSIS .B dbgen.pl [\fIOPTIONS\fR] -o output_file -n number .SH DESCRIPTION Random LDIF database creator. Used to generate large LDIF files for use in testing the Directory Server. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \-v Verbose output .TP .B \-q Quiet output .TP .B \-s suffix LDAP suffix. Default is 'dc=example,dc=com' .TP .B \-c CN naming style Naming style for RDN's. Default is UID .TP .B \-O organizationalPersons Organizationalpersons objectClass. Default is inetOrgPerson. .TP .B \-p piranha style ACI Piranha style aci. Default is barracua .TP .B \-r seed Seed number for random number generator .TP .B \-g Print extra entries for orgchart .TP .B \-x Suppress printing of the preamble .TP .B \-y Suppress printing of Organizational Units .TP .B \-l Location of directory containing data files, default is /usr/share/dirsrv/data .TP .B \-n number Number of entries to be generated .br .SH AUTHOR dbgen.pl was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE dbscan.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH DBSCAN 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME dbscan \- scans a Directory Server database index file and dumps the contents .SH SYNOPSIS .B dbscan \fB-f \fR [\fI-R\fR] [\fI-t \fR] [\fI-K \fR] [\fI-k \fR] [\fI-l \fR] [\fI-G \fR] [\fI-n\fR] [\fI-r\fR] [\fI-s\fR] .PP .SH DESCRIPTION Scans a Directory Server database index file and dumps the contents. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-f\fR specify db file .TP .B \fB\-R\fR dump as raw data .TP .B \fB\-t\fR entry truncate size (bytes) .IP entry file options: .TP .B \fB\-K\fR lookup only a specific entry id index file options: .TP .B \fB\-k\fR lookup only a specific key .TP .B \fB\-l\fR max length of dumped id list (default 4096; 40 bytes <= size <= 1048576 bytes) .TP .B \fB\-G\fR only display index entries with more than ids .TP .B \fB\-n\fR display ID list lengths .TP .B \fB\-r\fR display the conents of ID list .TP .B \fB\-s\fR Summary of index counts .IP .SH USAGE Sample usages: .TP Dump the entry file: .B dbscan \fB\-f\fR id2entry.db4 .TP Display index keys in cn.db4: .B dbscan \fB\-f\fR cn.db4 .TP Display index keys and the count of entries having the key in mail.db4: .B dbscan \fB\-r\fR \fB\-f\fR mail.db4 .TP Display index keys and the IDs having more than 20 IDs in sn.db4: .B dbscan \fB\-r\fR \fB\-G\fR 20 \fB\-f\fR sn.db4 .TP Display summary of objectclass.db4: .B dbscan \fB\-f\fR objectclass.db4 .br .SH AUTHOR dbscan was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE dsktune.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH DSKTUNE 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME dsktune \- reports memory, network, and file system tuning settings which can affect the performance of the Directory Server .SH SYNOPSIS .B dsktune [\fI-q\fR] [\fI-c\fR] [\fI-D\fR] [\fI-v\fR] [\fI-i installdir\fR] .SH DESCRIPTION Reports memory, network, and file system tuning settings which can affect the performance of the Directory Server .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \fB\-q\fR dsktune only reports essential settings .TP .B \fB\-c\fR dsktune only reports tuning information for client machines .TP .B \fB\-D\fR dsktune also reports the commands executed .TP .B \fB\-v\fR dsktune only reports its release version date .TP .B \fB\-i installdir\fR specify alternate server installation directory .br .SH AUTHOR dsktune was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE infadd.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH INFADD 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME infadd \- infinite additions to LDAP server .SH SYNOPSIS .B infadd \fI-s suffix -u bindDN -w password \fR[\fIoptions\fR] .SH DESCRIPTION infadd is used to measure performance of the add operation. It can span multiple threads in order to test the performance under heavy locking. .PP .SH OPTIONS .TP .B \-h hostname hostname (default: localhost) .TP .B \-p port port (default: 389) .TP .B \-t threads number of threads to spin (default: 1) .TP .B \-d use TCP no\-delay .TP .B \-q quiet mode (no status updates) .TP .B \-v verbose mode (give per\-thread statistics) .TP .B \-I num first uid (default: 0) .TP .B \-l count limit count; stops when the total count exceeds .TP .B \-i msec sample interval in milliseconds (default: 10000) .TP .B \-R size generate random names instead of using data files .TP .B \-z size add binary blob of average size of bytes .PP .SH SEE ALSO .BR rsearch (1) .br .SH AUTHOR infadd was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE ldap-agent.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH LDAP-AGENT 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME ldap-agent \- SNMP agent for Directory Server .SH SYNOPSIS .B ldap-agent .RI [\fI-D\fR] .SH DESCRIPTION ldap-agent is an SNMP subagent for Directory Server .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS .TP .B \-D Enable debugging .TP .B Configuration file for the ldap agent .SH SEE ALSO .BR snmpd(8) .br .SH USAGE Sample usage: .TP .B ldap-agent /etc/dirsrv/config/ldap-agent.conf .br .SH AUTHOR ldap\-agent was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE ldclt.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH LDCLT 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME ldclt \- load test program for LDAP .SH SYNOPSYS .B ldclt [\fI\-qQvV\fR] [\fI\-E \fR] [\fI\-b \fR] [\fI\-h \fR] [\fI\-p \fR] [\fI\-t \fR] [\fI\-D \fR] [\fI\-w \fR] [\fI\-o \fR] [\fI\-e \fR] [\fI\-a \fR] [\fI\-n \fR] [\fI\-i \fR] [\fI\-N \fR] [\fI\-I \fR] [\fI\-T \fR] [\fI\-r \-R \fR] [\fI\-f \fR] [\fI\-s \fR] [\fI\-S \fR] [\fI\-P\fR] [\fI\-W \fR] [\fI\-Z \fR] .PP .SH DESCRIPTION This tool is a LDAP client targeted to validate the reliability of the product under a wide variety of stress conditions. .PP .SH OPTIONS The valid options are: .TP .B \fB\-a\fR Asynchronous mode, with max pending operations. .TP .B \fB\-b\fR Give the base DN to use. Default "o=sun,c=us". .TP .B \fB\-D\fR Bind DN. See \fB\-w\fR .TP .B \fB\-E\fR Max errors allowed. Default 1000. .TP .B \fB\-f\fR Filter for searches. .TP .B \fB\-h\fR Host to connect. Default "localhost". .TP .B \fB\-i\fR Number of times inactivity allowed. Default 3 (30 seconds) .TP \fB\-I\fR Ignore errors (cf. \fB\-E\fR). Default none. .TP .B \fB\-n\fR Number of threads. Default 10. .TP .B \fB\-N\fR Number of samples (10 seconds each). Default infinite. .TP .B \fB\-o\fR SASL Option. .TP .B \fB\-p\fR Server port. Default 389. .TP .B \fB\-P\fR Master port (to check replication). Default 16000. .TP .B \fB\-q\fR Quiet mode. See option \fB\-I\fR. .TP .B \fB\-Q\fR Super quiet mode. .TP .B \fB\-r\fR Range's low value. .TP .B \fB\-R\fR Range's high value. .TP .B \fB\-s\fR Scope. May be base, subtree or one. Default subtree. .TP .B \fB\-S\fR Slave to check. .TP .B \fB\-t\fR LDAP operations timeout. Default 30 seconds. .TP .B \fB\-T\fR Total number of operations per thread. Default infinite. .TP .B \fB\-v\fR Verbose. .TP .B \fB\-V\fR Very verbose. .TP .B \fB\-w\fR Bind passwd. See \fB\-D\fR. .TP .B \fB\-W\fR Wait between two operations. Default 0 seconds. .TP .B \fB\-Z\fR certfile. Turn on SSL and use certfile as the certificate DB .TP .B \fB\-e\fR Execution parameters: .IP \fBadd\fR ldap_add() entries. .br \fBappend\fR entries to the genldif file. .br \fBascii\fR ascii 7\-bits strings. .br \fBattreplace=name:mask\fR replace attribute of existing entry. .br \fBattrlist=name:name:name\fR specify list of attribs to retrieve .br \fBattrsonly=0|1\fR ldap_search() parameter. Set 0 to read values. .br \fBbindeach\fR ldap_bind() for each operation. .br \fBbindonly\fR only bind/unbind, no other operation is performed. .br \fBclose\fR will close() the fd, rather than ldap_unbind(). .br \fBcltcertname=name\fR name of the SSL client certificate .br \fBcommoncounter\fR all threads share the same counter. .br \fBcounteach\fR count each operation not only successful ones. .br \fBdelete\fR ldap_delete() entries. .br \fBdontsleeponserverdown\fR will loop very fast if server down. .br \fBemailPerson\fR objectclass=emailPerson (\fB\-e\fR add only). .br \fBesearch\fR exact search. .br \fBgenldif=filename\fR generates a ldif file .br \fBimagesdir=path\fR specify where are the images. .br \fBincr\fR incremental values. .br \fBinetOrgPerson\fR objectclass=inetOrgPerson (\fB\-e\fR add only). .br \fBkeydbfile=file\fR filename of the key database .br \fBkeydbpin=password\fR password for accessing the key database .br \fBnoglobalstats\fR don't print periodical global statistics .br \fBnoloop\fR does not loop the incremental numbers. .br \fBobject=filename\fR build object from input file .br \fBperson\fR objectclass=person (\fB\-e\fR add only). .br \fBrandom\fR random filters, etc... .br \fBrandomattrlist=name:name:name\fR random select attrib in the list .br \fBrandombase\fR random base DN. .br \fBrandombaselow=value\fR low value for random generator. .br \fBrandombasehigh=value\fR high value for random generator. .br \fBrandombinddn\fR random bind DN. .br \fBrandombinddnfromfile=fine\fR retrieve bind DN & passwd from file .br \fBrandombinddnlow=value\fR low value for random generator. .br \fBrandombinddnhigh=value\fR high value for random generator. .br \fBrdn=attrname:value\fR alternate for \fB\-f\fR. .br \fBreferral=on|off|rebind\fR change referral behaviour. .br \fBscalab01\fR activates scalab01 scenario. .br \fBscalab01_cnxduration\fR maximum connection duration. .br \fBscalab01_maxcnxnb\fR modem pool size. .br \fBscalab01_wait\fR sleep() between 2 attempts to connect. .br \fBsmoothshutdown\fR main thread waits till the worker threads exit. .br \fBstring\fR create random strings rather than random numbers. .br \fBv2\fR ldap v2. .br \fBwithnewparent\fR rename with newparent specified as argument. .br \fBrandomauthid\fR random SASL Authid. .br \fBrandomauthidlow=value\fR low value for random SASL Authid. .br \fBrandomauthidhigh=value\fR high value for random SASL Authid. .PP .SH AUTHOR ldclt was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE ldif.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH LDIF 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME ldif \- manipulates an LDIF stream by adding a column with the defined attribute type .SH SYNOPSIS .B ldif [\fI-b\fR] attrtype .SH DESCRIPTION Manipulates an LDIF stream by adding a column with the defined attribute type .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. .SH OPTIONS A summary of options is included below: .TP .B \-b Output base64 binary format .SH USAGE .TP .B ldif dn < /tmp/ldif .SH AUTHOR ldif was written by the Fedora Directory Server Project. .SH "REPORTING BUGS" Report bugs to http://bugzilla.redhat.com. .SH COPYRIGHT Copyright \(co 2001 Sun Microsystems, Inc. Used by permission. .br Copyright \(co 2008 Red Hat, Inc. .br This manual page was written by Michele Baldessari , for the Debian project (but may be used by others). .br This is free software. You may redistribute copies of it under the terms of the Directory Server license found in the LICENSE file of this software distribution. This license is essentially the GNU General Public License version 2 with an exception for plug-in distribution. --- NEW FILE logconv.pl.1 --- .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH LOGCONV.PL 1 "May 18, 2008" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME logconv.pl \- analyzes Directory Server access log files .SH SYNOPSIS .B logconv.pl [\fI\-h\fR] [\fI\-d \fR] [\fI\-s \fR] [\fI\-v\fR] [\fI\-V\fR] [\fI\-S \fR] [\fI\-E \fR] [\fI\-efcibaltnxgju\fR] [\fI access log ... ... \fR] .PP .SH DESCRIPTION Analyzes Directory Server access log files for specific information defined on the command line .SH OPTIONS A summary of options is included below: .TP .B \fB\-h\fR help/usage .TP .B \fB\-d\fR DEFAULT \-> cn=directory manager .TP .B \fB\-s\fR DEFAULT \-> 20 .TP .B \fB\-X\fR E.g. Load balancers .TP .B \fB\-v\fR show version of tool Print version of the tool .TP .B \fB\-S\fR