~ubuntu-branches/ubuntu/oneiric/openldap/oneiric

« back to all changes in this revision

Viewing changes to libraries/libldap/tls_o.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-05-08 16:34:09 UTC
  • mfrom: (1.1.8 upstream) (0.3.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110508163409-yjop2tgwy54fi0tm
Tags: 2.4.25-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Install a default DIT (LP: #442498).
  - Document cn=config in README file (LP: #370784).
  - remaining changes:
    + AppArmor support:
      - debian/apparmor-profile: add AppArmor profile
      - use dh_apparmor:
        - debian/rules: use dh_apparmor
        - debian/control: Build-Depends on debhelper 7.4.20ubuntu5
      - updated debian/slapd.README.Debian for note on AppArmor
      - debian/slapd.dirs: add etc/apparmor.d/force-complain
    + Enable GSSAPI support (LP: #495418):
      - debian/patches/gssapi.diff, thanks to Jerry Carter (Likewise):
        - Add --with-gssapi support
        - Make guess_service_principal() more robust when determining
          principal
      - debian/patches/series: apply gssapi.diff patch.
      - debian/configure.options: Configure with --with-gssapi
      - debian/control: Added libkrb5-dev as a build depend
    + debian/rules: Enable -DLDAP_CONNECTIONLESS to build CLDAP (UDP) support
      in the openldap library, as required by Likewise-Open (LP: #390579)
    + Don't build smbk5pwd overlay since it uses heimdal instead of krb5:
      - debian/control: 
        - remove build-dependency on heimdal-dev.
        - remove slapd-smbk5pwd binary package.
      - debian/rules: don't build smbk5pwd slapd module.
    + debian/{control,rules}: enable PIE hardening
    + ufw support (LP: #423246):
      - debian/control: suggest ufw.
      - debian/rules: install ufw profile.
      - debian/slapd.ufw.profile: add ufw profile.
    + Enable nssoverlay:
      - debian/patches/nssov-build, debian/series, debian/rules: 
        Apply, build and package the nss overlay.
      - debian/schema/extra/misc.ldif: add ldif file for the misc schema
        which defines rfc822MailMember (required by the nss overlay).
    + debian/rules, debian/schema/extra/: 
      Fix configure rule to supports extra schemas shipped as part
      of the debian/schema/ directory.
    + debian/rules, debian/slapd.py: Add apport hook. (LP: #610544)
    + debian/slapd.init.ldif: don't set olcRootDN since it's not defined in
      neither the default DIT nor via an Authn mapping.
    + debian/slapd.scripts-common: adjust minimum version that triggers a
      database upgrade. Upgrade from maverick shouldn't trigger database
      upgrade (which would happen with the version used in Debian).
    + debian/slapd.scripts-common: add slapcat_opts to local variables.
      Remove unused variable new_conf.
    + debian/slapd.script-common: Fix package reconfiguration.
      - Fix backup directory naming for multiple reconfiguration.
    + debian/slapd.default, debian/slapd.README.Debian: 
      use the new configuration style.
    + Install nss overlay (LP: #675391):
      - debian/rules: run install target for nssov module.
      - debian/patches/nssov-build: fix patch to install schema in /etc/ldap/schema
    + debian/patches/gssapi.diff:
      - Update patch so that likewise-open is usuable again. (LP: #661547)
    + debian/patches/service-operational-before-detach: New patch replacing old one
      of the same name as previous could cause database corruption based on upstream commits.
      (LP: #727973)
     + Dropped:
       - debian/patches/gold: Use the debian version instead
       - debian/patches/CVE-2011-1024: Fixed upstream
       - debian/patches/CVE-2011-1025: Fixed upstream
       - debian/patches/CVE-2011-1081: Fixed upstream 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* tls_o.c - Handle tls/ssl using OpenSSL */
2
 
/* $OpenLDAP: pkg/ldap/libraries/libldap/tls_o.c,v 1.5.2.12 2010/04/15 21:25:28 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/libraries/libldap/tls_o.c,v 1.5.2.14 2011/01/06 18:43:21 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
 
 * Copyright 2008-2010 The OpenLDAP Foundation.
 
5
 * Copyright 2008-2011 The OpenLDAP Foundation.
6
6
 * All rights reserved.
7
7
 *
8
8
 * Redistribution and use in source and binary forms, with or without
37
37
#include "ldap-int.h"
38
38
#include "ldap-tls.h"
39
39
 
40
 
#ifdef LDAP_R_COMPILE
41
 
#include <ldap_pvt_thread.h>
42
 
#endif
43
 
 
44
40
#ifdef HAVE_OPENSSL_SSL_H
45
41
#include <openssl/ssl.h>
46
42
#include <openssl/x509v3.h>
1214
1210
        int i;
1215
1211
 
1216
1212
        /* Do we have params of this length already? */
1217
 
#ifdef LDAP_R_COMPILE
1218
 
        ldap_pvt_thread_mutex_lock( &tlso_dh_mutex );
1219
 
#endif
 
1213
        LDAP_MUTEX_LOCK( &tlso_dh_mutex );
1220
1214
        for ( p = tlso_dhparams; p; p=p->next ) {
1221
1215
                if ( p->keylength == key_length ) {
1222
 
#ifdef LDAP_R_COMPILE
1223
 
                        ldap_pvt_thread_mutex_unlock( &tlso_dh_mutex );
1224
 
#endif
 
1216
                        LDAP_MUTEX_UNLOCK( &tlso_dh_mutex );
1225
1217
                        return p->param;
1226
1218
                }
1227
1219
        }
1254
1246
                }
1255
1247
        }
1256
1248
 
1257
 
#ifdef LDAP_R_COMPILE
1258
 
        ldap_pvt_thread_mutex_unlock( &tlso_dh_mutex );
1259
 
#endif
 
1249
        LDAP_MUTEX_UNLOCK( &tlso_dh_mutex );
1260
1250
        return dh;
1261
1251
}
1262
1252