summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* implement slapi_ldap_explode_dn and slapi_ldap_explode_rdnopenldapRich Megginson2010-08-3116-42/+304
| | | | | | | | | | | | 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
* check src < *out only; only check for \nspace if src < *out - 2Rich Megginson2010-08-311-2/+2
| | | | | | | *out will never be NULL here, so we only need to check that src < *out as the loop condition when looking for a continuation line, make sure there are two characters in *out to check
* move the out pointer back if continuation lines were removedRich Megginson2010-08-311-0/+1
| | | | | | when putting ldif data with the no wrap option, if we removed some continuation lines, we have to move the output data pointer back since the continuation line markers are removed in place
* convert mozldap host list to openldap uri listRich Megginson2010-08-311-4/+77
| | | | | | | | mozldap accepts hostnames in the form host1[:port1] ... hostN[:portN] in the ldap_init argument and in ldap urls/uris. DS code uses ldap_initialize() which takes a list of uris in the form ldap[s]://host1[:port1]/ ldap[s]://host2[:port2]/ ... We have to convert the host:port list into a list of LDAP uris
* slapi_ldap_url_parse must handle multiple host:port in urlRich Megginson2010-08-311-5/+94
| | | | | | | mozldap supports a non-standard URL extension which allows multiple host:port combinations - openldap does not support this - fake out openldap by converting spaces to %20 and all but the last colon to %3A before calling ldap_url_parse, then unescape ludp->lud_host before returning
* do not terminate unwrapped LDIF line with another newlineRich Megginson2010-08-311-1/+0
| | | | | The function ldif_sput already terminates the line with a newline character - we do not need to add another one when unwrapping a wrapped line.
* openldap_read_function needs to set EWOULDBLOCK if the buffer is emptyRich Megginson2010-08-311-0/+8
| | | | | | If the openldap_read_function has returned all of the buffered data, it needs to set errno to EWOULDBLOCK to let the code know that it needs to read more data into the buffer.
* have to use LDAP_OPT_X_TLS_NEVER to defeat cert hostname checkingRich Megginson2010-08-311-1/+1
| | | | | | | Even though the ldap.conf man page is not really clear about this, looking at the code in libraries/libldap/tls2.c:ldap_int_tls_start() if you don't specify LDAP_OPT_X_TLS_REQUIRE_CERT as LDAP_OPT_X_TLS_NEVER it will check the hostname
* openldap ldapsearch returns empty line at end of LDIF outputRich Megginson2010-08-313-3/+3
| | | | | | The script was looking for 1 and only 1 line returned by the ldapsearch to see if the given entry is a role. openldap ldapsearch returns an empty line as the last line. So just change the check to look for 1 or more lines.
* add ldaptool_opts for the non BUNDLE case in Makefile.amRich Megginson2010-08-312-0/+2
| | | | forgot to add ldaptool_opts for the non BUNDLE case in Makefile.am
* openldap ldapsearch uses -LLL to suppress # version: NRich Megginson2010-08-3110-7/+21
| | | | | mozldap uses -1 but openldap uses -LLL to suppress printing the in ldapsearch output - add a flag for this
* fix the url_parse logic when looking for a missing suffix DNRich Megginson2010-08-312-2/+5
| | | | | | The logic looking for a missing suffix DN in a parsed URL was incorrect. In addition, since passthru requires a suffix DN, pass the require_dn flag.
* ber_printf 'o' cannot handle NULL bv_valRich Megginson2010-08-311-2/+2
| | | | | | The value passed to the char * argument to ber_printf 'o' must not be a NULL, even if the bv_len argument is 0. An empty string "" must be passed instead.
* use strcasecmp with ptype and type->bv_valRich Megginson2010-08-311-1/+1
| | | | both ptype and type->bv_val are properly null terminated strings
* fix some compiler warningsRich Megginson2010-08-313-2/+1
|
* document slapi wrappers for openldap/mozldap functions that differRich Megginson2010-08-315-13/+101
| | | | | | | There are slapi wrappers that hide differences between the openldap and mozldap ldap and ldif API code. These are now doxygen documented. Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* use the mozldap versions of the proxy auth control create functionRich Megginson2010-08-311-4/+9
| | | | | | Since these functions are present in mozldap, just use them directly Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* port client tools to use openldap APIRich Megginson2010-08-312-14/+71
| | | | | | | | | There are some differences between the mozldap and the openldap apis: openldap has deprecated ldap_init in favor of ldap_initialize openldap has deprecated the regular ldap op functions in favor of their _ext alternatives Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* openldap - add support for missing controls, add ldif api, fix NSS usageRich Megginson2010-08-3112-283/+401
| | | | | | | | | | | Added proxy auth control creation - mozldap has a function to do that but not openldap Do not use mozldap filter create function - just create one using slapi_smprintf Fix usage of TLS/SSL with new NSS functionality Created ldif parse wrapper - changed code to use it Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* Add -x option to ldap tools when using openldapRich Megginson2010-08-3131-21040/+31485
| | | | | | | | | | We have many scripts that use ldapsearch, ldapmodify, etc. All of these currently use simple auth. When using the openldap versions of these scripts, we have to pass the -x argument to use simple auth. A new configure parameter ldaptool_opts is used to pass this down into the scripts. Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* fix memleak in ldbm_config_read_instance_entriesRich Megginson2010-08-311-0/+1
| | | | | | need to free basedn after use by the internal search Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* openldap - ldap_url_parse_ext is not part of the public apiRich Megginson2010-08-311-1/+1
| | | | | | | even though AC_CHECK_LIB finds ldap_url_parse_ext, that function is not part of the public api Reviewed by: nkinder (Thanks!) Platforms tested: Fedora 14 (rawhide)
* Bug 620927 - Allow multiple membership attributes in memberof pluginNathan Kinder2010-08-305-188/+514
| | | | | | | | | | This patch allows multiple memberOfGroupAttr values to be set in the memberOf plug-in config. This allows different grouping attributes to be used. For more details, see the design doc: http://directory.fedoraproject.org/wiki/MemberOf_Multiple_Grouping_Enhancements
* 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 617630 - fix coverify Defect Type: Resource leaks issues CID 12052 - 12093Noriko Hosoi2010-08-251-2/+2
| | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=617630 Bug description: CID 12090 was a false positive description: Undo the commit e23c8bd9994d5592738cb44e1c2b426aba7fbd4a
* Removed redundant code in agmt_new_from_entryNoriko Hosoi2010-08-251-5/+1
| | | | (ldap/servers/plugins/replication/repl5_agmt.c)
* postalAddress syntax does not accept empty valuesRich Megginson2010-08-241-3/+3
| | | | | | The postal_validate() function cannot accept an empty string as a valid value of postalAddress syntax. In addition, we were not properly checking a value which did not contain a '$' character.
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Noriko Hosoi2010-08-231-2/+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 ruv_get_replica_generation(). Note: committing the fix on behalf of Endi (edewata@redhat.com).
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Noriko Hosoi2010-08-231-2/+10
| | | | | | | | | | | 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 cos_cache_add_defn(). Note: committing the fix on behalf of Endi (edewata@redhat.com).
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-3/+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 ResHashCreate().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-0/+1
| | | | | | | | | 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 ldapu_cert_mapfn_default().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-2/+2
| | | | | | | | | 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 send_specific_attrs().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-35/+25
| | | | | | | | | 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 plugin_invoke_plugin_sdn().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-0/+2
| | | | | | | | | 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 dblayer_sys_pages().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-3/+16
| | | | | | | | | 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 description: Catch possible NULL pointer in roles_cache_update() and roles_is_entry_member_of_object_ext().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-4/+11
| | | | | | | | | 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 age_str2time().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-17/+24
| | | | | | | | | | 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 map_dn_values(), map_entry_dn_outbound(), and windows_generate_update_mods().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-0/+7
| | | | | | | | | 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 windows_search_entry_ext().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-0/+16
| | | | | | | | | 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 replica_new_from_entry() and _replica_configure_ruv().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-35/+46
| | | | | | | | | 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 sendGetReq(), sendPostReq(), and parseAtPath().
* 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-4/+12
| | | | | | | | | | 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: Use the right pointer in LASIpAddPattern(). coverity ID: 11945
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-3/+8
| | | | | | | | | 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 my_ber_scanf_value() and my_ber_scanf_attr().
* Bug 611790 - fix coverify Defect Type: Null pointer dereferences issues ↵Endi S. Dewata2010-08-231-18/+34
| | | | | | | | | | | | | | | 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: - cl5CreateReplayIteratorEx() - cl5CreateReplayIterator() - _cl5GetRUV2Purge2() - _cl5GetOperation() - _cl5PositionCursorForReplay() - _cl5NewDBFile()
* 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 610119 - fix coverify Defect Type: Null pointer dereferences issues ↵Noriko Hosoi2010-08-231-14/+31
| | | | | | | | | | 12167 - 12199 https://bugzilla.redhat.com/show_bug.cgi?id=610119 Resolves: bug 610119 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199 Fix description: Catch possible NULL pointer in ldbm_instance_index_config_modify_callback() and ldbm_instance_config_add_index_entry().
* Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues ↵Noriko Hosoi2010-08-231-14/+17
| | | | | | | | | 12167 - 12199 https://bugzilla.redhat.com/show_bug.cgi?id=610119 Resolves: bug 610119 Bug description: Fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199 Fix description: Catch possible NULL pointer in index_range_read().