Граф коммитов

84 Коммитов

Автор SHA1 Сообщение Дата
richm%stanfordalumni.org 82876b785e bug 301035 and bug 325518
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.
2006-02-03 19:28:32 +00:00
richm%stanfordalumni.org 1813b5349f bug 324529
When the malloc fails in the 'v' or 'V' ber_scanf case, we need to break out of the loop and return with an LBER_DEFAULT code.  Also, in the realloc case, we need to save a copy of the old pointer and use either ber_svecfree ('v' case) or ber_bvecfree ('V' case) to clean up the memory.

bug 324525
If the malloc is done to allocate the *bv, but then an lber error is
encountered while doing the ber_skip_tag (due to a bad or malicious client),
the bv->bv_val is set to a random value.  If you then try to use ber_bvfree to
free the bv, it may call free on this uninitialized value, and badness ensues.
I think the proper fix is for ber_get_stringal to set (*bv)->bv_val to NULL and
(*bv)->bv_len to 0 just after the malloc.
2006-02-03 15:55:46 +00:00
richm%stanfordalumni.org efd15b81c3 bug 310521
also part of 301035 and 325518

Use $(srcdir) as the location for the .ex file
2006-02-03 15:36:14 +00:00
richm%stanfordalumni.org 1a0eb2daba Bug 323307
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.
2006-01-18 03:46:52 +00:00
richm%stanfordalumni.org 65b6ae714e bug 323374
Mem and resource leaks in ldapsinit.c
1) I'm pretty sure the reference to socket should be fd instead.  I don't know
why it compiled with socket in there . . . note to self: read compiler warnings
. . .
2) The cert returned by SSL_PeerCertificate is "dup"ed, so we need to call
CERT_DestroyCertificate to release it otherwise we'll leak references.
3) The hostname returned by SSL_RevealURL is strduped and must be freed.
Reviewed by Mark and Pete (Thanks!)
2006-01-17 14:53:57 +00:00
richm%stanfordalumni.org c1c8a7578b Bug 322618 - Enable RPM build
Reviewed by Mark, Dan, Chris (Thanks!)
The newly added README.rpm explains how to build an RPM.
Running ./configure will print the list of flags and what they do.
2006-01-11 20:20:13 +00:00
richm%stanfordalumni.org 810651b9f9 fixes for bug 322576 - patches for building on HP-UX IPF 2006-01-09 20:08:59 +00:00
cls%seawood.org 0090d90132 Fix --with-system-nspr
Bug #288637 r=dmose a=caillon
2005-06-02 17:40:05 +00:00
cls%seawood.org 508598b2a5 Path translation fixes for msys.
Thanks to Howard Chu <hyc@symas.com> for the patches.
Bug #294122 r=cls a=shaver
2005-06-02 04:21:17 +00:00
richm%stanfordalumni.org f7447f2230 fix for 291993: find the NSPR libraries in the correct location in the dist build tree and make prldap have a run time dependency on them 2005-05-10 20:08:48 +00:00
richm%stanfordalumni.org cdff707310 Fix for bug 290482 - add the -l directive to fix the broken linker command 2005-04-25 20:03:49 +00:00
richm%stanfordalumni.org a4199fa9ce Fix for bug 288397 - just remove definition of MAXHOSTNAMELEN since it is not used anywhere 2005-04-25 20:03:40 +00:00
mcs%pearlcrescent.com 862ceba0a0 Fix bug # 263557 - Sending a request fails on Windows when the
ber size is larger than 64MB.
  Break up large messages into <= 8MB sized chunks inside prldap_write().
2004-10-15 13:10:04 +00:00
mcs%pearlcrescent.com 3e2648f425 Additional fix for 141754 - Enhancement: Should support startTls:
Remove extra semicolon which causes an error on some non-gcc compilers.
2004-09-10 13:03:03 +00:00
mcs%pearlcrescent.com b6c52eb5de Fix bug # 141754 - Enhancement: Should support startTLS.
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.
2004-09-09 18:50:05 +00:00
mcs%pearlcrescent.com ce27adf824 Fix bug # 242143 - ldap_extended_operation(3) sends requestValue
when not requested.
  Now if a NULL struct berval * is passed for the extended op data,
  no value is sent.
