Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/openldap/dist Merge 2.4.21



details:   https://anonhg.NetBSD.org/src/rev/3c4a4c22cf0e
branches:  trunk
changeset: 752819:3c4a4c22cf0e
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Mar 08 03:47:40 2010 +0000

description:
Merge 2.4.21

diffstat:

 external/bsd/openldap/dist/build/crupdate                             |    22 -
 external/bsd/openldap/dist/build/db.4.2.52.patch                      |    55 -
 external/bsd/openldap/dist/build/mkversion                            |     8 +-
 external/bsd/openldap/dist/contrib/slapd-modules/addpartial/COPYRIGHT |    10 -
 external/bsd/openldap/dist/contrib/slapd-modules/addpartial/LICENSE   |    47 -
 external/bsd/openldap/dist/contrib/slapd-modules/autogroup/COPYRIGHT  |    10 -
 external/bsd/openldap/dist/include/Makefile.in                        |     4 +-
 external/bsd/openldap/dist/libraries/libldap/os-ip.c                  |   156 +-
 external/bsd/openldap/dist/libraries/libldap/os-local.c               |    19 +-
 external/bsd/openldap/dist/libraries/libldap/tls.c                    |  3134 ----------
 external/bsd/openldap/dist/servers/slapd/schema/nadf.schema           |   182 -
 11 files changed, 160 insertions(+), 3487 deletions(-)

diffs (truncated from 3818 to 300 lines):

diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/build/crupdate
--- a/external/bsd/openldap/dist/build/crupdate Mon Mar 08 02:35:50 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#! /bin/sh
-# $OpenLDAP: pkg/ldap/build/crupdate,v 1.7.2.3 2008/02/11 23:26:37 kurt Exp $
-## This work is part of OpenLDAP Software <http://www.openldap.org/>.
-##
-## Copyright 1998-2008 The OpenLDAP Foundation.
-## All rights reserved.
-##
-## Redistribution and use in source and binary forms, with or without
-## modification, are permitted only as authorized by the OpenLDAP
-## Public License.
-##
-## A copy of this license is available in the file LICENSE in the
-## top-level directory of the distribution or, alternatively, at
-## <http://www.OpenLDAP.org/license.html>.
-#
-# Update copyright statements
-#
-
-set -e                 # exit immediately if any errors occur
-
-find . -type f -not -name 'LICENSE*' -print -exec perl -pi -e 's/Copyright ([0-9]{4})([,\-][0-9]{2,4})*,? The OpenLDAP Foundation/Copyright $1-2008 The OpenLDAP Foundation/g;' {} \;
-
diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/build/db.4.2.52.patch
--- a/external/bsd/openldap/dist/build/db.4.2.52.patch  Mon Mar 08 02:35:50 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-As posted to http://www.openldap.org/lists/openldap-devel/200610/msg00027.html
-
-This is Sleepycat bug #14908. The provided patch is for 4.2.52. The
-same bug is present in all versions up to 4.5.20 where it is fixed.
-
--------- Original Message --------
-Subject: region size bug Re: [BDB-Alpha] Berkeley DB 4.5.8 ALPHA
-Date: Mon, 10 Jul 2006 13:37:33 -0700
-From: Howard Chu <hyc%symas.com@localhost>
-To: support%sleepycat.com@localhost
-CC: support%symas.com@localhost
-References: <45A742B5-7DD5-4512-A204-A10FE8FC5DFC%oracle.com@localhost>
-
-
-I just ran into this in 4.2.52 but the same calculation occurs in 4.4
-and 4.5.8 alpha:
-
-This computation gives the wrong results when the number of cache
-regions is greater than the number of gigabytes (which we encounter on
-Linux using shared memory regions, which are constrained to much smaller
-than a gigabyte each).
-
-
-in mp/mp_region.c:
-
-
-   roff_t reg_size;
-
-
-   /* Figure out how big each cache region is. */
-   reg_size = (roff_t)(dbenv->mp_gbytes / dbenv->mp_ncache) * GIGABYTE;
-   reg_size += ((roff_t)(dbenv->mp_gbytes %
-       dbenv->mp_ncache) * GIGABYTE) / dbenv->mp_ncache;
-   reg_size += dbenv->mp_bytes / dbenv->mp_ncache;
-   *reg_sizep = reg_size;
-
-
-The first reg_size calculation always goes to zero when mp_ncache >
-mp_gbytes.
-This should have been, instead:
-   reg_size = GIGABYTE / dbenv->mp_ncache * dbenv->mp_gbytes;
-
---- mp/mp_region.c.O   2003-06-30 10:20:19.000000000 -0700
-+++ mp/mp_region.c     2006-10-27 23:25:05.000000000 -0700
-@@ -43,9 +43,7 @@
-       int htab_buckets, ret;
- 
-       /* Figure out how big each cache region is. */
--      reg_size = (dbenv->mp_gbytes / dbenv->mp_ncache) * GIGABYTE;
--      reg_size += ((dbenv->mp_gbytes %
--          dbenv->mp_ncache) * GIGABYTE) / dbenv->mp_ncache;
-+      reg_size = GIGABYTE / dbenv->mp_ncache * dbenv->mp_gbytes;
-       reg_size += dbenv->mp_bytes / dbenv->mp_ncache;
- 
-       /*
diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/build/mkversion
--- a/external/bsd/openldap/dist/build/mkversion        Mon Mar 08 02:35:50 2010 +0000
+++ b/external/bsd/openldap/dist/build/mkversion        Mon Mar 08 03:47:40 2010 +0000
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Create a version.c file
-# $OpenLDAP: pkg/ldap/build/mkversion,v 1.14.2.3 2008/02/11 23:26:37 kurt Exp $
+# OpenLDAP: pkg/ldap/build/mkversion,v 1.14.2.4 2009/01/22 00:00:41 kurt Exp
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2008 The OpenLDAP Foundation.
+## Copyright 1998-2009 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
 cat << __EOF__
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -67,7 +67,7 @@
  */
 
 static const char copyright[] =
