summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/sasl_map.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Allow modrdn to move subtree and rename non-leaf nodeNoriko Hosoi2010-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Reduce noise reported by valgrindRich Megginson2009-07-141-0/+5
| | | | | | | | | | | | | | | | | | | 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-071-1/+1
| | | | | | 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!)
* 504383 PCRE breaks SASL MappingNoriko Hosoi2009-06-231-1/+24
| | | | | | | Fix Description: unescape parenthesis in the regular expression. E.g., ^u:\(.*\) ==> ^u:(.*) This unescape is necessary for the new regex code using PCRE to keep the backward compatibility.
* Use thread aware library for complex regex searchesNoriko Hosoi2009-05-281-22/+58
| | | | | | | | For more details, see the design doc at http://directory.fedoraproject.org/wiki/Thread_Aware_Regex Additional 2 unrelated changes are being made: 1) dbgen.pl.in: secretary and manager are having a dn format value "cn=...". 2) slapi_counter_sunos_sparcv9.S: adding "#define _ASM 1" to force to set an assembler code macro _ASM.
* Resolves: bug 469261Rich Megginson2008-12-021-0/+4
| | | | | | | | | | | | | Bug Description: Support server-to-server SASL - console chaining, server cleanup Reviewed by: nkinder (Thanks!) Fix Description: There are two sets of diffs here. The first set adds tls, gssapi, and digest to the chaining database (aka database link) panels in the console. I had to add support for revert to some of the code to make the Reset button work without having to retrieve the values from the server each time. We already store the original values locally in the _origModel - I added code to allow the use of that in the Reset button. The second set of diffs is for the server. 1) I had to add support for "SIMPLE" for bindMechanism - this translates to LDAP_SASL_SIMPLE for the actual mechanism. This value is NULL, so I had to add handling for NULL values in the cb config code (slapi_ch_* work fine with NULL values). 2) Added some more debugging/tracing code 3) The server to server SSL code would only work if the server were configured to be an SSL server. But for the server to be an SSL client, it only needs NSS initialized and to have the CA cert. It also needs to configured some of the SSL settings and install the correct policy. I changed the server code to do this. Platforms tested: RHEL5 Flag Day: no Doc impact: Yes
* Resolves: #459302Noriko Hosoi2008-11-061-3/+20
| | | | | | | Summary: SASL MAP: memory leak in sasl_map_init Fix Description: sasl_map_done put just comments to free the map list and the private structure, but not implemented them. Added the code to release the map list and the private structure.
* Resolves: bug 469261Rich Megginson2008-11-051-1/+7
| | | | | | | | | | | | | | | | Bug Description: Support server-to-server SASL - part 2 Reviewed by: nhosoi (Thanks!) Fix Description: This part focuses on chaining backend - allowing the mux server to use SASL to connect to the farm server, and allowing SASL authentication to chain. I had to add two new config parameters for chaining: nsUseStartTLS - on or off - tell connection to use startTLS - default is off nsBindMechanism - if absent, will just use simple auth. If present, this must be one of the supported mechanisms (EXTERNAL, GSSAPI, DIGEST-MD5) - default is absent (simple bind) The chaining code uses a timeout, so I had to add a timeout to slapi_ldap_bind, and correct the replication code to pass in a NULL for the timeout parameter. Fixed a bug in the starttls code in slapi_ldap_init_ext. The sasl code uses an internal search to find the entry corresponding to the sasl user id. This search could not be chained due to the way it was coded. So I added a new chainable component called cn=sasl and changed the sasl internal search code to use this component ID. This allows the sasl code to work with a chained backend. In order to use chaining with sasl, this component must be set in the chaining configuration nsActiveChainingComponents. I also discovered that password policy must be configured too, in order for the sasl code to determine if the account is locked out. I fixed a bug in the sasl mapping debug trace code. Still to come - sasl mappings to work with all of this new code - kerberos code improvements - changes to pta and dna Platforms tested: Fedora 8, Fedora 9 Flag Day: yes Doc impact: yes
* Resoves: #448831Noriko Hosoi2008-06-301-2/+3
| | | | | | | | Summary: attacker can tie up CPU in regex code Description: when substring search is requested, sets the time limit based upon the nsslapd-timelimit value. Pass the timelimit (time_up) to the regular expression function. When the time is up, it returns the "Timelimit exceeded" error. Note: timelimit is applied non-Directory Manager users.
* Resolves: #214533Noriko Hosoi2006-11-101-0/+5
| | | | | | | | | | Summary: configure needs to support --with-fhs (Comment #6) Changes: Added the following include next to the end of the copyright block. + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif +
* Fix for 155141: bug in linked list codeDavid Boreham2005-04-251-2/+2
|
* Fixed licensing typoNathan Kinder2005-04-191-1/+3
|
* 155068 - Added license to source filesNathan Kinder2005-04-151-0/+30
|
* clean up sprintf usage and many other flawfinder issues; clean up compiler ↵Rich Megginson2005-03-051-4/+3
| | | | warnings on Linux; remove pam_passthru from DS 7.1
* 149951 - Updated source code copyrightsNathan Kinder2005-02-281-1/+1
|
* Always use the internal regex functions : checkin lost in the AOL/RH move.David Boreham2005-01-281-3/+0
|
* Moving NSCP Directory Server from DirectoryBranch to TRUNK, initial drop. ↵ldapserver7xcvsadm2005-01-211-0/+472
(foxworth)