summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins
Commit message (Collapse)AuthorAgeFilesLines
...
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-3/+3
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12233 UNINIT Triaged Unassigned Bug Minor Fix Required preop_modify() ds/ldap/servers/plugins/uiduniq/uid.c Comment: This is not an issue since attrName is an output variable for getArguments at the line 689. But to make coverity happy, we init attrName to NULL.
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12230 UNINIT Triaged Unassigned Bug Minor Fix Required preop_add() ds/ldap/servers/plugins/uiduniq/7bit.c Comment: Some cases such as NULL attrName is passed or it does not have a value, uninitialized "violated" is passed to slapi_ch_smprintf via issue_error. We should init violated to NULL. 12231 UNINIT Triaged Unassigned Bug Unspecified Fix Required preop_modify() ds/ldap/servers/plugins/uiduniq/7bit.c Comment: Some cases such as NULL attrName is passed or mods were empty, uninitialized "violated" is passed to slapi_ch_smprintf via issue_error. We should init violated to NULL. 12232 UNINIT Triaged Unassigned Bug Minor Fix Required preop_modrdn() ds/ldap/servers/plugins/uiduniq/7bit.c Comment: Some cases such as NULL attrName is passed or it does not have a value, uninitialized "violated" is passed to slapi_ch_smprintf via issue_error. We should init violated to NULL.
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12225 UNINIT Triaged Unassigned Bug Minor Fix Required windows_private_update_dirsync_control() ds/ldap/servers/plugins/replication/windows_private.c Comment: If DIRSYNC control is not found, uninitialized serverCookie is passed to ber_bvfree. We should init serverCookie to NULL.
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12224 UNINIT Triaged Unassigned Bug Minor Fix Required windows_private_update_dirsync_control() ds/ldap/servers/plugins/replication/windows_private.c Comment: If DIRSYNC control is not found, uninitialized ber is passed to ber_free. We should init ber to NULL.
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12223 UNINIT Triaged Unassigned Bug Minor Fix Required my_ber_scanf_attr() ds/ldap/servers/plugins/replication/repl5_total.c Comment: In case an error occurs between the line 594 and the line 648, uninitialized value is passed to slapi_value_free. Need to init value to NULL
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12222 UNINIT Triaged Unassigned Bug Minor Fix Required replica_get_purl_for_op() ds/ldap/servers/plugins/replication/repl5_plugins.c Comment: In case of an error "cannot obtain consumer connection extension or supplier_ruv", uninitialized purl is returned to the caller. Init purl to NULL
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12221 UNINIT Triaged Unassigned Bug Minor Fix Required create_NSDS50ReplicationExtopPayload() ds/ldap/servers/plugins/replication/repl_extop.c Comment: unlikely to cause a problem, but we should init repl_obj to NULL
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12220 UNINIT Triaged Unassigned Bug Minor Fix Required create_NSDS50ReplicationExtopPayload() ds/ldap/servers/plugins/replication/repl_extop.c Comment: unlikely to cause a problem, but we should init sdn to NULL
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-1/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12216 UNINIT Triaged Unassigned Bug Minor Fix Required private_protocol_factory() ds/ldap/servers/plugins/replication/repl5_protocol.c Comment: should be impossible for type to be anything but one of the valid values, but it wouldn't hurt to init prp to NULL anyway
* 609255 - fix coverity Defect Type: Memory - illegal accesses issuesNoriko Hosoi2010-07-071-4/+18
| | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=609255 12215 UNINIT Triaged Unassigned Bug Minor Fix Required _cl5LDIF2Operation() ds/ldap/servers/plugins/replication/cl5_api.c Comment: should init rawDN to NULL and check if it is NULL before using it. If rawDN is NULL, it returns error CL5_BAD_FORMAT. Comment on the particular rawDN at the line 5218: * When it comes here, case T_DNSTR is already * passed and rawDN is supposed to set. * But it's a good idea to make sure it is * not NULL.
* Bug 611850 - fix coverity Defect Type: Error handling issuesRich Megginson2010-07-063-5/+28
| | | | | | | | | | | | | | | | 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-067-11/+11
| | | | | | | | | | | | | 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 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: ACLPB_MAX_ATTR_LEN is the buffer size including the trailing null, not the strlen. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 609590 - fix coverity Defect Type: Memory - corruptions issuesRich Megginson2010-07-011-0/+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: If there was an error, set filter to NULL so we won't attempt to free static memory. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 603942 - null deref in _ger_parse_control() for subjectdn389-ds-base-1.2.6.rc3Rich Megginson2010-07-011-2/+2
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=603942 Resolves: bug 603942 Bug Description: null deref in _ger_parse_control() for subjectdn Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: Needed to pass &orig to ber_scanf 'a' instead of orig. Also,check for NULL before doing strlen(orig). Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no (cherry picked from commit 82625ebf670c0f234e8bcbf18420e84b325e359e)
* 593899 - adding specific ACI causes very large mem allocate requestNoriko Hosoi2010-05-211-0/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=593899 Additional fix: if a target value is double quoted followed by trailing spaces, the double quotes were not correctly handled. Sample failed case: aci: ( target = "ldap:///ou=organizationalUnit, o=test_ACIs.com" ) ^ Changed to call __acl_strip_trailing_space to remove them.
* Repl Session API needs to check for NULL api before initbug515329.pyRich Megginson2010-05-211-1/+3
| | | | | | | | | The new repl sesssion API will crash when adding a replication agreement. It should check to see if there is a repl session api before attempting to get the init function. Reviewed by: nhosoi Branch: HEAD Platforms tested: RHEL5 x86_64
* 593899 - adding specific ACI causes very large mem allocate requestNoriko Hosoi2010-05-201-26/+62
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=593899 Fix Description: There was a bug if an invalid syntax acl was given (e.g., the value of userdn was not double quoted), normalize_nextACERule mistakenly continued processing the acl and eventually tried to allocate a huge size of memory (since the end address was less than the start address, end - start became negative) and it made the server quit. Added more error handling code to prevent such failures.
* Correct function prototype for repl session hookNathan Kinder2010-05-191-1/+1
| | | | | The previous patch had a mangled function name in the function prototype. This corrects the name.
* Add replication session hooksNathan Kinder2010-05-1912-251/+1257
| | | | | | | | This adds the ability to write a plug-in to register callbacks for controlling when replication is allowed to occur. For details, please see the design document at: http://directory.fedoraproject.org/wiki/Replication_Session_Hooks
* 593110 - backup-restore does not ALWAYS workNoriko Hosoi2010-05-191-1/+1
| | | | | | | | | | | | | | | 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.
* 591336 - Implementing upgrade DN format toolNoriko Hosoi2010-05-171-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 584497 - Allow DNA plugin to set same value on multiple attributesNathan Kinder2010-04-301-115/+352
| | | | | | | | | | | | | | | | | | | | | | | | This patch allows one to set multiple dnaType attributes for a single DNA range. This allows the same value to be used for each dnaType (such as ensuring the uidNumber and gidNumber are the same value from the range when ading a posixAccount). There are some differences with the way DNA works for multi-type ranges. For a value to be generated from a multi-type range, the magic value must be specified to indicate which attributes should use the newly generated value. This allows a range to be shared across different entry types (such as having a uidNumber/gidNumber range that is used or posixAccount and posixGroup entries). A multi-type range will not generate a value for missing attributes as DNA does for single-type ranges. Since a range can have multiple types, the internal ordering of config structs had to be changed to order by scope only. It was previously ordered by type and then scope, which allowed us to easily detect if we had already generated a value for a given type. This change required a number of helper functions to be added for tracking and checking which types we have already generated values for.
* 585905 - ACL with targattrfilters error crashes the serverNoriko Hosoi2010-04-271-1/+25
| | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=585905 Bug Description: targattrfilters takes this format of value: (targattrfilters="add=attr1:F1 && attr2:F2... && attrn:Fn,del=attr1:F1 && attr2:F2 ... && attrn:Fn") The ACL plugin code had blindly expected the value contains the operator "add" or "del" and '=' to concatenate the attribute and filter pair. The plugin should have checked the possibility that the value does not follow the format. Fix Description: If '=' is not included in the targattrfilters value, the ACL parser returns ACL_SYNTAX_ERR. Also, adding a check code for the returned pointer from strchr and strstr.
* Fix too few args for format warning in acllasaclwarnsRich Megginson2010-04-261-2/+2
| | | | Removed unused format arguments from format string
* Update to New DN FormatNoriko Hosoi2010-04-2633-382/+1001
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bug 584109 - Slapd crashes while parsing DNA configurationEndi S. Dewata2010-04-201-1/+2
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=584109 Resolves: bug 584109 Bug Description: Slapd crashes while parsing DNA configuration Fix Description: The dna_parse_config_entry() has been modified to duplicate the shared_cfg_base value to avoid freeing the same memory location twice. Reviewed by: rmeggins (and pushed by)
* Bug 572162 - the string "|*" within a search filter on a non-indexed ↵Rich Megginson2010-04-071-3/+3
| | | | | | | | | | | | | | | | | attribute returns all elements. https://bugzilla.redhat.com/show_bug.cgi?id=572162 Resolves: bug 572162 Bug Description: the string "|*" within a search filter on a non-indexed attribute returns all elements. Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: PCRE interprets the '|' character as the start of alternative branch. In the search filter, the other side of the '|' is empty, which means match everything. The solution is to escape this and other PCRE special chars before matching. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Add managed entries plug-inNathan Kinder2010-04-052-0/+2381
| | | | | | | | | | | This adds a new managed entries plug-in. This plug-in allows one to have the Directory Server automatically maintain a set of entries that are based off of another type of entry (such as user private group entries based off of user entries). For more details, see the design document at: http://directory.fedoraproject.org/wiki/Managed_Entry_Design
* Bug 561575 - setup-ds-admin fails to supply nsds5ReplicaName when ↵Rich Megginson2010-04-051-5/+4
| | | | | | | | | | | | | | | | | configuring via ConfigFile https://bugzilla.redhat.com/show_bug.cgi?id=561575 Resolves: bug 561575 Bug Description: setup-ds-admin fails to supply nsds5ReplicaName when configuring via ConfigFile Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: The main problem was that the mod val was a berval, so we needed |LDAP_MOD_BVALUES for the mod_op. The other problem is that the mod and values were being used out of scope. While this seems to work, it's better to make sure all of the values are in scope. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 455489 - Address compiler warnings about strict-aliasing rulesEndi S. Dewata2010-03-251-1/+3
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=455489 Resolves: bug 455489 Bug description: Address compiler warnings about strict-aliasing rules Fix description: The codes that generate strict-aliasing warnings have been changed. Reviewed by: rmeggins (and pushed by)
* Bug 576074 - search filters with parentheses failRich Megginson2010-03-251-3/+3
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=576074 Resolves: bug 576074 Bug Description: search filters with parentheses fail Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: PCRE requires '(' and ')' to be escaped to match a literal parenthesis. Otherwise, it thinks the parenthesis is used for grouping. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* Bug 520151 - Error when modifying userPassword with proxy userEndi S. Dewata2010-03-243-2/+11
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=520151 Resolves: bug 520151 Bug description: Error when modifying userPassword with proxy user Fix description: The acl_access_allowed() has been modified to call aclplugin_preop_common() which will initialize the aclpb. The aclplugin_preop_common() has been modified to check for the ACLPB_INITIALIZED flag to avoid re-initializing aclpb. Reviewed by: rmeggins (and pushed by)
* 548533 - memory leak in Repl_5_Inc_Protocol_newNoriko Hosoi2010-03-213-14/+56
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=548533 Description: repl5_inc_delete and repl5_tot_delete to release the incremental and total update protocol were not implemented. This fix implemented them. Also, it fixed a leak of connection in private_protocol_factory.
* Bug 470684 - Pam_passthru plugin doesn't verify account activationEndi S. Dewata2010-03-121-2/+15
| | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=470684 Resolves: bug 470684 Bug Description: Pam passthrough doesn't verify account activation Reviewed by: rmeggins Branch: HEAD Fix Description: The check_account_lock() has been renamed to slapi_check_account_lock() and moved into libslapd.so so any plugins can use it. The account_inactivation_only parameter has been replaced by check_password_policy. A new parameter send_result has been added to determine whether to send LDAP results. The pam_passthru plugin has been modified to use this function to check account activation when the pamIDMapMethod is set to ENTRY. The plugin will not check password policy.
* Bug 572677 - Memory leak in searches including GER controlRich Megginson2010-03-121-2/+0
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=572677 Resolves: bug 572677 Bug Description: Memory leak in searches including GER control Reviewed by: Andrey Ivanov (Thanks!) Branch: HEAD Fix Description: The per-operation acl pblocks are cached. In order to release the pblock back to the cache free list, the connection must be provided. The connection comes from the pblock. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* 199923 - subtree search fails to find items under a dbNoriko Hosoi2010-03-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | containing special characters https://bugzilla.redhat.com/show_bug.cgi?id=199923 Description: regression observed in the tests. > as of March 04, 2010, this is happening again. Fix Description: dn.c: Based upon RFC 4514, the following characters in the RDN values need to be escaped: '+', ';', '<', '>', and '=' for the intermediate characters '+', ';', '<', '>', '=', '#' and ' ' for leading characters '+', ';', '<', '>', '=', and ' ' for trailing characters validate.c: If an escaped character followed by another escaped character, e.g., \#\<, the pointer was moved twice skipping '\' before '<' and it makes the validation fail. ldbm_add.c: a local variable addr was not initialized.
* Add support for additional schema/matching rules included with 389Rich Megginson2010-03-091-4/+5
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=559315 Resolves: bug 559315 Bug Description: Searching some attributes are now case sensitive when they were previously case-insensitive Reviewed by: nhosoi (Thanks!) Fix Description: 1) The 60qmail.ldif schema we ship used integerMatch and IA5 syntax because we used not to support numericString syntax and matching rules - these have been changed to use the standard qmail definitions 2) Allow IA5String syntax to use caseExactSubstringsMatch - this is required by krbPrincipalName
* Bug 570905 - postalAddress syntax should allow empty lines (should allow $$)Rich Megginson2010-03-081-12/+16
| | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=570905 Resolves: bug 570905 Bug Description: postalAddress syntax should allow empty lines (should allow $$) Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: Even though RFC 4517 says a postal address syntax value should not contain empty lines (e.g. $$), most, if not all, current applications expect to be able to store $$. This adds an internal switch to allow support for $$ for now. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* cleanup build warningsRich Megginson2010-03-087-10/+10
| | | | | | This patch cleans up various build warnings found by compiling the code with -Wall on RHEL5. Reviewed by: nhosoi (Thanks!)
* 570667 - MMR: simultaneous total updates on the masters causeNoriko Hosoi2010-03-053-0/+58
| | | | | | | | | | | | | | | | | | | | | deadlock and data loss https://bugzilla.redhat.com/show_bug.cgi?id=570667 Description: In the MMR topology, if a master receives a total update request to initialize the other master and being initialized by the other master at the same time, the 2 replication threads hang and the replicated backend instance could be wiped out. To prevent the server running the total update supplier and the consumer at the same time, REPLICA_TOTAL_EXCL_SEND and _RECV bits have been introduced. If the server is sending the total update to other replicas, the server rejects the total update request on the backend. But the server can send multiple total updates to other replicas at the same time. If the total update from other master is in progress on the server, the server rejects another total update from yet another master as well as a request to initialize other replicas.
* fix various memory leaksRich Megginson2010-03-042-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: nhosoi (Thanks!) var/tmp/run_gssapi.vg.25032:Memory leak: 99 bytes duplicates: 5 > malloc() at vg_replace_malloc.c:207 > strdup() at /lib/libc-2.10.2.so > slapi_ch_strdup() at ch_malloc.c:277 > ids_sasl_check_bind() at saslbind.c:924 > do_bind() at bind.c:382 > connection_threadmain() at connection.c:554 > --unknown-- at /lib/libnspr4.so > start_thread() at /lib/libpthread-2.10.2.so > clone() at /lib/libc-2.10.2.so The problem is that ids_sasl_check_bind can reset SLAPI_BIND_TARGET to a malloc'd value. The do_bind() code should check for this condition and free it. var/tmp/entryusn.vg.5997:Memory leak: 8 bytes duplicates: 8 > calloc() at vg_replace_malloc.c:397 > slapi_ch_calloc() at ch_malloc.c:243 > slapi_counter_new() at slapi_counter.c:95 > ldbm_usn_init() at ldbm_usn.c:86 > ldbm_back_start() at start.c:223 > plugin_call_func() at plugin.c:1417 > plugin_dependency_startall.clone.0() at plugin.c:1385 > main() at main.c:1138 The backend cleanup code should free be_usn_counter. var/tmp/ipv6.vg.15561:Memory leak: 13 bytes duplicates: 3 > malloc() at vg_replace_malloc.c:207 > strdup() at /lib/libc-2.10.2.so > slapi_ch_strdup() at ch_malloc.c:277 > config_get_listenhost() at libglobs.c:3674 > main() at main.c:874 var/tmp/ipv6.vg.15561:Memory leak: 13 bytes duplicates: 3 > malloc() at vg_replace_malloc.c:207 > strdup() at /lib/libc-2.10.2.so > slapi_ch_strdup() at ch_malloc.c:277 > config_get_securelistenhost() at libglobs.c:3686 > main() at main.c:881 config_get_listenhost() and config_get_securelistenhost() return malloc'd memory which must be freed. var/tmp/dna_scen1.vg.4901:Memory leak: 248 bytes duplicates: 1 > malloc() at vg_replace_malloc.c:207 > nslberi_malloc() at io.c:1677 > ber_flatten() at io.c:1604 > create_NSDS50ReplicationExtopPayload() at repl_extop.c:218 > NSDS50EndReplicationRequest_new() at repl_extop.c:265 > release_replica() at repl5_protocol_util.c:469 > repl5_inc_run() at repl5_inc_protocol.c:1187 > prot_thread_main() at repl5_protocol.c:341 > --unknown-- at /lib/libnspr4.so > start_thread() at /lib/libpthread-2.10.2.so > clone() at /lib/libc-2.10.2.so The payload was not being freed under all function exit conditions. So, just free it immediately after use. var/tmp/dnarun.vg.2491:Memory leak: 27 bytes duplicates: 0 > malloc() at vg_replace_malloc.c:207 > slapi_ch_malloc() at ch_malloc.c:155 > slapi_entry_attr_get_charptr() at entry.c:2432 > dna_parse_config_entry() at dna.c:816 > dna_pre_op() at dna.c:2587 > plugin_call_func() at plugin.c:1417 > plugin_call_plugins() at plugin.c:1379 > op_shared_add() at add.c:606 > do_add() at add.c:232 > connection_threadmain() at connection.c:564 > --unknown-- at /lib/libnspr4.so > start_thread() at /lib/libpthread-2.10.2.so > clone() at /lib/libc-2.10.2.so The value was not being freed under all conditions. ==9877== 1,890 (252 direct, 1,638 indirect) bytes in 3 blocks are definitely lost in loss record 1,628 of 1,725 ==9877== at 0x47E0E5C: calloc (vg_replace_malloc.c:397) ==9877== by 0x4819D89: slapi_ch_calloc (ch_malloc.c:243) ==9877== by 0x48284A6: slapi_entry_alloc (entry.c:1686) ==9877== by 0x4829BA5: str2entry_dupcheck (entry.c:631) ==9877== by 0x482BB5D: slapi_str2entry_ext (entry.c:1194) ==9877== by 0xB2A8E9D: import_producer (import-threads.c:541) ==9877== by 0x72E1990: (within /lib/libnspr4.so) ==9877== by 0x731E8F4: start_thread (in /lib/libpthread-2.10.2.so) ==9877== by 0x75B2FCD: clone (in /lib/libc-2.10.2.so) Make sure the entry or backentry are freed.
* 539618 - Replication bulk import reports Invalid read/writeNoriko Hosoi2010-03-033-38/+27
| | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=539618 Back off this commit: commit 4205086e4f237a52eb9113cd95f9cf87b39e9ed4 Date: Mon Feb 22 08:49:49 2010 -0800 since this change could cause the deadlock between the thread eventually calling prot_free, which acquired the agreement lock, and other threads waiting for the agreement lock, which prevents the protocol stop. Instead of waiting for prot_thread_main done in prot_free, let prot_thread_main check the existence of the protocol field in the agreement. If it's not available, prot_thread_main quits.
* 555970 - missing read lock in the combination of cos and nsviewNoriko Hosoi2010-02-281-0/+4
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=555970 Description: view read lock was missing in a view api called from COS.
* 389 DS segfaults on libsyntax-plugin.so - part 3Rich Megginson2010-02-261-1/+1
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=516611 Resolves: bug 516611 Bug Description: 389 DS segfaults on libsyntax-plugin.so - part 3 Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: bin_filter_ava should check for null bvals Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* 389 DS segfaults on libsyntax-plugin.so - part 1Rich Megginson2010-02-261-3/+3
| | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=516611 Resolves: bug 516611 Bug Description: 389 DS segfaults on libsyntax-plugin.so - part 1 Reviewed by: nkinder (Thanks!) Branch: HEAD Fix Description: Check for NULL bvals in the string syntax filter functions ava, sub, and key generation Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* crash looking up compat syntax; numeric string syntax using integer; make ↵Rich Megginson2010-02-232-18/+36
| | | | | | | | | | | | | | octet string ordering work correctly https://bugzilla.redhat.com/show_bug.cgi?id=559315 Resolves: bug 559315 Bug Description: Searching some attributes are now case sensitive when they were previously case-insensitive Reviewed by: nhosoi (Thanks!) Branch: HEAD Fix Description: slapi_matchingrule_is_compat() was not checking for NULL; the matching rule syntax plugin was registering with the INTEGER syntax oid; the bin_filter_ava() function needs to be ordering aware to implement the octetStringOrderingMatch; in default_mr_filter_create(), make sure the requested matching rule is provided by the given plugin Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no
* 539618 - Replication bulk import reports Invalid read/writeNoriko Hosoi2010-02-223-8/+36
| | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=539618 Descriptions: When a protocol is freed by prot_free, prot_close is supposed to have been called to stop the main thread prot_thread_main. But, there was no mechanism for the freeing thread whether the prot_thread_main has already quitted or not, it could have released the Repl_Protocol even though it was still being in use. This fix is adding a checking method. The same test revealed ldbm_back_modrdn had a chance to access a field of NULL entry structure.
* 527848 - make sure db upgrade to 4.7 and later works correctlyNoriko Hosoi2010-02-181-16/+22
| | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=527848 Change Description: 1. Replication Changelog 1-1. In the clean recover mode, transaction logs should not be removed. 1-2. When nsslapd-db-circular-logging is on (by default, it's on), call log_archive function with DB_ARCH_REMOVE, which removes log files that are no longer needed. 1-3. Call transaction checkpoint just before shutting down the server. 1-4. "From string" in the upbrade message had a flaw. 2. Backend dblayer 2-1. In checkpoint_threadmain, call log_archive with DB_ARCH_ABS, which returns the absolute path of the transaction log files. It eliminates the code which generates the absolute paths.
* change syntax plugins to register required matching rule pluginsRich Megginson2010-02-1711-60/+959
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=559315 Resolves: 559315 Description: Searching some attributes are now case sensitive when they were previously case-insensitive Reviewed by: nhosoi (Thanks!) - also added some suggested comments I added code to allow the syntax plugins to register corresponding matching rules. That is, the functions that the syntax plugins use for filter matching and key generation can also be used for matching rules with the new wrapper code. I added some convenience functions and structures in the syntax plugin code to make it easier to add matching rules in the future. I also added a new feature to the matching rule code - in the LDAP spec definition of matching rule, the syntax provided in the matching rule definition is the syntax for the _assertion value_ used with the matching rule, which is not necessarily the same as the syntax of the _attribute values_ to which the matching rule can be applied. For example, matching rules that apply to syntax DirectoryString can also be applied in some cases to PrintableString, CountryString, and IA5String. There are several other cases like this as well. I also introduced the concept of a compat syntax that can be used with a matching rule. The server will now check, when reading in the schema, if the syntax and matching rules for an attribute are consistent. Finally, for 05rfc4523.ldif, I changed the attributes to use octetStringMatch instead of one of the unimplemented certificate matching rules.