summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/acl
Commit message (Collapse)AuthorAgeFilesLines
* Bug 244229 - targetattr not verified against schema when setting an aciNoriko Hosoi2010-10-154-36/+59
| | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=244229 Description: 1. When acl contains targetattr keyword: (targetattr [!]= "attribute_1 || attribute_2 ...|| attribute_n"), where attribute_n does not contain '*', the current ACL plugin accepts any attribute_n value even if it is not defined in the schema. This patch rejects the aci if it contains attribute_n not defined in schema with this error message: NSACLPlugin - targetattr "attribute_n" does not exist in schema. Please add attributeTypes "attribute_n" to schema if necessary. The message is logged in the error log as well as returned to the client. 2. To implement 1, slapi APIs slapi_attr_syntax_exists is added. 3. An attributeTypes "connection" is added to 01core389.ldif which is referred in an aci of cn=monitor.
* Bug 631993 - Log authzid when proxy auth control is usedNathan Kinder2010-10-084-251/+2
| | | | | | This patch makes the access log entries for search, add, mod, del, and modrdn operations display the authzid that is used when the proxy authorization control is sent by the client.
* openldap ber_init will assert if the bv->bv_val is NULLRich Megginson2010-10-011-0/+4
| | | | | | | | | | Have to ensure that all usage of ber_init in the server checks to see if the bv->bv_val is non-NULL before using ber_init, and return the appropriate error if it is NULL Also fixed a problem in dna_extend_exop - would not send the ldap result to the client in certain error conditions Reviewed by: nhosoi (Thanks!) Tested on: RHEL5 x86_64
* Bug 630092 - Coverity #11991: Resource leaks issuesEndi Sukma Dewata2010-09-171-3/+1
| | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=630092 Description: The acllas__client_match_URL() has been modified to release the hostport before it returns.
* Bug 630097 - (cov#15477) NULL dereference in ACL plug-in codeNathan Kinder2010-09-151-0/+6
| | | | | | | | We need to check if aclpb is NULL before dereferencing it. The proper thing to do here is to make aclplugin_preop_common() return an error to the LDAP client and to return 1 since the whole purpose of this function is to initialize the aclpb. Doing this will avoid the NULL dereference.
* Bug 630097 - (cov#15460) NULL deference in ACL URL codeNathan Kinder2010-09-151-2/+2
| | | | | | When parsing a URL without a host or port present, we can dereference a NULL pointer. We need to check if hostport is NULL before dereferencing it.
* bug 614511 - fix coverity null reference - revert macro aci $dn logicRich Megginson2010-09-011-4/+6
| | | | | | instead of changing the logic to catch matched_val == NULL, make the code work like it does in earlier releases, but add an explicit check for matched_val == NULL to avoid using it.
* implement slapi_ldap_explode_dn and slapi_ldap_explode_rdnRich Megginson2010-08-312-4/+4
| | | | | | | | | | | | The DS has some problems with the openldap versions of these functions: 1) They are deprecated - should use the str2[r]dn and [r]dn2str and the bv versions of those functions instead 2) They escape utf-8 and other values in the strings - the mozldap functions do not do this 3) They handle double quoted strings, but they remove the quotes - our code expects the quotes to be left in place Until we fix our DN handling, and get rid of the double quoted DNs, we just use the mozldap versions of these functions.
* do not un-null-terminate normalized DN until new url is constructedRich Megginson2010-08-311-27/+21
| | | | | | rawdn may be normalized in place - if we add back the '?' to the URL before we construct the new URL with the normalized DN, we will create a bogus URL string - so delay that until we construct the new URL
* use slapi_ldap_url_parse in the acl codeRich Megginson2010-08-311-8/+33
| | | | | I missed a couple of places in the acl code that should use slapi_ldap_url_parse - I also added some more debugging
* ger should support both "dn" and "distinguishedName"Rich Megginson2010-08-261-1/+2
| | | | | the name "dn" is being deprecated - the standard attribute name is "distinguishedName" - ger should support both of these
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-1/+6
| | | | | | | | | 11940 - 12166 https://bugzilla.redhat.com/show_bug.cgi?id=611790 Resolves: bug 611790 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166 Fix description: Catch possible NULL pointer in print_access_control_summary().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Noriko Hosoi2010-08-231-11/+18
| | | | | | | | | 11940 - 12166 https://bugzilla.redhat.com/show_bug.cgi?id=611790 Resolves: bug 611790 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166 Fix description: Catch possible NULL pointer in acl_match_macro_in_target().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Noriko Hosoi2010-08-231-26/+30
| | | | | | | | | | 11940 - 12166 https://bugzilla.redhat.com/show_bug.cgi?id=611790 Resolves: bug 611790 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11940 - 12166 Fix description: Catch possible NULL pointer in acllas_replace_attr_macro(). coverity ID: 11961
* Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053Endi S. Dewata2010-08-191-7/+13
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=619122 Resolves: bug 619122 Bug description: fix coverify Defect Type: Resource leaks issues CID 11994. description: The acl__malloc_aclpb() has been modified to release resources when an error occurs.
* Bug 619122 - fix coverify Defect Type: Resource leaks issues CID 11975 - 12053Endi S. Dewata2010-08-191-22/+25
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=619122 Resolves: bug 619122 Bug description: fix coverify Defect Type: Resource leaks issues CID 11991. description: The acllas__client_match_URL() has been modified to set/allocate and release hostport only when it receives ldap(s)://host:port/ URL.
* Bug 614511 - fix coverity Defect Type: Null pointer dereferences issues ↵Noriko Hosoi2010-08-191-8/+7
| | | | | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 11856 Comment: If the aci "rule" does not include "($dn)", there is no pointer assigined to aci_macro and matched_val is NULL. In that case, acllas_replace_dn_macro is supposed to return just "user" itself regardless of [$dn].
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-1/+6
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acl_operation_ext_destructor() and acl_init_aclpb().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-3/+8
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acl_access_allowed_main().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-3/+9
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in __acllist_add_aci() and acllist_aciscan_update_scan().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-2/+14
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acllas__client_match_URL() and acllas__user_has_role().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-2/+7
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in aclg_get_usersGroup().
* Bug 614511 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-191-5/+20
| | | | | | | | | 11846 - 11891 https://bugzilla.redhat.com/show_bug.cgi?id=614511 Resolves: bug 614511 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 11846 - 11891 description: Catch possible NULL pointer in acl_access_allowed() and acl__TestRights().
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "ptr" assignment on line 2622 is unnecessary because the value is never used. The "word" assignment on line 2630 can be removed because the first token is ignored. Alternatively the value should be validated. The "ptr" assignment on line 1456 is unnecessary because the value is not used. The "word" assignment on line 1463 can be removed because the first token is ignored. Alternatively the value should be validated. The "ptr" assignment on line 1210 is unnecessary because the value is never used. The "word" assignment on line 1217 can be removed because the first token is ignored. Alternatively the value should be validated.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-6/+6
| | | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The "word" assignment on line 961 and 963 is unnecessary because the value will be overwritten. Comment: The "s" assignments on line 271, 280, and 281 are unnecessary because the value is never used.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-2/+0
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The call to strchr() is unnecessary because strcpy() will ensure that string p is NULL-terminated.
* Bug 622903 - fix coverity Defect Type: Code maintainability issuesNoriko Hosoi2010-08-111-1/+1
| | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=622903 Comment: The str assignment on line 1240 can be removed because the value is not needed or will be overwritten.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-9/+3
| | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11795 DEADCODE Triaged Unassigned Bug Minor Fix Required DS_LASRoleDnAttrEval() ds/ldap/servers/plugins/acl/acllas.c Comment: Merged the 2 lines to check matched with ACL_TRUE into one.
* 610281 - fix coverity Defect Type: Control flow issuesNoriko Hosoi2010-07-231-1/+1
| | | | | | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=610281 11792 DEADCODE Triaged Unassigned Bug Minor Fix Required acl__match_handlesFromCache() ds/ldap/servers/plugins/acl/acl.c Comment: Looks like a simple copy & paste bug. Replaced the macro to compare ACLPB_HAS_ACLCB_EVALCONTEXT with ACLPB_EVALCONTEXT_ACLCB.
* 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 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.
* 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.
* 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.
* 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-269-267/+516
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 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)
* 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
* cleanup build warningsRich Megginson2010-03-081-1/+0
| | | | | | This patch cleans up various build warnings found by compiling the code with -Wall on RHEL5. Reviewed by: nhosoi (Thanks!)
* Allow modrdn to move subtree and rename non-leaf nodeNoriko Hosoi2010-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This patch includes - replacing the entrydn index with the entryrdn index - replacing a full DN in each entry in the DB with an RDN - extending Slapi_Entry, entry2str, and str2entry to absorb the changes made on the entry - adding DN/RDN helper functions - adding DN cache - adding a utility and a migration script to convert the DN format database to the RDN format - extending a database dump utility dbscan to support the entryrdn - slapi_dn_syntax_check by nkinder@redhat.com is added to check the dn before modify operations - big fix for 171338 - Enhancement: winsync modrdn not synced In addition to the above, compile warnings and memory leaks found in testing the new feature are fixed. For more details, see the feature design document at: http://directory.fedoraproject.org/wiki/Subtree_Rename and bugzilla at: https://bugzilla.redhat.com/show_bug.cgi?id=171338
* Implement support for versioning and release engineering procedures - ↵389-ds-base-1.2.5.a1Rich Megginson2009-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | version 1.2.5.a1 Instead of changing configure.ac AC_INIT for each version change, there is a new file - VERSION.sh. This file also contains support for creating version numbers for pre-releases, and pre-release strings containing git commit hashes. One of the complications is that AC_INIT does not allow you to override the version and package tarname fields. We can override them after the fact everywhere except in config.h. AC_INIT defines the following which we would like to override but cannot: PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_STRING PACKAGE_BUGREPORT Instead, we define DS_ versions of these e.g. DS_PACKAGE_VERSION etc. and make these available with AC_DEFINE(DS_PACKAGE_VERSION,...) etc. As an extra added precaution, we undefine these in Makefile.am like this: DS_DEFINES = ... \ -UPACKAGE_VERSION -UPACKAGE_TARNAME -UPACKAGE_STRING -UPACKAGE_BUGREPORT If someone tries to use PACKAGE_VERSION in C code, they will not be able to, and will have to use DS_PACKAGE_VERSION instead. All of the DS code that used PACKAGE_VERSION has been changed to use DS_PACKAGE_VERSION instead. There is a new make target - git-archive - as a convenience for creating source tarballs from git. By default, the source archive will be placed in the build directory - you can specify SRCDISTDIR=/path/to/SOURCES to use an alternate dir (e.g. make SRCDISTDIR=/path/to/rpmbuild/SOURCES git-archive to make a source tarball for rpmbuild) configure will print the branded package name and version Reviewed by: nkinder (Thanks!)
* Add ssf bind rule to access control plug-in.Nathan Kinder2009-10-026-15/+204
| | | | | | | | | | | This patch adds a new ssf bind rule keyword to the access control plug-in. This allows you to write ACIs that require a specific level of encryption for the rule to apply. The new keyword can be used with '=', '!=', '<', '>', '<=' and '>=' comparators. I added code that stores the SSF in effect for an operation into the operation struct. The value that we store is the higher of the two between the SASL SSF and the SSL/TLS SSF.
* Change default branding to 389 - remove lite codeRich Megginson2009-08-112-4/+2
| | | | | | | | | | | | | | | | | | | The vendor, brand, and capbrand are set in configure - we should use those everywhere rather than have to run some sort of script over the code to change vendor, brand, version, etc. I've added VENDOR, BRAND, CAPBRAND to the default defines passed to the compiler, and changed the code to use these defines. And instead of the unintuitively named PRODUCTTEXT macro, we should use the already defined PRODUCT_VERSION. This allowed me to get rid of some code. The version was from a generated file called dirver.h which we don't need anymore, and we don't need the perl script dirver.pl which generated it. The vendor string was coming from the dirlite header file. So I also used this as an excuse to get rid of all references to dirlite once and for all (yay!). For the places in plain text files which are not substituted, I just used the generic name Dirsrv or Directory Server instead of having an explicit brand and/or version in there. Reviewed by: nkinder (Thanks!)
* Bug 514848: Make selfwrite ACI keyword with with Name And Optional UID ↵Nathan Kinder2009-07-301-2/+3
| | | | | | | | | syntax attributes. The selfwrite ACI keyword currently only applies when writing to attributes using the Distringuished Name syntax. It needs to also work with the Name And Optional UID syntax since that is the syntax used for the uniqueMember attribute.
* Bug 514824: Fix double free in macro ACI code.Nathan Kinder2009-07-301-5/+15
| | | | | | | | | | | | | If you have an ACI with multiple macros in it and the second attribtue does not exist in the entry you are bound as, the in-memory list used for macro substitution is free'd twice. The code swaps hands the charray it plans to return after substitution over to a working list, but it doesn't set the return list to NULL. When the second macro attribute is not found, the working list is free'd, yet the address is returned to the caller, who then tries to free the list a second time. The fix is to set the list to be returned to NULL when the memory is handed over to the working list.
* Reduce noise reported by valgrindRich Megginson2009-07-142-6/+8
| | | | | | | | | | | | | | | | | | | valgrind is a very useful tool - however, the directory server produces a lot of false positives that have to be suppressed in order to get to the useful information. These patches attempt to reduce some of that noise. 1) aclparse - should calculate the length of the string _after_ trimming the spaces 2) something about random number generation causes some of the bits to be uninitialized, and valgrind doesn't like it - this patch doesn't eliminate the error, just reduces it 3) use initialized memory when generating hashes - also remove "magic numbers" 4) bin.c - slapi_value_get_string must not be used with unterminated (binary) values 5) we get these odd valgrind reports from deep within bdb about invalid reads and uninitialized memory - I thought perhaps because we were initializing DBT structures with = {0} which the bdb docs says is not sufficient - they recommend memset or bzero 6) There are some small memory leaks during attrcrypt initialization and in error cases 7) error message in ldif2ldbm.c was attempting to print the Slapi_DN structure rather than getting the char *dn 8) After we call NSS_Initialize, we must call the NSS shutdown functions to clean up the caches and other data structures, otherwise NSS will leak memory. This is harmless since it happens at exit, but valgrind reports hundreds of memory leaks. The solution is to make sure we go through a single exit point after NSS_Initialize. This means many places that just called exit() must instead return with a real return value. This mostly affected main.c, detach.c, and a couple of other places called during startup. 9) minor memory leaks in mapping tree initialization 10) sasl_map.c - should not call this in referral mode 11) minor memory leaks during ssl init Reviewed by: nkinder, nhosoi (Thanks!)
* Clean up compiler warningssmallcleanupbasecleanupRich Megginson2009-07-072-5/+12
| | | | | | This cleans up all of the compiler warnings produced with -Wall on RHEL/Fedora platforms. The warnings about the %lld and %llu formats are still produced and cannot be helped. Reviewed by: nkinder (Thanks!)
* OpenLDAP supportcleanupRich Megginson2009-07-072-4/+4
| | | | | | | | | | These changes allow the server to be built with OpenLDAP (2.4.17+). A brief summary of the changes: * #defines not provided by OpenLDAP were copied into slapi-plugin.h and protected with #ifndef blocks * where it made sense, I created slapi wrapper functions for things like URL and LDIF processing to abstract way the differences in the APIs * I created a new file utf8.c which contains the UTF8 functions from MozLDAP - this is only compiled when using OpenLDAP * I tried to clean up the code - use the _ext versions of LDAP functions everywhere since the older versions should be considered deprecated * I removed some unused code NOTE that this should still be considered a work in progress since it depends on functionality not yet present in a released version of OpenLDAP, for NSS crypto and for the LDIF public API.
* 506137 ns-slapd hang while group aci performance testingNoriko Hosoi2009-06-261-29/+35
| | | | | | | | | | | | | Bug description: If a group has more than 32767 members (max short), a variable 'n' declared as short overflows. The value is used to calculate an array size to store group member info, which memory is not properly allocated and it ends up crashing up the server. Fix description: Replaced the problematic short variable type with integer. Plus, the each member info was storing a pointer pointing to an element inside of the array. When the array is "realloc"ed, it's possible for the addresses to be relocated. To solve the problem, the new code stores the index of array instead of the address.