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

146 Коммитов

Автор SHA1 Сообщение Дата
anton.bobrov%sun.com 8ad3cf137e Bug 355244 merging Sun and Mozilla libssldap 2006-10-10 13:37:35 +00:00
richm%stanfordalumni.org 9aeab77af2 Bug: 355434
Description: Change LDAP C SDK version to 6
Fix Description: Change the version to major 6, minor 0, and submin/patch 0.  The change is in various places in the build makefiles and header files.  The shared lib suffix is now 60 (from 50).
In a somewhat unrelated change, the configure script had to change to allow
building with the RPM spec %configure macro on rhel/fedora.  That macro
defines --host, --build, and --target, and defines --host different than
--target.  This caused configure to think it was doing a cross compilation.
Instead, the correct cross compilation trigger is if --host is specified and
it is different than --build.  However, the mozilla builds expect to be able
to pass in --host different than --target, so all of these different
combinations had to be accomodated.
2006-10-05 23:01:43 +00:00
richm%stanfordalumni.org 0e23384a97 Bug: 348366
Description: ber_printf support for O format
Fix Description: When calling ber_printf with the 'O' format, the corresponding argument must be a struct berval *.  If the bval argument is NULL, nothing is written (i.e. it is safe to use a NULL here).  Otherwise, bval->bv_len bytes from bval->bv_val will be written to the output.
2006-10-04 14:46:28 +00:00
richm%stanfordalumni.org 81f1fc89a6 Bug: 339298
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.
2006-10-04 14:37:27 +00:00
richm%stanfordalumni.org 92237a41a2 Bug: 339298
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.
2006-10-03 20:43:42 +00:00
richm%stanfordalumni.org 89e8b56566 Bug: 348926
Description: Memleak: ldap_start_tls_s should free oidptr and dataptr
Fix Description: Just omit oidptr and dataptr and pass NULL for those arguments to ldap_extended_operation_s().
Bug: 348927
Description: Memleak: ldaptls_complete should free hostlist
Fix Description: Instead of returning directly from early error conditions, just goto the error handling code, and let that code free hostlist and do the other cleanup.  I had to make sure all relevant variables were initialized to NULL in order for cleanup to work properly.
2006-08-17 19:21:03 +00:00
richm%stanfordalumni.org 455cbd4726 Bug: 347033
Description: The client must call ldapssl_enable_clientauth before the first operation.  This means before ldap_start_tls_s in the case of startTLS.  However, the certname and keypassword (if any) are stored in the connection context.  ldapssl_enable_clientauth will now allocate and store this connection context if it doesn't already exist, then set the certname and keypassword.
2006-08-04 14:05:38 +00:00
richm%stanfordalumni.org 0ae98e7580 Bug: 332159
Fix Description: Free lfdp->lfd_curval - it is now allocated in ldap_getfirstfilter() as a copy of the value passed in to that function.
2006-08-02 22:42:54 +00:00
richm%stanfordalumni.org 11d782106e Bug: 332159
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.
2006-08-02 22:40:59 +00:00
richm%stanfordalumni.org e845180674 Bug: 347033
Fix Description: Using the -Z flag sets the secure option, but using -ZZ (use starttls) does not.  The code in several places uses a test like if (secure || isZZ) to see if it has to perform some sort of ssl/tls related initialization.  The one place that was missed was before the call to PinArgRegistration() which was just if (secure).
2006-08-02 20:05:36 +00:00
richm%stanfordalumni.org 8149a17c79 Bug: 201483
Fix Description: Replaced PK11_FindCertFromNickname() with CERT_FindUserCertByUsage(), using a cert usage of SSL Client.  This should only find certs that are used for SSL Clients, which is the type of cert we want in this context (as opposed to e.g. an email signing cert).  The LDAPSSLSessionInfo* ssip is passed now as the context argument.  Moved calling PK11_SetPasswordFunc before CERT_FindUserCertByUsage() in case CERT_FindUserCertByUsage() needs it for some reason.
2006-08-02 20:00:42 +00:00
richm%stanfordalumni.org fc0743f18b Bug: 300482
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.
2006-08-01 16:40:31 +00:00
richm%stanfordalumni.org a94a5ac040 Bug: 323064
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.
2006-08-01 14:57:38 +00:00
richm%stanfordalumni.org ff9384d16f remove from head 2006-05-19 20:27:03 +00:00
richm%stanfordalumni.org 802d84bb7f This commit was generated by cvs2svn to track changes on a CVS vendor
branch.
2006-05-19 20:17:49 +00:00
richm%stanfordalumni.org b581ec67bf Initial import of the Sun C SDK back into mozilla 2006-05-19 20:17:49 +00:00
richm%stanfordalumni.org 78f3c060b2 Bug: 337210
Description: ber_scanf sometimes gives incorrect return code on 64-bit
Fix: ber_get_boolean needs to get the return value of ber_get_int as an unsigned long and return that unsigned long value
2006-05-11 14:40:48 +00:00
richm%stanfordalumni.org 91c3892247 fix for bug 330255 - sasl bind does not respect LDAP_OPT_RECONNECT option
add some more invalid parameter checking to the ldap bind routines
When reconnecting, do not use the previous binddn and password
2006-04-20 02:16:25 +00:00
richm%stanfordalumni.org f8ca9aa8da only link with svrcore if HAVE_SVRCORE is set 2006-04-19 03:03:54 +00:00
richm%stanfordalumni.org 2ac0bc97b4 On HP-UX, we should not link against the libraries we depend on at runtime because it puts explicit version dependencies into the shared library we are creating. This makes it impossible to upgrade to a new version of nspr or nss. 2006-02-16 23:08:22 +00:00
richm%stanfordalumni.org 47ca684014 bug 292793
Allow build on Mac OSX
1) There is no RPATH on Darwin, so undefine the RPATH macros before linking
2) Have to use g++ to link
3) The iconv functions are in libiconv
2006-02-10 23:14:00 +00:00
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 35c98be598 bug 208655 - just needed to set the two_hosts argument for ldaptool_process_args in ldapcmp.c to pickup both hosts and ports 2006-01-18 23:19:42 +00:00
richm%stanfordalumni.org 046b3c553a bug 184968 - only perform terminal manipulation if stdin is a terminal 2006-01-18 23:11:48 +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 75853eee2e bug 323188: Link order is important when building executables
It also seems to be important in certain cases when using g++
to build shared libraries.
I was having weird errors building the CLUs on linux x86_64.  These turned out to be due to the incorrect ordering of objects on the link line.

