summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd
Commit message (Collapse)AuthorAgeFilesLines
...
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-2/+0
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11843 DEADCODE Triaged Unassigned Bug Minor Fix Required mm_init() ds/ldap/servers/slapd/tools/mmldif.c Comment: A variable tailorfile is not used. Remove it.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-6/+47
| | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11841 DEADCODE Triaged Unassigned Bug Minor Fix Required sasl_map_new_private() ds/ldap/servers/slapd/sasl_map.c Comment: This new_lock NULL checking is not needed. On this path, the condition "NULL == new_lock" cannot be true. 97 if (NULL == new_lock) { Execution cannot reach this statement "slapi_ch_free((void**)new_p...". 98 slapi_ch_free((void**)new_priv); 99 return NULL; 100 } 11842 DEADCODE Triaged Unassigned Bug Minor Fix Required sasl_map_insert_list_entry() ds/ldap/servers/slapd/sasl_map.c Comment: In sasl_map_insert_list_entry, /* Check to see if it's here already */ was not implemented. The variable ishere pointed by coverity should have been prepared for the purpose. Implementing a helper function sasl_map_cmp_data.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-8/+9
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11834 DEADCODE Triaged Unassigned Bug Minor Fix Required write_function() ds/ldap/servers/slapd/daemon.c Comment: The location of checking for sentbytes is not correct. Execution cannot reach this statement "if (sentbytes < count){ {...". 1724 } else if (sentbytes < count) { 1725 LDAPDebug(LDAP_DEBUG_CONNS, It should not be "else" of checking for "bytes". Moving the check after "else if (sentbytes > count)".
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-4/+2
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11832 DEADCODE Triaged Unassigned Bug Minor Fix Required do_modrdn() ds/ldap/servers/slapd/modrdn.c Comment: At the line 201 and 212, the condition "rawnewsuperior" cannot be false. 201 rawnewsuperior?rawnewsuperior:"", 212 rawnewsuperior?rawnewsuperior:"", This patch is removing the checks.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-12/+9
| | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11831 DEADCODE Triaged Unassigned Bug Minor Fix Required config_set_value() ds/ldap/servers/slapd/libglobs.c Comment: The config_set_value meant to set various values (e.g. "off" and "unknown") depending upon the config_var_type, but this code overrides the spec and set the empty string to all cases. - /* for null values, just set the attr value to the empty - string */ - if (!value) { - slapi_entry_attr_set_charptr(e, cgas->attr_name, ""); - return; - } This patch removes the above blind empty string setting and relies on the values in each config_var_type case. Plus, adding the NULL value check to CONFIG_CHARRAY.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-9/+9
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11829 DEADCODE Triaged Unassigned Bug Minor Fix Required ldbm_back_start() ds/ldap/servers/slapd/back-ldbm/start.c Comment: The code meant the autosized cache should be reduced 25% if the calculated size was less than 500MB for the overhead of libdb. If larger than 500MB, the overhead is relatively small and can be ignored. The code should have calculated the size before comparing it to 500MB.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-1/+1
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11826 DEADCODE Triaged Unassigned Bug Minor Fix Required ldbm_back_search() ds/ldap/servers/slapd/back-ldbm/ldbm_search.c Comment: On this path, the condition "abandoned" cannot be true. 504 return ldbm_back_search_cleanup(pb, li, sort_control, 505 (abandoned?-1:LDAP_PROTOCOL_ERROR), 506 "Sort Response Control", -1, 507 &basesdn, &vlv_request_control); Line 505 should be 505 LDAP_PROTOCOL_ERROR,
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-8/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11825 DEADCODE Triaged Unassigned Bug Minor Fix Required ldbm_back_modrdn() ds/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c Comment: It was checking if (parententry && parententry->ep_entry) in the if ( parententry == NULL ) clause. Removed the unnecessary code.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-4/+0
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11821 DEADCODE Triaged Unassigned Bug Minor Fix Required allinstance_set_busy() ds/ldap/servers/slapd/back-ldbm/misc.c 11822 DEADCODE Triaged Unassigned Bug Minor Fix Required allinstance_set_not_busy() ds/ldap/servers/slapd/back-ldbm/misc.c Comment: objset_next_obj releases the previous object internally. Thus, there is no leak. Just remove the 2 lines: if (inst_obj) object_release(inst_obj);
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-2/+1
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11820 DEADCODE Triaged Unassigned Bug Minor Fix Required idl_new_delete_key() ds/ldap/servers/slapd/back-ldbm/idl_new.c Comment: tmpid is no longer used. Since we don't define DB_ALLIDS_ON_WRITE, ALLID has no chance to be stored in the db. But the code should be fixed as follows: Remove: 480 ID tmpid = 0; The 496 must be 496 if (id == ALLID) {
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-3/+1
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11818 DEADCODE Triaged Unassigned Bug Minor Fix Required agt_mopen_stats() ds/ldap/servers/slapd/agtmmap.c Comment: Removing the unreachable statement: Execution cannot reach this statement "return 0;". 313 return 0;
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11796 DEADCODE Triaged Unassigned Bug Minor Ignore slapi_ldap_init_ext() ds/ldap/servers/slapd/ldaputil.c Comment: ldapurl is guaranteed not NULL. 323 slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_init_ext", 324 "Could not parse given LDAP URL [%s] : error [%s]\n", 325 ldapurl ? ldapurl : "NULL", 326 slapi_urlparse_err2string(rc)); 11797 DEADCODE Triaged Unassigned Bug Minor Ignore slapi_ldap_bind() ds/ldap/servers/slapd/ldaputil.c Comment: It is guaranteed that mech has some value at the line 755. 755 slapi_log_error(SLAPI_LOG_FATAL, "slapi_ldap_bind", 756 "Error: could not perform interactive bind for id " 757 "[%s] mech [%s]: error %d (%s)\n", 758 bindid ? bindid : "(anon)", 759 mech ? mech : "SIMPLE", 760 rc, ldap_err2string(rc));
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-1/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11794 DEADCODE Triaged Unassigned Bug Minor Ignore slapi_dn_syntax_check() ds/ldap/servers/slapd/plugin_syntax.c Comment: Checking for the possibility of dn == NULL is not needed since it is already checked at the line 303.
* 616618 - 389 v1.2.5 accepts 2 identical entries with different DN formatsNoriko Hosoi2010-07-2212-205/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=616618 Change Description: . renamed 91upgradednformat.pl to 80upgradednformat.pl to run upgradednformat before 90subtreerename.pl. . ported following patches applied to Directory_Server_8_2_Branch to master and 389-ds-base-1.2.6. 612771 - RHDS 8.1/389 v1.2.5 accepts 2 identical entries with different DN formats * commit 50bb2ee6676e10cdda704982dfa831efa4011037 Fix Description: This patch fixes the upgradednformat utility to eliminate the duplicated DNs found in the upgrading period. Assuming DN: attr0=value0,attr1=value1,...,attrn=valuen exists in the DB and another identical DN is found, the second DN is renamed to nsuniqueid=<uuid>+attr0=value0,attr1=value1,...,attrn=valuen , where the <uuid> is the unique id assigned to the entry when the entry is added to the server. The modification is logged in the error log. In addition, there was a bug to handle multi-valued RDNs in slapi_dn_normalize_ext. In case multi-valued RDN appears with DN value (e.g., nsuniqueid=<uuid>+cn=uid\=<uid>\,o\=<org>,dc=<dc>), it was not normalized properly. Introduced second rdn_av_stack (subinitial_rdn_av_stack) for the nested DN value. See also: http://directory.fedoraproject.org/wiki/Upgrade_to_New_DN_Format#Another_Upgrade_Scenario * commit ebaa18adaf201f75c709e078abd8e32605eddb81 Fix Description: 1) In the previous commit 50bb2ee6676e10cdda704982dfa831efa4011037, there were 3 places to miss replacing rdn_av_count with subrdn_av_count. 2) A variable subtypestart is used to keep the head of nested multivalued RDNs. For instance, seeAlso=cn\=<CN>\+l\=<L>\,o\=<O>,dc=examle,dc=com ^ or ^ or ^ There was a bug to set the first position ("cn" in the above example). In addition, fixed a warning assigning "const char *" to "char *" in import_foreman (import-threads.c). * commit 472a2c0f2f21205390ba87c31c498b4419a932ba Fix Description: When newly creating an ancestorid index file, instead of opening the index file with DB_TRUNCATE option, delete the file then create it. 616135 - Upgrade failure on Solaris : tar: db/NetscapeRoot/{DBVERSION,*.db4}: No such file or directory * commit e6723421e6dc69408edb2a396eb22da361cff206 Fix Description: .../'{'DBVERSION,*.db4'}' is not a shell syntax. Process DBVERSION and *.db4 individually. Cherry-picked 700d7c1a199db4a690740636b8bd3e612304ce1e and 0b6ddc9b06845bdf385e749f2c5a99497df20d98 from 389-ds-base-1.2.6 branch.
* Bug 547503 - replication broken again, with 389 MMR replication and TCP errorsRich Megginson2010-07-161-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=547503 Resolves: bug 547503 Bug Description: replication broken again, with 389 MMR replication and TCP errors Reviewed by: nhosoi (Thanks!) Branch: master Fix Description: When turbo mode is used for the connection, the server does not poll for read ready status in the main loop, nor go through the code in handle_pr_read_ready that updates conn->c_idlesince. So while the conn is in turbo mode, the c_idlesince is not updated. If the conn gets a timeout while reading, a flag will be set on the connection that will put it back in the main loop. When it then hits handle_pr_read_ready, if there is still no activity on the connection, it will go through idle timeout processing. It may have been a long time since c_idlesince was updated, so the connection may be closed wrongly. The solution is to have c_idlesince updated in connection_threadmain() in turbo mode if the connection really isn't idle. In addition, the conn private turbo_mode flag was not being used correctly - in the timeout case, the local variable was being updated but not the conn private turbo_flag. Since the conn private turbo_flag is not used anywhere else, it can be removed, and just use the local variable. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no (cherry picked from commit 9d638b3fc25fbc57884a511744943499c7102f40)
* Bug 614242 - C99/ANSI C++ related compile errors on HP-UXRich Megginson2010-07-141-7/+7
| | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=614242 Resolves: bug 614242 Bug Description: C99/ANSI C++ related compile errors on HP-UX Reviewed by: rmeggins Branch: HEAD Fix Description: In lib/ldaputil/vtable.c, a global static struct is declared and initialized to {}. I see gcc allows this, and aCC does also but only with -AA ("newly supported ANSI C++ Standard features"). In ldap/servers/slapd/tools/ldclt/ldclt.c, an array size is set using a variable, which I think is legal in C99. Since the size is not computed, and this is the only place C99 is taken advantage of, this can be changed to a then I would instead add the -AC99 compiler flag for HP-UX. Platforms tested: HP-UX Flag Day: no Doc impact: no Patch submitted by: Ulf Weltman <ulf.weltman@hp.com>
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12237 UNINIT Triaged Unassigned Bug Minor Fix Required vlv_trim_candidates_byvalue() ds/ldap/servers/slapd/back-ldbm/vlv.c Commit: There is almost no chance to pass uninitialized typedown_value to ber_bvecfree unless vlv_request_control value is NULL. Anyway, we init typedown_value to NULL.
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-5/+7
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12236 UNINIT Triaged Unassigned Bug Minor Fix Required dblayer_get_aux_id2entry() ds/ldap/servers/slapd/back-ldbm/dblayer.c Comment: If a backend instance info (inst) or ldbminfo (li) or dblayer private info (opriv) is not available, uninitialized priv is passed to slapi_ch_free_string and slapi_ch_free. We need to init priv to NULL and handle done: case if priv is NULL.
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12210 UNINIT Triaged Unassigned Bug Minor Fix Required str2entry_fast() ds/ldap/servers/slapd/entry.c Comment: ptype is always NULL the first time through the loop, so a will always be initialized to NULL. But we should explicitly initialize it to NULL in the declaration.
* Bug 611850 - fix coverity Defect Type: Error handling issuesRich Megginson2010-07-064-5/+33
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=611850 Resolves: bug 611850 Bug Description: fix coverity Defect Type: Error handling issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Check the error return from the functions. In some cases, I was able to figure out that the calling function should perform additional error handling (return early, goto error label), but in general the code just logs an appropriate error message and continues. I was able to get rid of some more libacl code. I removed an unused variable from modify.c Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 610177 - fix coverity Defect Type: Uninitialized variables issuesRich Megginson2010-07-064-4/+4
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610177 Resolves: bug 610177 Bug Description: fix coverity Defect Type: Uninitialized variables issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Initialize variables to 0, NULL, or an appropriate error code. Got rid of the unused lexer code. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 602531 - coverity: op_shared_delete: compare preop entry and ↵Rich Megginson2010-07-011-7/+12
| | | | | | | | | | | | | | | GLUE_PARENT_ENTRY before freeing them https://bugzilla.redhat.com/show_bug.cgi?id=602531 Resolves: bug 602531 Bug Description: coverity: op_shared_delete: compare preop entry and GLUE_PARENT_ENTRY before freeing them Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Get the pre entry and glue parent entries separately, compare them, and only free one of them if they are the same. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 602530 - coverity: op_shared_modify: compare pre, post and original ↵Rich Megginson2010-07-011-4/+18
| | | | | | | | | | | | | | | entries before freeing them https://bugzilla.redhat.com/show_bug.cgi?id=602530 Resolves: bug 602530 Bug Description: coverity: op_shared_modify: compare pre, post and original entries before freeing them Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Get the pre entry and post entry separately, compare them to e and to each other before attempting to free them. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-1/+1
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The code wants to allocate space for a struct berval, not struct berval *. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-2/+2
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The code is allocating space for an array of int which is 4 bytes. In this case, since type_name_disposition is int**, doing *type_name_disposition is still a pointer type rather than the int type. We have to do **type_name_disposition to get to the int type we want. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-1/+1
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The code is allocating an array of struct dynalib *, so the sizeof needs to use (struct dynalib *) not (struct dynalib). Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-6/+1
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The point of this code is to copy the conn authtype to the operation authtype, so just do that. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-0/+4
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Just error and return if nread is < 0. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-6/+4
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609590 Resolves: bug 609590 Bug Description: fix coverity Defect Type: Memory - corruptions issues Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The cnt parameter is not used, so just get rid of it. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* 578296 - Attribute type entrydn needs to be added when subtreeNoriko Hosoi2010-06-245-3/+67
| | | | | | | | | | | | | | | | | | | rename switch is on https://bugzilla.redhat.com/show_bug.cgi?id=578296 Change Description: 1) ldbm_back_next_search_entry_ext (ldbm_search.c) When getting an entry from ID using id2entry_ext, pass a flag ID2ENTRY_ADD_ENTRYDN to add entrydn to the entry. 2) id2entry_ext (id2entry.c) Added id2entry_ext to handle the flag ID2ENTRY_ADD_ENTRYDN. If ID2ENTRY_ADD_ENTRYDN is set in the flags variable and entryrdn switch is enabled, entrydn is added to the entry. 3) index_read_ext (index.c) If entryrdn switch is on and the attribute type is entrydn and the search type is equality, then call entryrdn_index_read to get the ID directly.
* Bug 604453 - SASL Stress and Server crash: Program quits with the assertion ↵Rich Megginson2010-06-236-53/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | failure in PR_Poll https://bugzilla.redhat.com/show_bug.cgi?id=604453 Resolves: bug 604453 Bug Description: SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll Reviewed by: nhosoi (Thanks!) Branch: master Fix Description: When the server pushes the SASL IO layer on to the connection it must do so when there are no other references to the connection. The only way to do this without introducing more locking is to have the saslbind code just register the intent to push SASL IO at the next available time. This cannot be done in the sasl bind code (or any operation code for that matter) because connection_threadmain() will enable the connection for reading (and polling) after reading the PDU and before calling the operation function. Therefore, during the operation function, the connection may be being actively polled, so we must not access the conn c_prfd. The best place to push the IO layer is in connection_threadmain, after the server has notified that there is read ready on the connection, but before we have actually attempted to read anything. At this point, connection_threadmain is the only thread that will be accessing the connection, and if we push or pop the IO layer before calling the read function, we are guaranteed to have the correct IO layer to use. The code has been made generic enough to allow for use by the startTLS code if the need arises. I also added some more locking in the saslbind code, and changed the sasl IO code to more closely resemble the way that the NSS code deals with IO layer push/pop. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no (cherry picked from commit c28fcadfc7812108573e40f13624e11a5a8609e5)
* Bug 604453 - SASL Stress and Server crash: Program quits with the assertion ↵Rich Megginson2010-06-231-2/+1
| | | | | | | | | | | | | | | | | | failure in PR_Poll https://bugzilla.redhat.com/show_bug.cgi?id=604453 Resolves: bug 604453 Description: SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll Branch: master Reviewed by: nhosoi (Thanks!) Fix Description: We usually do not have to pop the IO layer from the SASL connection. This is usually handled by PR_Close() on the PRFD, which should only happen when the connection is not being referenced by the main PR_Poll() call. The only time we need to explicitly pop the SASL IO layer is if the client re-negotiates the SASL bind with a different ssf e.g. going from clear to protected or vice versa. Platforms tested: RHEL5 x86_64 (cherry picked from commit ac6ce0947d9b2d5ec3649948bca861f0e318d708)
* 606920 - anonymous resource limit - nstimelimit -Noriko Hosoi2010-06-221-8/+12
| | | | | | | | | | | also applied to "cn=directory manager" https://bugzilla.redhat.com/show_bug.cgi?id=606920 Description: When a timelimit (as well as a sizelimit) is successfully retrieved from SLAPIResLimitConnData, the value is always set to pblock. With this change, it sets "no limit (-1)" if the operation is initiated by Directory Manager.
* Bug 604263 - Fix memory leak when password change is rejected389-ds-base-1.2.6.rc2Nathan Kinder2010-06-151-0/+1
| | | | | | | | | If a password is changed using the password modify extended operation, the modify used to modify the password will be leaked if the change is rejected due to password policy or access control settings. This patch frees the mod when the password change is rejected.
* 574101 - MODRDN request never returns - possible deadlock389-ds-base-1.2.6.rc1Noriko Hosoi2010-06-081-1/+5
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=574101 Description: To create the ID list for child entries of to-be-renamed entry, an inappropriate function (idl_append) was used. The function expects the passed IDs are sorted. If not sorted, idl_insert should be used instead.
* 597375 - Deleting LDBM database causes backup/restore problemNoriko Hosoi2010-06-032-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=597375 Fix Description: 1) When a backend was removed, the db instance directory was removed as well (See also 463774 - index files for database should be deleted when db is deleted). In case DB_RECOVER_FATAL is set in the DB open after the removal (e.g., in restore), the logs in the transaction logs are replayed and compared with the contents of the DB files. At that time, if the db instance directory does not exist, libdb returns FATAL error. To prevent the problem, we have to leave the empty directory. 2) When removing index files, we don't have to open index files with CREAT flag. Note: In the bug 463774, the server was fixed so that once a db backend is removed, the db instance directory is removed. With this fix (597375), the backend removal leaves the empty db instance directory. Plus, if backup is restored, even if the backup was made after the backend is deleted, the restore could create empty DB files in the deleted db instance directory if the transaction log files still contain the history of the deleted backend.
* Bug 595874 - 99user.ldif getting overpopulated389-ds-base-1.2.6.a4Rich Megginson2010-05-261-4/+18
| | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=595874 Resolves: bug 595874 Bug Description: 99user.ldif getting overpopulated Reviewed by: self Branch: HEAD Fix Description: The schema code was adding X-ORIGIN 'user defined' to all schema elements that had no X-ORIGIN. It should only add user defined to schema elements from the user defined schema file, not to schema defined in standard (read only) schema files. It looks like the code should work fine if the schema element has no origin, so there is no reason to add an origin for schema other than user defined schema. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* 511112 - Password history limited to 25 valuessaslbasednNoriko Hosoi2010-05-251-3/+3
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=511112 Fix Description: If an entry already having more than 25 password history attributes is added and password modify is performed on the entry, it overflows the fixed length values_replace array and crashes the server. This patch protects the overflow.
* 595893 - Base DN in SASL mapping is not normalizedNoriko Hosoi2010-05-251-3/+19
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=595893 Fix Description: It must be guaranteed that ndn returned from slapi_sdn_get_ndn is normalized. Putting back the normalization code in slapi_sdn_get_ndn.
* 588867 - entryusn plugin fails on solarisNoriko Hosoi2010-05-211-3/+3
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=588867 Fix description: _sparcv9_AtomicAdd, _sparcv9_AtomicSub, and _sparcv9_AtomicSet were not correctly declared. It brought in the implicit function declaration, where the return value were casted to 32-bit integer and the comparison against the 64-bit unsigned integer failed. The comparison was in the endless loop and it caused the server hang.
* Bug 592389 - Set anonymous resource limits properlyNathan Kinder2010-05-202-3/+36
| | | | | | | | | The anonymous resource limits were not being properly set. This patch ensures that the limits are set properly when an anonymous or unauthenticated BIND operation is performed. It also sets the anonymous limits when we do a read on a connection that has not yet perfomed a BIND. These limits will be overwritten with any default or user-based limits once a valid BIND is performed.
* 593110 - backup-restore does not ALWAYS workNoriko Hosoi2010-05-191-2/+7
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=593110 Fix description: ldap/servers/slapd/back-ldbm/dblayer.c -- A memory area that stores nsslapd-directory was shared between 2 structures: struct ldbminfo and dblayer_private. In dblayer_post_close, dblayer_private is released but not struct ldbminfo. The latter does not know the memory area is freed. This fix changes it so that each structure has its own copy. ldap/servers/plugins/acl/acl.c -- A variable result_status had a chance to be evaluated w/o an initialization.
* 593453 - Creating password policy with ns-newpolicy.pl on ReplicatedNoriko Hosoi2010-05-181-0/+4
| | | | | | | | | | | | Server Causes Crash Fix description: normalized_mods->mod_bvalues is an array of (struct berval *). When slapi_dn_normalize_ext returns an allocated memory (case rc > 0), a new struct berval should have been allocated and the address of the normalized string (normed) and its length (dnlen) should be set in the berval. The struct berval allocation was missing in the previous fix for "Update to New DN Format".
* 591336 - Implementing upgrade DN format toolNoriko Hosoi2010-05-1722-246/+1582
| | | | | | | | | | | | | | | | | | | | | | | | | | Change description: . adding upgradednformat utility to each server instance. . adding 91upgradednformat.pl for in-place-upgrade. . implementing ldbm_back_upgradednformat sharing the import/ reincexing codes. . adding a new DBVERSION ID "dn-4514" for the upgraded db. . fixing access logs (delete.c and modify.c) . fixing compiler warnings. . fixing memory leaks. . fixing a bug in syntax plugin to free strings. . adding templates for plugin id, version, vendor, and description, which are needed for the online upgrade. . dbversion_write takes an additional bit flags, which indicates which extra DBVERSION strings are written to the DBVERSION file. It was introduced for the upgrade tools not to intervene each other's tasks (e.g., dn2rdn for converting entrydn to entryrdn and upgradednformat for upgrading the DN format). . fixing a bug in entryrdn index code which was missing to normalize RDN. See also: https://bugzilla.redhat.com/show_bug.cgi?id=591336 http://directory.fedoraproject.org/wiki/Upgrade_to_New_DN_Format#Migration.2FUpgrade
* 590931 - rhds81 import - hardcoded pages_limit for nsslapd-import-cache-autosizeNoriko Hosoi2010-05-124-51/+104
| | | | | | | | | | | | | | | | | | | | | | | | Fix Description: 1. Got rid of the old hardcoded limit 200MB. 2. Introduced the memory hard limit and soft limit. Standalone command line import ldif2db behaves as follows: If import cache autosize is enabled: nsslapd-import-cache-autosize: -1 or 1 ~ 99 (if the value is greater than or equal to 100, it's reset to 50 with a warning.) the import cache size is calculated as nsslapd-import-cache-autosize * pages / 125 (./125 instead of ./100 is for adjusting the BDB overhead.) If import cache is disabled: nsslapd-import-cache-autosize: 0 get the nsslapd-import-cachesize. Calculate the memory size left after allocating the import cache size. If the size is less than the hard limit, it issues an error and quit. If the size is greater than the hard limit and less than the soft limit, it issues a warning, but continues the import task. Note: this function is called only if the import is executed as a stand alone command line (ldif2db).
* 574167 - An escaped space at the end of the RDN value is notNoriko Hosoi2010-04-271-5/+24
| | | | | | | | | | | | | | | | | | | | handled correctly https://bugzilla.redhat.com/show_bug.cgi?id=574167 Bug Description: If a DN contains "\ " at the end of its RDN, it's be converted to "\20" by slapi_dn_normalize_ext in the add operation. But the following search returns ' ' (not an escaped space). Fix Description: When slapi_dn_normalize_ext was applied to a string which contains "\20", it converted the string to ' '. This fix changes the behaviour so that the string "\20" in DN remains untouched. Also, this patch includes a fix to add a default suffix value with no double quotes in template-suffix-db.ldif.in. We keep double quoted suffix for the backward compatibility.
* Bug 572018 - Upgrading from 1.2.5 to 1.2.6.a2 deletes userRootRich Megginson2010-04-261-0/+6
| | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=572018 Resolves: bug 572018 Bug Description: Upgrading from 1.2.5 to 1.2.6.a2 deletes userRoot Reviewed by: self Branch: HEAD Fix Description: According to the error message, the entry id cannot be found in the id2entry file. The entry id comes from the parentid index, which has just been created by the dn2rdn upgradedb process. The entryid is the key in the parentid index. I'm not sure how this can happen - either the parentid contains the id of an entry that does not exist, or the entryid was somehow corrupted. I've added some additional debugging statements to try to narrow this down. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 145181 - Plugin target/bind subtrees only take 1 value.Endi S. Dewata2010-04-262-16/+74
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=145181 Resolves: bug 145181 Bug Description: Plugin target/bind subtrees only take 1 value. Fix Description: New attributes nsslapd-exclude-targetSubtree and nsslapd-exclude-bindSubtree have been added to specify excluded subtrees. The set_plugin_config_from_entry() has been modified to read multiple subtrees. The plugin_invoke_plugin_sdn() and plugin_allow_internal_op() have been modified to check for excluded subtrees. Reviewed by: rmeggins (and pushed)
* Update to New DN FormatNoriko Hosoi2010-04-2645-396/+2014
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Description: . adding slapi_dn_normalize_ext and its siblings to normalize/validate invalid DNs; deprecating slapi_dn_normalize and its siblings. (dn.c) . replacing slapi_dn_normalize with new corresponding functions. . normalizing hardcoded DNs (e.g., removing spaces around ',') . setting correct DN syntax to nsslapd-suffix, nsslapd-ldapiautodnsuffix, costemplatedn, nsslapd-changelogsuffix, nsBaseDN, nsBindDN . if nsslapd-dn-validate-strict is enabled, incoming DN is examined and rejected if it is invalid. Once approved, the DN is normalized. . fixing compiler warnings and typos. See also: http://directory.fedoraproject.org/wiki/Upgrade_to_New_DN_Format Related bugs: Bug 199923 - subtree search fails to find items under a db containing special characters Bug 567968 - subtree/user level password policy created using 389-ds-console doesn't work. Bug 570107 - The import of LDIFs with base-64 encoded DNs fails, modrdn with non-ASCII new rdn incorrect Bug 570962 - ns-inactivate.pl does not work Bug 572785 - DN syntax: old style of DN <type>="<DN>",<the_rest> is not correctly normalized Bug 573060 - DN normalizer: ESC HEX HEX is not normalized Bug 574167 - An escaped space at the end of the RDN value is not handled correctly
* Fix rsearch usage of name files for random filtersNathan Kinder2010-04-231-1/+1
| | | | | | | | | | | | | The rsearch utility has an option (-i) that allows one to have a file containing names to be used as a variable in search filters. The way this is designed is that you would specify a partial filter (such as "uid=") as the filter option and a random name from the name file will be appended to the filter for each search operation. Unfortunately, this option was broken. The format was missing where we were creating the filter string, which caused the filter option to be used as specified without appending a name from the name file.