summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/connection.c
Commit message (Collapse)AuthorAgeFilesLines
* OpenLDAP supportcleanupRich Megginson2009-07-071-1/+63
| | | | | | | | | | 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.
* initial commit of io function improvementsRich Megginson2009-06-171-1/+1
| | | | | | This patch consolidates the functionality of read_function and secure_read_function into a single read_function that deals with NSPR PRFileDesc objects. It does the same for write_function and secure_write_function. Since there is only one write function, there is no need to push a separate secure read/write function to the lber layer - importing the prfd into ssl (SSL_ImportFd) does that. I've also added some more debugging. Reviewed by: nkinder (Thanks!)
* Implement SASL I/O as an NSPR I/O layerRich Megginson2009-06-091-23/+4
| | | | | | | | | | | | | | | | | | | | | | This is part of the port to OpenLDAP, to simplify the code that interacts with the BER I/O layer. Ideally, since we only deal with NSPR I/O, not raw I/O, in the directory server, we can push any additional layers, such as SASL, as NSPR I/O layers. This is how NSS works, to push the SSL codec layer on top of the regular NSPR network I/O layer. Only 3 functions are implemented - PR_Send (sasl_io_send), PR_Recv (sasl_io_recv), and PR_Write (sasl_io_write). This simplified the code in saslbind.c and connection.c, and removed special handling for SASL connections - now they are just treated as regular NSPR connections - the app has not nor does not need to know the connection is a SASL connection. In addition, this gives us the ability to use SASL and SSL at the same time. The SASL I/O layer can be pushed on top of the SSL layer, so that we can use SSL for connection encryption, and SASL for authentication, without having to worry about mixing the two. Reviewed by: nkinder (Thanks!) Platforms tested: RHEL5 x86_64, Fedora 9 x86_64
* Compiler warnings and paged results on DSENoriko Hosoi2009-06-031-1/+3
| | | | | 1) Fixing compiler warnings on regex.c. 2) Adding dse_search_set_release to dse.c to support simple paged results on DSE.
* Add Simple Paged ResultsNoriko Hosoi2009-05-151-10/+25
| | | | For more details, see the design doc at http://directory.fedoraproject.org/wiki/Simple_Paged_Results_Design
* Resolves: 201332Nathan Kinder2008-12-111-1/+1
| | | | Summary: Allow password modify extop when password reset is needed.
* Resolves: bug 454030Rich Megginson2008-12-051-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Bug Description: Need to address 64-bit compiler warnings - again Reviewed by: nhosoi (Thanks!) Fix Description: This patch cleans up most of the other remaining compiler warnings. I compiled the directory server code with these flags on RHEL5 x86_64: -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic I also enabled argument/format match checking for most of the commonly used varadic functions. Most of the problems I found fell into these categories: 1) Too many or not enough arguments e.g. most everything that uses or did use LDAPDebug had extra 0,0 arguments. If they had been switched to use slapi_log_error, I removed the extra arguments - for those places still using LDAPDebug, I introduced more macros to handle the number of arguments, since C macros cannot be varadic. 2) When using NSPR formatting functions, we have to use %llu or %lld for 64-bit values, even on 64-bit systems. However, for regular system formatting functions, we have to use %ld or %lu. I introduced two new macros NSPRIu64 and NSPRI64 to handle cases where we are passing explicit 64-bit values to NSPR formatting functions, so that we can use the regular PRIu64 and PRI64 macros for regular system formatting functions. I also made sure we used NSPRI* only with NSPR functions, and used PRI* only with system functions. 3) use %lu for size_t and %ld for time_t I did find a few "real" errors, places that the code was doing something definitely not right: https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/acl/aclinit.c_sec4 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/acl/acllas.c_sec17 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/http/http_impl.c_sec1 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/memberof/memberof.c_sec1 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/pam_passthru/pam_ptimpl.c_sec1 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/replication/cl5_api.c_sec5 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/replication/cl5_clcache.c_sec2 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/plugins/replication/replutil.c_sec1 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/slapd/libglobs.c_sec1 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/slapd/back-ldbm/dbverify.c_sec2 https://bugzilla.redhat.com/attachment.cgi?id=325774&action=diff#ldapserver/ldap/servers/slapd/back-ldbm/ldif2ldbm.c_sec3 This is why it's important to use this compiler checking, and why it's important to fix compiler warnings, if for no other reason than the sheer noise from so many warnings can mask real errors. Platforms tested: RHEL5 Flag Day: no Doc impact: no
* Resolves: 207457Nathan Kinder2008-10-241-11/+11
| | | | Summary: Convert counters to 64-bit capable Slapi_Counter type.
* Related: 207457Nathan Kinder2008-10-171-46/+44
| | | | Summary: Add support for 64-bit counters (phase 1).
* Resolves: #466702Noriko Hosoi2008-10-151-5/+5
| | | | | Summary: Memory usage research: checking in the experimental code See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research
* Resolves: 188320Nathan Kinder2007-10-191-0/+8
| | | | Summary: Don't define _XOPEN_SOURCE_EXTENDED on HP-UX.
* Resolves: #188320Noriko Hosoi2007-10-181-8/+7
| | | | Summary: HP-UX: warnings reported by the HP-UX compiler
* Resolves: #240897Noriko Hosoi2007-09-201-7/+9
| | | | | | | | | | Summary: CRM 1474928 : ds7.1 db index/vlv not handling a stop-slapd, hangs slapd Description: 1. moved active thread count from ns-slapd to libslapd for the task threads to use. 2. provided APIs to increment/decrement/get the active thread count 3. let task threads increment the active thread count when it's spawned and decrement it when it quits.
* Resolves: #237731Noriko Hosoi2007-05-141-1/+2
| | | | Summary: Random SASL GSSAPI test failure on shadowfoot (Comment #9)
* Resolves: #237731Noriko Hosoi2007-04-271-1/+2
| | | | | | | Summary: Random SASL GSSAPI test failure on shadowfoot (Comment #7) Changes: If PR_Recv in sasl_recv_connection gets EAGAIN (== errno 11), check whether it should be retried as being done for "a temporary non-blocking I/O error".
* Add LDAPIPete Rowley2007-02-271-8/+14
|
* 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 +
* [206724] Processed: Replacing PR_SetNetAddr with PRLDAP_SET_PORT for IPv6 ↵Noriko Hosoi2006-09-241-1/+1
| | | | | | support comment#5: Fixed a stupid copy and paste bug...
* [206724] Replacing PR_SetNetAddr with PRLDAP_SET_PORT for IPv6 supportNoriko Hosoi2006-09-151-104/+109
| | | | | | | | slapi-private.h: introduced PRLDAP_SET_PORT to set port to the port field in PRNetAddr. A copy of the same macro in LDAP C SDK (v6). Note: once NSPR provides an equivalent API, we may want to replace this macro with the one. (the NSPR compatibility issue remains, though.) connection.c, daemon.c: replaced PR_SetNetAddr with PRLDAP_SET_PORT.
* [204566] Adjustment for new LDAP C SDK (ber_get_next_buffer_ext)Noriko Hosoi2006-08-311-29/+47
| | | | | | | | | Changes: 1) When ber_get_next_buffer_ext fails, not just LBER_DEFAULT but LBER_OVERFLOW can be set to the ber tag. Thus, LBER_OVERFLOW is also checked in the error check now. 2) The too large length error used be checked as "errno == EMSGSIZE", which is replaced with "tag == LBER_OVERFLOW"
* 204517 - Use new ber types throughout the server code.Nathan Kinder2006-08-311-26/+27
|
* Fix Windows SSL replication in-order processing of operatationsDavid Boreham2005-05-121-2/+12
|
* Fixed licensing typoNathan Kinder2005-04-191-1/+3
|
* 155068 - Added license to source filesNathan Kinder2005-04-151-0/+30
|
* Merge over new code: fractional replication, wan replication and windows ↵David Boreham2005-03-111-23/+71
| | | | sync plus associated UI
* clean up sprintf usage and many other flawfinder issues; clean up compiler ↵Rich Megginson2005-03-051-1/+0
| | | | warnings on Linux; remove pam_passthru from DS 7.1
* 149951 - Updated source code copyrightsNathan Kinder2005-02-281-2/+2
|
* PAM pass through auth plugin supportRich Megginson2005-02-071-1/+1
|
* Moving NSCP Directory Server from DirectoryBranch to TRUNK, initial drop. ↵ldapserver7xcvsadm2005-01-211-0/+2485
(foxworth)