The LINK_EXE macro already has everything needed - it is not necessary to
supply extra libs in the form of the LDTOOLS_LIBS.  Just specify them in the
correct order in EXTRA_LIBS.  You don't need to set EXTRA_LIBS for every
platform - on *nix platforms, they are all the same, so just define them in a
common place in the correct order.  Use PLATFORMLIBS to specify platform
dependent libs.

The one tricky thing is that LINK_EXE expects OBJS to have all of the objects.
This works if you only build one executable per makefile, but this makefile
builds several, so you need to get the executable specific .obj file in the
link line as well.  I suppose I could have used target specific variable
assignment to OBJS, but that seemed messy to me, so I just added a $(filter ..)
to the LINK_EXE command which will add all of the .obj files specified in the
executable link target dependency list to the link line.  The filter is to
filter out libraries and other dependencies, which are usually specified
elsewhere.  This seems to work on linux x86_64 and HP IPF 64 just fine.
2006-01-13 15:35:45 +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 92aa279ccd remove old, crufty HP-UX code for IPF port 2006-01-10 03:58:39 +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 1a909a950f fix for 293199: do not automatically set the secure mode (to use port 636) if the user requested the startTLS operation - in this case, we want to use the regular (389) port and negotiate SSL on that connection 2005-05-10 20:08:43 +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
richm%stanfordalumni.org f1825cfce1 Use DEFS instead of CFLAGS for the argpin and pkcs11 defs 2005-03-10 16:07:53 +00:00
richm%stanfordalumni.org dda5f0bbb6 Fix bug 281140 - patch submitted by ulf@loop.to
The getpass() function on HP-UX only allows 8 characters.
Since there is not (yet?) a better function, this fix
allows up to 256 character passwords using the raw
tty interfaces for no echo.
2005-02-11 20:02:47 +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 663acc74b8 Additional fix for bug #246694 - 64-bit build: incorrect handling of
password policy response.
2004-08-10 12:36:08 +00:00
mcs%pearlcrescent.com f83bfa492a Fix bug # 245794 - LDAP C SDK non-autoconf build problems
Add Makefile.client under mozilla/directory/c-sdk/config and call it
    from mozilla/directory/Makefile (this "new" Makefile.client is
    the same as the old mozilla/directory/c-sdk/Makefile that was
    recently cvs removed).
  Simplify the logic in mozilla/directory/build.mk and make sure the
    command line tools are linked with the C++ compiler on all platforms
    where necessary.
  Recognize HP/UX 11.11 (treated the same as 11.00).
  Replace an incorrect dependency on Makefile with a dependency on
    Makefile.client inside the command line tools Makefile.client.
2004-07-09 18:09:39 +00:00
mcs%pearlcrescent.com 72c5f2058e Fix bug # 246694 - 64-bit build: incorrect handling of
password policy response.
   The 'i' format specifier to ber_scanf() requires a long arg, not int.
2004-06-16 13:18:48 +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