-"Copyright 1998-2008 The OpenLDAP Foundation.  All rights reserved.\n"
+"Copyright 1998-2009 The OpenLDAP Foundation.  All rights reserved.\n"
 "COPYING RESTRICTIONS APPLY\n";
 
 $static $const char $SYMBOL[] =
diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/contrib/slapd-modules/addpartial/COPYRIGHT
--- a/external/bsd/openldap/dist/contrib/slapd-modules/addpartial/COPYRIGHT     Mon Mar 08 02:35:50 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-Copyright (C) Virginia Tech, David Hawes.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted only as authorized by the OpenLDAP
-Public License.
-
-A copy of this license is available in file LICENSE in the
-top-level directory of the distribution or, alternatively, at
-http://www.OpenLDAP.org/license.html.
diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/contrib/slapd-modules/addpartial/LICENSE
--- a/external/bsd/openldap/dist/contrib/slapd-modules/addpartial/LICENSE       Mon Mar 08 02:35:50 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-The OpenLDAP Public License
-  Version 2.8, 17 August 2003
-
-  Redistribution and use of this software and associated documentation
-  ("Software"), with or without modification, are permitted provided
-  that the following conditions are met:
-
-  1. Redistributions in source form must retain copyright statements
-     and notices,
-
-  2. Redistributions in binary form must reproduce applicable copyright
-     statements and notices, this list of conditions, and the following
-     disclaimer in the documentation and/or other materials provided
-     with the distribution, and
-
-  3. Redistributions must contain a verbatim copy of this document.
-
-The OpenLDAP Foundation may revise this license from time to time.
-Each revision is distinguished by a version number.  You may use
-this Software under terms of this license revision or under the
-terms of any subsequent revision of the license.
-
-THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
-CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT
-SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
-OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-The names of the authors and copyright holders must not be used in
-advertising or otherwise to promote the sale, use or other dealing
-in this Software without specific, written prior permission.  Title
-to copyright in this Software shall at all times remain with copyright
-holders.
-
-OpenLDAP is a registered trademark of the OpenLDAP Foundation.
-
-Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
-California, USA.  All Rights Reserved.  Permission to copy and
-distribute verbatim copies of this document is granted.
diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/contrib/slapd-modules/autogroup/COPYRIGHT
--- a/external/bsd/openldap/dist/contrib/slapd-modules/autogroup/COPYRIGHT      Mon Mar 08 02:35:50 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-Copyright (C) 2007 MichaÅ? SzulczyÅ?ski.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted only as authorized by the OpenLDAP
-Public License.
-
-A copy of this license is available in file LICENSE in the
-top-level directory of the distribution or, alternatively, at
-http://www.OpenLDAP.org/license.html.
diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/include/Makefile.in
--- a/external/bsd/openldap/dist/include/Makefile.in    Mon Mar 08 02:35:50 2010 +0000
+++ b/external/bsd/openldap/dist/include/Makefile.in    Mon Mar 08 03:47:40 2010 +0000
@@ -1,8 +1,8 @@
 # include Makefile.in for OpenLDAP