2004-09-09 18:23:39 +00:00
mcs%pearlcrescent.com 09359e1dd1 Fix bug # 255186 - 64 bit: VLV response control not parsed correctly. 2004-08-11 13:30:32 +00:00
mcs%pearlcrescent.com b32baea218 Commit to the trunk the fix for bug # 223987 - Fix LDAP library
makefile to play nice with "make -jN" builds with MSVC.
2004-05-24 14:25:07 +00:00
mcs%pearlcrescent.com 49b7ed67db Commit to the trunk - Fix bug # 212265 - files missing in .cvsignore.
r+sr=dmose.
2004-05-24 14:02:24 +00:00
mcs%pearlcrescent.com a6ad0ee4f5 Fix bug # 184219 - get cvs version of Ldap C-SDK and make of ldap c sdk failed.
Updated NSPR and NSS component revision numbers.
   Handle for part release numbers on Linux, e.g., 2.4.20-6
   Use correct paths for NSPR headers and libraries.
   Remove obsolete LDAP Makefiles (generated by configure these days).
   Fix command line tools link error on Linux: link with -lstdc++
2004-05-24 13:03:16 +00:00
cls%seawood.org 2c8a03de7f OpenVMS build changes. b=180291. r=mcs. sr=brendan 2004-03-15 06:51:00 +00:00
cls%seawood.org 4f4c771863 198462 patch by rich cannings cannings@math.ucalgary.ca r=mcs sr=dmose a=mkaply Get LDAP to build on OpenBSD 2004-03-15 06:28:55 +00:00
cls%seawood.org 086348436b #188247
r=mcs, sr=dmose
OS/2 GCC work for LDAP
2004-03-15 06:25:32 +00:00
cls%seawood.org 1499c49527 Gratuitous whitespace change to represent checkin for bug 53764. 2004-03-15 06:13:51 +00:00
cls%seawood.org 40aaba9057 Update openbsd support for openbsd >= 3.4
Thanks to Peter Str��mberg <wilfried@spamcop.net> for pulling these patches out of openbsd's ports tree.
Bug #236599 r+sr=dmose
2004-03-10 07:46:38 +00:00
mcs%netscape.com b7719ef988 Additional fix for 221694 - ber_get_next_buffer_ext() fails when
length or tag is split across buffers.
Improve backwards compatibility by setting *Bytes_Scanned to zero
when errors occur; use errno to report specific errors.
2003-10-23 19:35:02 +00:00
mcs%netscape.com bbdae685e4 Additional "bulletproofing" for bug # 221694 - ber_get_next_buffer_ext()
fails when length or tag is split across buffers.
2003-10-21 19:12:55 +00:00
mcs%netscape.com cdd10143f2 Additional fix for bug # 205419 - Relicense LDAP C SDK (directory/c-sdk).
Replace NPL/GPL/LGPL licenses with MPL/GPL/LGPL.
2003-10-15 17:26:10 +00:00
mcs%netscape.com 42ae2323af Fix bug # 221694 - ber_get_next_buffer_ext() fails when length or tag
is split across buffers.
2003-10-15 14:32:10 +00:00
mcs%netscape.com ffa0613f0b Fix bug # 205419 - Relicense LDAP C SDK (directory/c-sdk).
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.
2003-10-10 15:03:52 +00:00
mcs%netscape.com 2aa4fa531d Fix bug # 140182 - async I/O improvements.
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.
2003-10-01 17:19:11 +00:00
mcs%netscape.com b686184875 Fix bug # 206776 - remove obsolete files under
mozilla/directory/c-sdk/ldap/libraries/msdos/winsock
2003-10-01 14:58:35 +00:00
mcs%netscape.com 45186e0c0f Partial fix for 148272 - flawfinder warnings in directory.
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.
2003-04-01 21:04:23 +00:00
mcs%netscape.com 142c4d2d3e Fix 190539 - Speed optimizations for OS/2.
Changes merged from ldapcsdk_50_client_branch.
2003-04-01 18:11:26 +00:00
mcs%netscape.com 908b4bf2b6 Fix bug # 174912 - Sporadically missing entries during referral.
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.
2003-04-01 15:17:11 +00:00
mcs%netscape.com e0825a3cd6 Fix 175900 - read overrun in ldap resolve code.
Note: this fixes code we do not compile right now.
2003-03-24 21:12:03 +00:00
mcs%netscape.com 1ccb573c31 Follow up fix for 126462 - Occurences of uninitialized variables being
used before being set (in directory/c-sdk).
	Fix debug build.
