Module Name: src Committed By: christos Date: Thu Feb 9 01:53:51 UTC 2017
Modified Files: src/external/bsd/openldap: openldap2netbsd src/external/bsd/openldap/dist/build: mkversion src/external/bsd/openldap/dist/clients/tools: common.c src/external/bsd/openldap/dist/include: Makefile.in ldap_queue.h portable.hin src/external/bsd/openldap/dist/libraries/libldap: os-ip.c os-local.c tls_o.c src/external/bsd/openldap/dist/libraries/liblutil: detach.c md5.c passwd.c src/external/bsd/openldap/dist/libraries/librewrite: session.c src/external/bsd/openldap/dist/servers/slapd: filter.c src/external/bsd/openldap/dist/servers/slapd/overlays: deref.c Removed Files: src/external/bsd/openldap/dist/libraries/liblmdb: sample-bdb.c sample-mdb.c Log Message: merge conflicts To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/openldap/openldap2netbsd cvs rdiff -u -r1.5 -r1.6 src/external/bsd/openldap/dist/build/mkversion cvs rdiff -u -r1.5 -r1.6 \ src/external/bsd/openldap/dist/clients/tools/common.c cvs rdiff -u -r1.5 -r1.6 src/external/bsd/openldap/dist/include/Makefile.in \ src/external/bsd/openldap/dist/include/portable.hin cvs rdiff -u -r1.3 -r1.4 src/external/bsd/openldap/dist/include/ldap_queue.h cvs rdiff -u -r1.6 -r1.7 \ src/external/bsd/openldap/dist/libraries/libldap/os-ip.c cvs rdiff -u -r1.7 -r1.8 \ src/external/bsd/openldap/dist/libraries/libldap/os-local.c cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/openldap/dist/libraries/libldap/tls_o.c cvs rdiff -u -r1.1.1.1 -r0 \ src/external/bsd/openldap/dist/libraries/liblmdb/sample-bdb.c \ src/external/bsd/openldap/dist/libraries/liblmdb/sample-mdb.c cvs rdiff -u -r1.3 -r1.4 \ src/external/bsd/openldap/dist/libraries/liblutil/detach.c \ src/external/bsd/openldap/dist/libraries/liblutil/md5.c cvs rdiff -u -r1.4 -r1.5 \ src/external/bsd/openldap/dist/libraries/liblutil/passwd.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/openldap/dist/libraries/librewrite/session.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/openldap/dist/servers/slapd/filter.c cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/openldap/dist/servers/slapd/overlays/deref.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/openldap/openldap2netbsd diff -u src/external/bsd/openldap/openldap2netbsd:1.2 src/external/bsd/openldap/openldap2netbsd:1.3 --- src/external/bsd/openldap/openldap2netbsd:1.2 Sat Oct 8 15:28:38 2011 +++ src/external/bsd/openldap/openldap2netbsd Wed Feb 8 20:53:50 2017 @@ -1,6 +1,6 @@ #! /bin/sh # -# $NetBSD: openldap2netbsd,v 1.2 2011/10/08 19:28:38 christos Exp $ +# $NetBSD: openldap2netbsd,v 1.3 2017/02/09 01:53:50 christos Exp $ # # Copyright (c) 1998, 1999, 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -30,17 +30,27 @@ # netbsd openldap source tree, under src/external/bsd/openldap/dist. # -d=. #XXX +if [ -z "$1" ] +then + echo "Usage: $0 <dir>" 1>&2 + exit 1 +fi + +d="$1" ### Remove the $'s around RCS tags -cleantags $d +cleantags "$d" ### Add our NetBSD RCS Id -find $d -name '*.[chly]' -print | while read c; do - sed 1q < $c | grep -q '\$NetBSD' || ( -echo "/* \$NetBSD\$ */" >/tmp/openldap3n$$ -echo "" >>/tmp/openldap3n$$ -cat $c >> /tmp/openldap3n$$ -mv /tmp/openldap3n$$ $c && echo added NetBSD RCS tag to $c +find "$d" -name '*.[chly]' -print | while read c; do + sed 1q < "$c" | grep -q '\$NetBSD' || ( +sed -i -e '1i \ +/* $NetBSD: openldap2netbsd,v 1.3 2017/02/09 01:53:50 christos Exp $ */\ + +' -e '/#include "portable.h"/i \ +#include <sys/cdefs.h>\ +__RCSID("$NetBSD: openldap2netbsd,v 1.3 2017/02/09 01:53:50 christos Exp $");\ + +' "$c" ) done Index: src/external/bsd/openldap/dist/build/mkversion diff -u src/external/bsd/openldap/dist/build/mkversion:1.5 src/external/bsd/openldap/dist/build/mkversion:1.6 --- src/external/bsd/openldap/dist/build/mkversion:1.5 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/build/mkversion Wed Feb 8 20:53:50 2017 @@ -3,7 +3,7 @@ # $OpenLDAP$ ## This work is part of OpenLDAP Software <http://www.openldap.org/>. ## -## Copyright 1998-2014 The OpenLDAP Foundation. +## Copyright 1998-2016 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without @@ -54,7 +54,7 @@ APPLICATION=$1 cat << __EOF__ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -67,7 +67,7 @@ cat << __EOF__ */ static const char copyright[] = -"Copyright 1998-2014 The OpenLDAP Foundation. All rights reserved.\n" +"Copyright 1998-2016 The OpenLDAP Foundation. All rights reserved.\n" "COPYING RESTRICTIONS APPLY\n"; $static $const char $SYMBOL[] = Index: src/external/bsd/openldap/dist/clients/tools/common.c diff -u src/external/bsd/openldap/dist/clients/tools/common.c:1.5 src/external/bsd/openldap/dist/clients/tools/common.c:1.6 --- src/external/bsd/openldap/dist/clients/tools/common.c:1.5 Wed Nov 2 09:15:53 2016 +++ src/external/bsd/openldap/dist/clients/tools/common.c Wed Feb 8 20:53:50 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: common.c,v 1.5 2016/11/02 13:15:53 joerg Exp $ */ +/* $NetBSD: common.c,v 1.6 2017/02/09 01:53:50 christos Exp $ */ /* common.c - common routines for the ldap client tools */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * Portions Copyright 2003 Kurt D. Zeilenga. * Portions Copyright 2003 IBM Corporation. * All rights reserved. @@ -24,6 +24,9 @@ * Kurt D. Zeilenga (additional common argument and control support) */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: common.c,v 1.6 2017/02/09 01:53:50 christos Exp $"); + #include "portable.h" #include <stdio.h> @@ -68,7 +71,7 @@ int nocanon = 0; int referrals = 0; int verbose = 0; int ldif = 0; -ber_len_t ldif_wrap = LDIF_LINE_WIDTH; +ber_len_t ldif_wrap = 0; char *prog = NULL; /* connection */ Index: src/external/bsd/openldap/dist/include/Makefile.in diff -u src/external/bsd/openldap/dist/include/Makefile.in:1.5 src/external/bsd/openldap/dist/include/Makefile.in:1.6 --- src/external/bsd/openldap/dist/include/Makefile.in:1.5 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/include/Makefile.in Wed Feb 8 20:53:50 2017 @@ -2,7 +2,7 @@ # $OpenLDAP$ ## This work is part of OpenLDAP Software <http://www.openldap.org/>. ## -## Copyright 1998-2014 The OpenLDAP Foundation. +## Copyright 1998-2016 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without Index: src/external/bsd/openldap/dist/include/portable.hin diff -u src/external/bsd/openldap/dist/include/portable.hin:1.5 src/external/bsd/openldap/dist/include/portable.hin:1.6 --- src/external/bsd/openldap/dist/include/portable.hin:1.5 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/include/portable.hin Wed Feb 8 20:53:50 2017 @@ -4,7 +4,7 @@ /* begin of portable.h.pre */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation + * Copyright 1998-2016 The OpenLDAP Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without Index: src/external/bsd/openldap/dist/include/ldap_queue.h diff -u src/external/bsd/openldap/dist/include/ldap_queue.h:1.3 src/external/bsd/openldap/dist/include/ldap_queue.h:1.4 --- src/external/bsd/openldap/dist/include/ldap_queue.h:1.3 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/include/ldap_queue.h Wed Feb 8 20:53:50 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: ldap_queue.h,v 1.3 2014/05/28 10:12:43 tron Exp $ */ +/* $NetBSD: ldap_queue.h,v 1.4 2017/02/09 01:53:50 christos Exp $ */ /* ldap_queue.h -- queue macros */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 2001-2014 The OpenLDAP Foundation. + * Copyright 2001-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Index: src/external/bsd/openldap/dist/libraries/libldap/os-ip.c diff -u src/external/bsd/openldap/dist/libraries/libldap/os-ip.c:1.6 src/external/bsd/openldap/dist/libraries/libldap/os-ip.c:1.7 --- src/external/bsd/openldap/dist/libraries/libldap/os-ip.c:1.6 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/libraries/libldap/os-ip.c Wed Feb 8 20:53:51 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: os-ip.c,v 1.6 2014/05/28 10:12:43 tron Exp $ */ +/* $NetBSD: os-ip.c,v 1.7 2017/02/09 01:53:51 christos Exp $ */ /* os-ip.c -- platform-specific TCP & UDP related code */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * Portions Copyright 1999 Lars Uffmann. * All rights reserved. * @@ -23,6 +23,9 @@ * Lars Uffman */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: os-ip.c,v 1.7 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #include <stdio.h> Index: src/external/bsd/openldap/dist/libraries/libldap/os-local.c diff -u src/external/bsd/openldap/dist/libraries/libldap/os-local.c:1.7 src/external/bsd/openldap/dist/libraries/libldap/os-local.c:1.8 --- src/external/bsd/openldap/dist/libraries/libldap/os-local.c:1.7 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/libraries/libldap/os-local.c Wed Feb 8 20:53:51 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: os-local.c,v 1.7 2014/05/28 10:12:43 tron Exp $ */ +/* $NetBSD: os-local.c,v 1.8 2017/02/09 01:53:51 christos Exp $ */ /* os-local.c -- platform-specific domain socket code */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +25,9 @@ * is provided ``as is'' without express or implied warranty. */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: os-local.c,v 1.8 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #ifdef LDAP_PF_LOCAL Index: src/external/bsd/openldap/dist/libraries/libldap/tls_o.c diff -u src/external/bsd/openldap/dist/libraries/libldap/tls_o.c:1.4 src/external/bsd/openldap/dist/libraries/libldap/tls_o.c:1.5 --- src/external/bsd/openldap/dist/libraries/libldap/tls_o.c:1.4 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/libraries/libldap/tls_o.c Wed Feb 8 20:53:51 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: tls_o.c,v 1.4 2014/05/28 10:12:43 tron Exp $ */ +/* $NetBSD: tls_o.c,v 1.5 2017/02/09 01:53:51 christos Exp $ */ /* tls_o.c - Handle tls/ssl using OpenSSL */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 2008-2014 The OpenLDAP Foundation. + * Copyright 2008-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -18,6 +18,9 @@ /* ACKNOWLEDGEMENTS: Rewritten by Howard Chu */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: tls_o.c,v 1.5 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #ifdef HAVE_OPENSSL Index: src/external/bsd/openldap/dist/libraries/liblutil/detach.c diff -u src/external/bsd/openldap/dist/libraries/liblutil/detach.c:1.3 src/external/bsd/openldap/dist/libraries/liblutil/detach.c:1.4 --- src/external/bsd/openldap/dist/libraries/liblutil/detach.c:1.3 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/libraries/liblutil/detach.c Wed Feb 8 20:53:51 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: detach.c,v 1.3 2014/05/28 10:12:43 tron Exp $ */ +/* $NetBSD: detach.c,v 1.4 2017/02/09 01:53:51 christos Exp $ */ /* detach.c -- routines to daemonize a process */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,6 +30,9 @@ * and distributed as part of U-MICH LDAP. */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: detach.c,v 1.4 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #include <stdio.h> Index: src/external/bsd/openldap/dist/libraries/liblutil/md5.c diff -u src/external/bsd/openldap/dist/libraries/liblutil/md5.c:1.3 src/external/bsd/openldap/dist/libraries/liblutil/md5.c:1.4 --- src/external/bsd/openldap/dist/libraries/liblutil/md5.c:1.3 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/libraries/liblutil/md5.c Wed Feb 8 20:53:51 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: md5.c,v 1.3 2014/05/28 10:12:43 tron Exp $ */ +/* $NetBSD: md5.c,v 1.4 2017/02/09 01:53:51 christos Exp $ */ /* md5.c -- MD5 message-digest algorithm */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,9 @@ copyright in any changes I have made; this code remains in the public domain. */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: md5.c,v 1.4 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #include <ac/string.h> Index: src/external/bsd/openldap/dist/libraries/liblutil/passwd.c diff -u src/external/bsd/openldap/dist/libraries/liblutil/passwd.c:1.4 src/external/bsd/openldap/dist/libraries/liblutil/passwd.c:1.5 --- src/external/bsd/openldap/dist/libraries/liblutil/passwd.c:1.4 Wed May 28 06:12:43 2014 +++ src/external/bsd/openldap/dist/libraries/liblutil/passwd.c Wed Feb 8 20:53:51 2017 @@ -1,9 +1,9 @@ -/* $NetBSD: passwd.c,v 1.4 2014/05/28 10:12:43 tron Exp $ */ +/* $NetBSD: passwd.c,v 1.5 2017/02/09 01:53:51 christos Exp $ */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,6 +28,9 @@ * this routine is NOT thread-safe. */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: passwd.c,v 1.5 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #include <stdio.h> @@ -496,19 +499,19 @@ static int chk_ssha1( unsigned char SHA1digest[LUTIL_SHA1_BYTES]; int rc; unsigned char *orig_pass = NULL; + size_t decode_len = LUTIL_BASE64_DECODE_LEN(passwd->bv_len); /* safety check -- must have some salt */ - if (LUTIL_BASE64_DECODE_LEN(passwd->bv_len) <= sizeof(SHA1digest)) { + if (decode_len <= sizeof(SHA1digest)) { return LUTIL_PASSWD_ERR; } /* decode base64 password */ - orig_pass = (unsigned char *) ber_memalloc( (size_t) ( - LUTIL_BASE64_DECODE_LEN(passwd->bv_len) + 1) ); + orig_pass = (unsigned char *) ber_memalloc(decode_len + 1); if( orig_pass == NULL ) return LUTIL_PASSWD_ERR; - rc = lutil_b64_pton(passwd->bv_val, orig_pass, passwd->bv_len); + rc = lutil_b64_pton(passwd->bv_val, orig_pass, decode_len); /* safety check -- must have some salt */ if (rc <= (int)(sizeof(SHA1digest))) { @@ -541,19 +544,19 @@ static int chk_sha1( unsigned char SHA1digest[LUTIL_SHA1_BYTES]; int rc; unsigned char *orig_pass = NULL; + size_t decode_len = LUTIL_BASE64_DECODE_LEN(passwd->bv_len); /* safety check */ - if (LUTIL_BASE64_DECODE_LEN(passwd->bv_len) < sizeof(SHA1digest)) { + if (decode_len < sizeof(SHA1digest)) { return LUTIL_PASSWD_ERR; } /* base64 un-encode password */ - orig_pass = (unsigned char *) ber_memalloc( (size_t) ( - LUTIL_BASE64_DECODE_LEN(passwd->bv_len) + 1) ); + orig_pass = (unsigned char *) ber_memalloc(decode_len + 1); if( orig_pass == NULL ) return LUTIL_PASSWD_ERR; - rc = lutil_b64_pton(passwd->bv_val, orig_pass, passwd->bv_len); + rc = lutil_b64_pton(passwd->bv_val, orig_pass, decode_len); if( rc != sizeof(SHA1digest) ) { ber_memfree(orig_pass); @@ -583,19 +586,19 @@ static int chk_smd5( unsigned char MD5digest[LUTIL_MD5_BYTES]; int rc; unsigned char *orig_pass = NULL; + size_t decode_len = LUTIL_BASE64_DECODE_LEN(passwd->bv_len); /* safety check */ - if (LUTIL_BASE64_DECODE_LEN(passwd->bv_len) <= sizeof(MD5digest)) { + if (decode_len <= sizeof(MD5digest)) { return LUTIL_PASSWD_ERR; } /* base64 un-encode password */ - orig_pass = (unsigned char *) ber_memalloc( (size_t) ( - LUTIL_BASE64_DECODE_LEN(passwd->bv_len) + 1) ); + orig_pass = (unsigned char *) ber_memalloc(decode_len + 1); if( orig_pass == NULL ) return LUTIL_PASSWD_ERR; - rc = lutil_b64_pton(passwd->bv_val, orig_pass, passwd->bv_len); + rc = lutil_b64_pton(passwd->bv_val, orig_pass, decode_len); if (rc <= (int)(sizeof(MD5digest))) { ber_memfree(orig_pass); @@ -628,19 +631,19 @@ static int chk_md5( unsigned char MD5digest[LUTIL_MD5_BYTES]; int rc; unsigned char *orig_pass = NULL; + size_t decode_len = LUTIL_BASE64_DECODE_LEN(passwd->bv_len); /* safety check */ - if (LUTIL_BASE64_DECODE_LEN(passwd->bv_len) < sizeof(MD5digest)) { + if (decode_len < sizeof(MD5digest)) { return LUTIL_PASSWD_ERR; } /* base64 un-encode password */ - orig_pass = (unsigned char *) ber_memalloc( (size_t) ( - LUTIL_BASE64_DECODE_LEN(passwd->bv_len) + 1) ); + orig_pass = (unsigned char *) ber_memalloc(decode_len + 1); if( orig_pass == NULL ) return LUTIL_PASSWD_ERR; - rc = lutil_b64_pton(passwd->bv_val, orig_pass, passwd->bv_len); + rc = lutil_b64_pton(passwd->bv_val, orig_pass, decode_len); if ( rc != sizeof(MD5digest) ) { ber_memfree(orig_pass); return LUTIL_PASSWD_ERR; Index: src/external/bsd/openldap/dist/libraries/librewrite/session.c diff -u src/external/bsd/openldap/dist/libraries/librewrite/session.c:1.2 src/external/bsd/openldap/dist/libraries/librewrite/session.c:1.3 --- src/external/bsd/openldap/dist/libraries/librewrite/session.c:1.2 Wed May 28 06:14:13 2014 +++ src/external/bsd/openldap/dist/libraries/librewrite/session.c Wed Feb 8 20:53:51 2017 @@ -1,9 +1,9 @@ -/* $NetBSD: session.c,v 1.2 2014/05/28 10:14:13 tron Exp $ */ +/* $NetBSD: session.c,v 1.3 2017/02/09 01:53:51 christos Exp $ */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 2000-2014 The OpenLDAP Foundation. + * Copyright 2000-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -102,6 +102,9 @@ rewrite_session_init( session = calloc( sizeof( struct rewrite_session ), 1 ); if ( session == NULL ) { +#ifdef USE_REWRITE_LDAP_PVT_THREADS + ldap_pvt_thread_rdwr_wunlock( &info->li_cookies_mutex ); +#endif /* USE_REWRITE_LDAP_PVT_THREADS */ return NULL; } session->ls_cookie = ( void * )cookie; @@ -110,11 +113,13 @@ rewrite_session_init( #ifdef USE_REWRITE_LDAP_PVT_THREADS if ( ldap_pvt_thread_mutex_init( &session->ls_mutex ) ) { free( session ); + ldap_pvt_thread_rdwr_wunlock( &info->li_cookies_mutex ); return NULL; } if ( ldap_pvt_thread_rdwr_init( &session->ls_vars_mutex ) ) { ldap_pvt_thread_mutex_destroy( &session->ls_mutex ); free( session ); + ldap_pvt_thread_rdwr_wunlock( &info->li_cookies_mutex ); return NULL; } #endif /* USE_REWRITE_LDAP_PVT_THREADS */ @@ -124,7 +129,7 @@ rewrite_session_init( info->li_num_cookies++; #ifdef USE_REWRITE_LDAP_PVT_THREADS - ldap_pvt_thread_rdwr_wunlock( &info->li_cookies_mutex ); + ldap_pvt_thread_rdwr_wunlock( &info->li_cookies_mutex ); #endif /* USE_REWRITE_LDAP_PVT_THREADS */ if ( rc != 0 ) { Index: src/external/bsd/openldap/dist/servers/slapd/filter.c diff -u src/external/bsd/openldap/dist/servers/slapd/filter.c:1.2 src/external/bsd/openldap/dist/servers/slapd/filter.c:1.3 --- src/external/bsd/openldap/dist/servers/slapd/filter.c:1.2 Sat Feb 7 12:56:59 2015 +++ src/external/bsd/openldap/dist/servers/slapd/filter.c Wed Feb 8 20:53:51 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: filter.c,v 1.2 2015/02/07 17:56:59 christos Exp $ */ +/* $NetBSD: filter.c,v 1.3 2017/02/09 01:53:51 christos Exp $ */ /* filter.c - routines for parsing and dealing with filters */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,6 +26,9 @@ * is provided ``as is'' without express or implied warranty. */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: filter.c,v 1.3 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #include <stdio.h> @@ -1160,10 +1163,17 @@ get_vrFilter( Operation *op, BerElement void vrFilter_free( Operation *op, ValuesReturnFilter *vrf ) { +<<<<<<< filter.c ValuesReturnFilter *next; for ( p = vrf; vrf != NULL; vrf = next ) { next = vrf->vrf_next; +======= + ValuesReturnFilter *next; + + for ( ; vrf != NULL; vrf = next ) { + next = vrf->vrf_next; +>>>>>>> 1.1.1.5 switch ( vrf->vrf_choice & SLAPD_FILTER_MASK ) { case LDAP_FILTER_PRESENT: Index: src/external/bsd/openldap/dist/servers/slapd/overlays/deref.c diff -u src/external/bsd/openldap/dist/servers/slapd/overlays/deref.c:1.2 src/external/bsd/openldap/dist/servers/slapd/overlays/deref.c:1.3 --- src/external/bsd/openldap/dist/servers/slapd/overlays/deref.c:1.2 Sat Feb 7 12:58:23 2015 +++ src/external/bsd/openldap/dist/servers/slapd/overlays/deref.c Wed Feb 8 20:53:51 2017 @@ -1,10 +1,10 @@ -/* $NetBSD: deref.c,v 1.2 2015/02/07 17:58:23 christos Exp $ */ +/* $NetBSD: deref.c,v 1.3 2017/02/09 01:53:51 christos Exp $ */ /* deref.c - dereference overlay */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1998-2014 The OpenLDAP Foundation. + * Copyright 1998-2016 The OpenLDAP Foundation. * Portions Copyright 2008 Pierangelo Masarati. * All rights reserved. * @@ -21,6 +21,9 @@ * for inclusion in OpenLDAP Software. */ +#include <sys/cdefs.h> +__RCSID("$NetBSD: deref.c,v 1.3 2017/02/09 01:53:51 christos Exp $"); + #include "portable.h" #ifdef SLAPD_OVER_DEREF