-# $OpenLDAP: pkg/ldap/include/Makefile.in,v 1.33.2.3 2008/02/11 23:26:40 kurt Exp $
+# OpenLDAP: pkg/ldap/include/Makefile.in,v 1.33.2.4 2009/01/22 00:00:51 kurt Exp
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2008 The OpenLDAP Foundation.
+## Copyright 1998-2009 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
diff -r 03773fef6643 -r 3c4a4c22cf0e external/bsd/openldap/dist/libraries/libldap/os-ip.c
--- a/external/bsd/openldap/dist/libraries/libldap/os-ip.c      Mon Mar 08 02:35:50 2010 +0000
+++ b/external/bsd/openldap/dist/libraries/libldap/os-ip.c      Mon Mar 08 03:47:40 2010 +0000
@@ -1,8 +1,10 @@
+/*     $NetBSD: os-ip.c,v 1.3 2010/03/08 03:47:40 lukem Exp $  */
+
 /* os-ip.c -- platform-specific TCP & UDP related code */
-/* $OpenLDAP: pkg/ldap/libraries/libldap/os-ip.c,v 1.118.2.8 2008/05/20 00:05:30 quanah Exp $ */
+/* OpenLDAP: pkg/ldap/libraries/libldap/os-ip.c,v 1.118.2.19 2009/08/14 20:31:32 quanah Exp */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2008 The OpenLDAP Foundation.
+ * Copyright 1998-2009 The OpenLDAP Foundation.
  * Portions Copyright 1999 Lars Uffmann.
  * All rights reserved.
  *
@@ -142,6 +144,57 @@
                                "setsockopt(%d, SO_KEEPALIVE) failed (ignored).\n",
                                s, 0, 0 );
                }
+               if ( ld->ld_options.ldo_keepalive_idle > 0 )
+               {
+#ifdef TCP_KEEPIDLE
+                       if ( setsockopt( s, IPPROTO_TCP, TCP_KEEPIDLE,
+                                       (void*) &ld->ld_options.ldo_keepalive_idle,
+                                       sizeof(ld->ld_options.ldo_keepalive_idle) ) == AC_SOCKET_ERROR )
+                       {
+                               osip_debug( ld, "ldap_prepare_socket: "
+                                       "setsockopt(%d, TCP_KEEPIDLE) failed (ignored).\n",
+                                       s, 0, 0 );
+                       }
+#else
+                       osip_debug( ld, "ldap_prepare_socket: "
+                                       "sockopt TCP_KEEPIDLE not supported on this system.\n", 
+                                       0, 0, 0 );
+#endif /* TCP_KEEPIDLE */
+               }
+               if ( ld->ld_options.ldo_keepalive_probes > 0 )
+               {
+#ifdef TCP_KEEPCNT
+                       if ( setsockopt( s, IPPROTO_TCP, TCP_KEEPCNT,
+                                       (void*) &ld->ld_options.ldo_keepalive_probes,
+                                       sizeof(ld->ld_options.ldo_keepalive_probes) ) == AC_SOCKET_ERROR )
+                       {
+                               osip_debug( ld, "ldap_prepare_socket: "
+                                       "setsockopt(%d, TCP_KEEPCNT) failed (ignored).\n",
+                                       s, 0, 0 );
+                       }
+#else
+                       osip_debug( ld, "ldap_prepare_socket: "
+                                       "sockopt TCP_KEEPCNT not supported on this system.\n", 
+                                       0, 0, 0 );
+#endif /* TCP_KEEPCNT */
+               }
+               if ( ld->ld_options.ldo_keepalive_interval > 0 )
+               {
+#ifdef TCP_KEEPINTVL
+                       if ( setsockopt( s, IPPROTO_TCP, TCP_KEEPINTVL,
+                                       (void*) &ld->ld_options.ldo_keepalive_interval,
+                                       sizeof(ld->ld_options.ldo_keepalive_interval) ) == AC_SOCKET_ERROR )
+                       {
+                               osip_debug( ld, "ldap_prepare_socket: "
+                                       "setsockopt(%d, TCP_KEEPINTVL) failed (ignored).\n",
+                                       s, 0, 0 );
+                       } 
+#else
+                       osip_debug( ld, "ldap_prepare_socket: "
+                                       "sockopt TCP_KEEPINTVL not supported on this system.\n", 
+                                       0, 0, 0 );
+#endif /* TCP_KEEPINTVL */
+               }
 #endif /* SO_KEEPALIVE */
 #ifdef TCP_NODELAY
                if ( setsockopt( s, IPPROTO_TCP, TCP_NODELAY,
@@ -207,7 +260,7 @@
                == AC_SOCKET_ERROR )
        {
                /* XXX: needs to be replace with ber_stream_read() */
-               read(s, &ch, 1);
+               (void)read(s, &ch, 1);
                TRACE;
                return -1;
        }
@@ -424,16 +477,66 @@
 }
 #endif
 
+int
+ldap_int_connect_cbs(LDAP *ld, Sockbuf *sb, ber_socket_t *s, LDAPURLDesc *srv, struct sockaddr *addr)



Home | Main Index | Thread Index | Old Index