This patch adds a new LDAP API, ldap_memcache_flush_results(), which works
the same as ldap_memcache_flush() except it'll also clear out results from
search requests that didn't return any entries.
git-svn-id: svn://10.0.0.236/trunk@255814 18797224-902f-48f8-a5cc-f745e15eee43
Summary: crash after reading freed memory during referral chase
Applying the patch (attachment id=273024) by Ulf Weltman in Comment #3
git-svn-id: svn://10.0.0.236/trunk@236315 18797224-902f-48f8-a5cc-f745e15eee43
Description: Windows SDK package needed
Fix Description: 1) Update the packaging Makefile (package.mk) for Windows and SASL.
2) Add support for manifests in VC 8.0. There is a new command line tool
called mt.exe that is used to generate manifest files and to compile them into
the executables. This allows ldapsearch.exe to be able to find the right
msvcr80.dll at runtime. This was copied from NSS at Nelson's suggestion.
3) Added support for being able to do a configure and make in a different
directory. I find it very useful to be able to create a "build" directory and
run configure like this:
cd ~/build
/path/to/mozilla/directory/c-sdk/configure ... args ...
make
Then I can just completely blow away the build directory if I need to. I know
this is what make clean/make clobber are supposed to do, but keeping the binary
and source directories separate like this also facilitates creating source
tarballs from the working directory for use in building rpms/packages.
There were a few changes required to cygwin_wrapper and the makefiles to
support building in this manner.
git-svn-id: svn://10.0.0.236/trunk@228387 18797224-902f-48f8-a5cc-f745e15eee43
Fix Description:
The patch was originally written for SDK 5.17. In recent SDKs we should
use ber_tag_t or ber_len_t in place of unsigned longs.
git-svn-id: svn://10.0.0.236/trunk@228342 18797224-902f-48f8-a5cc-f745e15eee43
Description: server response controls lost in referral chase
Fix Description:
1) Add a nsldapi_find_controls() which skips through a ber to find a control
tag, and then calls on nsldapi_get_controls() to extract them.
2) During referral chase, stash the controls received at the end of the chase
in the request structure.
3) When the referral chase is over and we manufacture a response, add the
stashed response controls.
git-svn-id: svn://10.0.0.236/trunk@228331 18797224-902f-48f8-a5cc-f745e15eee43
Summary: Fixed a memory leak of the SASL I/O socket arg when closing a connection.
git-svn-id: svn://10.0.0.236/trunk@227490 18797224-902f-48f8-a5cc-f745e15eee43
Description: Windows: libldap and the LDAP tools should support SASL/Digest
Fix Description: The biggest change was to hack sasl.m4 to make AC_CHECK_LIB work on Windows. I
had to override LIBS to be able to pass in /link /LIBPATH:c:/path/to/sasl
libsasl.lib, libsasl2.lib, and sasl32.lib.
Another big change was to implement getlogin() on Windows, required by
ldaptool-sasl.c. The implementation is pretty simple.
There were several places in the Makefiles that assumed Windows meant no
support for SASL, so I just changed them, and added some support for SASL_LIBS
in some places where it was missing.
git-svn-id: svn://10.0.0.236/trunk@218853 18797224-902f-48f8-a5cc-f745e15eee43
Description: Merge sun libprldap changes on to trunk
Fix Description: Pretty much the same as the fixes made for bugs 352519 352673 on the sun_merge_branch_20060523, this just merges those changes on to the trunk. One additional change is the removal of an unused variable.
git-svn-id: svn://10.0.0.236/trunk@213108 18797224-902f-48f8-a5cc-f745e15eee43
Description: Merge sun_merge_branch_20060523 changes into trunk.
Fix Description: I had to change re_encode_request to use the new ber types. Other than that, these merges are basically the sasl, ipv6, and ber types code already committed to the sun merge branch.
git-svn-id: svn://10.0.0.236/trunk@213085 18797224-902f-48f8-a5cc-f745e15eee43
Fix Description: Free lfdp->lfd_curval - it is now allocated in ldap_getfirstfilter() as a copy of the value passed in to that function.
git-svn-id: svn://10.0.0.236/trunk@206450 18797224-902f-48f8-a5cc-f745e15eee43
Fix Description: Make a copy of the value parameter passed into ldap_getfirstfilter() and store it in lfd_curval. Free it in the LDAPFiltDesc free function.
git-svn-id: svn://10.0.0.236/trunk@206449 18797224-902f-48f8-a5cc-f745e15eee43
Fix Description: First look for a return of < 0 from ldap_count_entries, and return LDAP_PARAM_ERROR in that case (in both keysort and multisort). Then, if count < 2, there is nothing to sort, so just return 0.
git-svn-id: svn://10.0.0.236/trunk@206302 18797224-902f-48f8-a5cc-f745e15eee43
Fix Description: If there is a scope given in the reference/referral URL, use it. Otherwise, if the URL is for a search reference (continuation reference) result, comply with RFC4511 section 4.5.3 concerning scope. Otherwise, parse the scope from the original request and just use it.
Note that this fix does not address support for filters in referrals/references. Support for filters will require a great deal more changes. The current version of openldap (2.3.x) does not support filters, so this fix at least brings us up to par with openldap with respect to this feature.
git-svn-id: svn://10.0.0.236/trunk@206293 18797224-902f-48f8-a5cc-f745e15eee43
add some more invalid parameter checking to the ldap bind routines
When reconnecting, do not use the previous binddn and password
git-svn-id: svn://10.0.0.236/trunk@194748 18797224-902f-48f8-a5cc-f745e15eee43
Enable autoconf build on Windows with cygwin and free MSVC compiler + SDK
1) Don't set the -lsvrcore in SVRCORE_LIBS in configure - instead, do it the
way we do the NSPR and NSS libs, in build.mk
2) For the component LINK macros, use name.lib instead of -lname on Windows
3) The new free MSVC compiler does not have lib.exe - add an autoconf test for
the lib program and use link /lib if missing
4) If using MSVC (which expects DOS style absolute paths) and cygwin (which
uses unix style abs. paths), use cygpath -m on all user supplied paths to make
sure they are in the correct format for cl and link. It's better to do this
during configure rather than depend on cygwin_wrapper which is much, much
slower.
5) Don't link with the odbc libs (Why did we ever need these!?!??!?)
6) The free MSVC doesn't include afxwin.h, so use the other header files
instead
7) Add libutil to the Windows build, including getting rid of the old Makefile
and adding a new Makefile.in for the autoconf build (the Makefile.client
remains)
8) getopt.c doesn't need lber.h
I verified that these changes also build on Win2k with MSVC 6 SP 3. I also changed the copyright in the new Makefile.in as suggested by Mark Smith.
git-svn-id: svn://10.0.0.236/trunk@188870 18797224-902f-48f8-a5cc-f745e15eee43
There were only a few places that needed to be changed. I needed to change the
order of c++ and cc detection around in configure - it seems that if you do the
cross compilation stuff first, it messes up the "regular" case, which is the
more important one. In order for the GNU_CC tests to work, you must define
CC=gcc and CXX=g++ on the configure command line. If building 64 bit, you must
also specify CFLAGS=-m64 and CXXFLAGS=-m64. I also removed the extra arguments
for static library building as they were not only not necessary but they were
also making the build abort.
git-svn-id: svn://10.0.0.236/trunk@187741 18797224-902f-48f8-a5cc-f745e15eee43
Thanks to Howard Chu <hyc@symas.com> for the patches.
Bug #294122 r=cls a=shaver
git-svn-id: svn://10.0.0.236/trunk@174037 18797224-902f-48f8-a5cc-f745e15eee43
LDAP command line tools now accept 2 new options:
-ZZ (issue a startTLS request)
-ZZZ (like -ZZ but require a successful response).
API extensions:
ldap_ssl.h: LDAP_EXOP_START_TLS macro (OID of start TLS extended op.).
libssldap: Added ldap_start_tls_s() function.
libprldap: Added prldap_is_installed() and prldap_import_connection().
libldap: Added new LDAP_X_OPT_SOCKETARG option for ldap_get_option()
and ldap_set_option() (get/set the socketarg associated
with the main LDAP TCP connection).
liblber: Added new LBER_SOCKBUF_OPT_SOCK_ARG option for
ber_sockbuf_set_option() and ber_sockbuf_get_option()
(get/set the socketarg associated with a Sockbuf).
Also, some refactoring was done in libssldap to simplify the code.
git-svn-id: svn://10.0.0.236/trunk@161997 18797224-902f-48f8-a5cc-f745e15eee43
when not requested.
Now if a NULL struct berval * is passed for the extended op data,
no value is sent.
git-svn-id: svn://10.0.0.236/trunk@161996 18797224-902f-48f8-a5cc-f745e15eee43
Replace existing licenses with a triple license (NPL/GPL/LGPL or
MPL/GPL/LGPL).
Add licenses to files that had no license.
Remove two unused files.
git-svn-id: svn://10.0.0.236/trunk@147837 18797224-902f-48f8-a5cc-f745e15eee43
A queue of pending outbound requests is kept. UnBind requests are NOT
queued however.
Abandon requests are not sent if a request is not outstanding.
Cleaned up the code in result.c to avoid use of magic return values
such as -1 and -2. Also removed some dead code and dead files.
ltest (test.c) now supports SSL and async I/O options.
git-svn-id: svn://10.0.0.236/trunk@147488 18797224-902f-48f8-a5cc-f745e15eee43
Fix most critical warnings in the core LDAP library code:
AIX has snprintf() so we now #define HAVE_SNPRINTF there.
Use snprintf() instead of sprintf() in ldap_perror().
Use snprintf() instead of sprintf() in ldap_init_getfilter_buf()
and improve error reporting for bad regular expressions.
git-svn-id: svn://10.0.0.236/trunk@140507 18797224-902f-48f8-a5cc-f745e15eee43
Don't treat a request as complete if its LDAP result message
has not yet been received. Previously, nested referrals and
references could cause requests to be prematurely terminated.
git-svn-id: svn://10.0.0.236/trunk@140486 18797224-902f-48f8-a5cc-f745e15eee43