2003-03-24 20:44:58 +00:00
mcs%netscape.com dc8c708120 Fix 144241 - possible C SDK leak or delayed free().
Note: unconfirmed fix; I do not have a test program for this bug.
2003-03-24 20:05:24 +00:00
mcs%netscape.com d723de9a69 Fix 126462 - Occurences of uninitialized variables being used
before being set (in directory/c-sdk).
2003-03-24 19:59:05 +00:00
mcs%netscape.com 5de84ec0c5 Fix 183385 - eliminate references to NSS key/cert/module files.
The LDAP tools code no longer has any knowledge of the NSS
	file names; the certpath2keypath() function has been deleted
	and we now simply use the certdbpath as keydbpath when it is
	provided (it makes no difference in the end). But note that
	because we need to maintain backwards compatibility, the
	libssldap code used by the ldapssl_.*_init() functions still
	knows the default name of the NSS module file (secmod.db),
	and the code also relies on the fact that the suffix for the
	key and cert files is ".db" and that the first letter in the
	main part of the name is either 'c' or 'k'.
Also fixed a bug that caused the module file name specified on
	the LDAP tools command line (-m name) to be ignored.
The ldapsearch and ldapcmp tools now exit with LDAP_NO_MEMORY
	if an LDIF fragment can't be constructed.
Also fixed some issues reported by lint:
	Return values that were ignored.
	Make more functions and global variables static.
	Add /*ARGSUSED*/ and similar lint-friendly comments.
2003-03-21 16:00:34 +00:00
seawood%netscape.com c745660cee Add mingw support.
Bug #134113 r=mcs sr=dmose
2003-03-07 21:12:09 +00:00
djani%netscape.com 01abecd4cb Bug 179133: Now we support cert and key DBs with prefixes in the names also, just like ldapssl_pkcs_init() does. Now all of the code calls NSS_Initialize() instead of NSS_Init(). 2002-12-04 19:10:17 +00:00
mcs%netscape.com 3832b1fc62 Fix bug # 177771 - libssldap: keyfile password should be optional.
If a NULL keypasswd value is passed to ldapssl_enable_clientauth()
		then it is assumed that the application has already unlocked
		the key DB or has installed its own GetPassword callback.
	Also improved some error reporting.
2002-12-04 17:11:20 +00:00
mcs%netscape.com 3f190c27b3 Fix bug # 177775 - libprldap: NSPR error is sometimes lost. 2002-11-15 21:03:19 +00:00
mcs%netscape.com 54f6f0ba6a Fix bug # 177778 - ldap_set_option( NULL, ... ) resets ldap_debug to zero. 2002-11-15 21:01:43 +00:00
mcs%netscape.com 0d16f36c0c Fix bug # 163534 - remove Netscape Confidential and Proprietary marker
from errormap.c.
2002-11-15 20:18:50 +00:00
mcs%netscape.com 528fd9ba96 Fix bug # 38012 - 64bit issues within CRC-32 code.
Define 32-bit integral types in portable.h (nsldapi_int_32 and
	nsldapi_uint_32) and use them in the memcache crc32_convert()
	function.
2002-11-15 20:15:53 +00:00
mcs%netscape.com 61b529e662 Fix bug # 179951 - libprldap "cross thread" memory leak.
The prldap_tsd_destroy() function (which is called when a
	thread exits) was not freeing the information contained within
	the PRLDAP_ErrorInfo structure. Added prldap_free_errorinfo()
	and a way to determine if that thread-private data looks like
	error information (the plei_magic field). At the moment, only
	one kind of thread-private data is stored anyway (the error
	information).

	The prldap_allocate_map() function, which is called when a new
	LDAP session is created, was blindly setting the thread-private
	error information pointer to NULL. But if a different thread
	created or used an LDAP session than called ldap_unbind(), old
	error information may have been left in memory. Now the error
	info. pointer is reset and reused, which was the original goal.
2002-11-14 23:07:27 +00:00
mcs%netscape.com e29270dddf Fix bug # 175727 - strict aliasing bugs in LDAP C SDK.
Avoid casts like (void**)&pRes; use temporary local variables
	instead.
2002-11-02 02:29:37 +00:00
mcs%netscape.com c1aa011ff3 Fix bug # 169975 - LDAP memory cache accesses response
list w/o locking mutex.
2002-11-01 19:57:09 +00:00