~ubuntu-branches/ubuntu/maverick/openldap/maverick-proposed

« back to all changes in this revision

Viewing changes to libraries/libldap/open.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Steve Langasek, Mathias Gug
  • Date: 2009-02-18 18:44:00 UTC
  • mfrom: (1.1.2 upstream) (0.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20090218184400-zw4mjse9eywt5566
Tags: 2.4.14-0ubuntu1
[ Steve Langasek ]
* New upstream version
  - Fixes a bug with the pcache overlay not returning cached entries
    (closes: #497697)
  - Update evolution-ntlm patch to apply to current Makefiles.
  - (tentatively) drop gnutls-ciphers, since this bug was reported to be
    fixed upstream in 2.4.8.  The fix applied in 2.4.8 didn't match the
    patch from the bug report, so this should be watched for regressions.
* Build against db4.7 instead of db4.2 at last!  Closes: #421946.
* Build with --disable-ndb, to avoid a misbuild when libmysqlclient is
  installed in the build environment.
* New patch, no-crlcheck-for-gnutls, to fix a build failure when using
  --with-tls=gnutls.

[ Mathias Gug ]
* Merge from debian unstable, remaining changes:
  - debian/apparmor-profile: add AppArmor profile
  - debian/slapd.postinst: Reload AA profile on configuration
  - updated debian/slapd.README.Debian for note on AppArmor
  - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6
  - debian/control: Conflicts with apparmor-profiles << 2.1+1075-0ubuntu4
    to make sure that if earlier version of apparmour-profiles gets
    installed it won't overwrite our profile.
  - Modify Maintainer value to match the DebianMaintainerField
    speficication.
  - follow ApparmorProfileMigration and force apparmor compalin mode on 
    some upgrades (LP: #203529)
  - debian/slapd.dirs: add etc/apparmor.d/force-complain
  - debian/slapd.preinst: create symlink for force-complain on pre-feisty
    upgrades, upgrades where apparmor-profiles profile is unchanged (ie
    non-enforcing) and upgrades where apparmor profile does not exist.
  - debian/slapd.postrm: remove symlink in force-complain/ on purge
  - debian/patches/fix-ucred-libc due to changes how newer glibc handle
    the ucred struct now.
  - debian/control:
    - Build-depend on libltdl7-dev rather then libltdl3-dev.
  - debian/patches/autogen.sh:
    - Call libtoolize with the --install option to install config.{guess,sub}
      files.
  - Don't use local statement in config script as it fails if /bin/sh
    points to bash (LP: #286063).
  - Disable the testsuite on hppa. Allows building of packages on this
    architecture again, once this package is in the archive.
    LP: #288908.
  - debian/slapd.postinst, debian/slapd.script-common: set correct ownership
    and permissions on /var/lib/ldap, /etc/ldap/slapd.d (group readable) and
    /var/run/slapd (world readable). (LP: #257667).
  - debian/patches/nssov-build, debian/rules: 
    Build and package the nss overlay.
    debian/schema/misc.ldif: add ldif file for the misc schema, which defines
    rfc822MailMember (required by the nss overlay).
  - debian/{control,rules}: enable PIE hardening
  - Use cn=config as the default configuration backend instead of 
    slapd.conf. Migrate slapd.conf  file to /etc/ldap/slapd.d/ on upgrade
    asking the end user to enter a new password to control the access to the
    cn=config tree.
* debian/patches/corrupt-contextCSN: The contextCSN can get corrupted at
  times. (ITS: #5947)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenLDAP: pkg/ldap/libraries/libldap/open.c,v 1.110.2.7 2008/02/11 23:56:32 quanah Exp $ */
 
1
/* $OpenLDAP: pkg/ldap/libraries/libldap/open.c,v 1.110.2.10 2009/01/22 00:00:54 kurt Exp $ */
2
2
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3
3
 *
4
 
 * Copyright 1998-2008 The OpenLDAP Foundation.
 
4
 * Copyright 1998-2009 The OpenLDAP Foundation.
5
5
 * All rights reserved.
6
6
 *
7
7
 * Redistribution and use in source and binary forms, with or without
123
123
        ld->ld_options.ldo_sctrls = NULL;
124
124
        ld->ld_options.ldo_cctrls = NULL;
125
125
        ld->ld_options.ldo_defludp = NULL;
 
126
        ld->ld_options.ldo_conn_cbs = NULL;
126
127
 
127
128
#ifdef HAVE_CYRUS_SASL
128
129
        ld->ld_options.ldo_def_sasl_mech = gopts->ldo_def_sasl_mech
336
337
        int async )
337
338
{
338
339
        int rc = -1;
339
 
        char *host;
340
 
        int port, proto;
 
340
        int proto;
341
341
 
342
342
        Debug( LDAP_DEBUG_TRACE, "ldap_int_open_connection\n", 0, 0, 0 );
343
343
 
344
344
        switch ( proto = ldap_pvt_url_scheme2proto( srv->lud_scheme ) ) {
345
345
                case LDAP_PROTO_TCP:
346
 
                        port = srv->lud_port;
347
 
 
348
 
                        if ( srv->lud_host == NULL || *srv->lud_host == 0 ) {
349
 
                                host = NULL;
350
 
                        } else {
351
 
                                host = srv->lud_host;
352
 
                        }
353
 
 
354
 
                        if( !port ) {
355
 
                                if( strcmp(srv->lud_scheme, "ldaps") == 0 ) {
356
 
                                        port = LDAPS_PORT;
357
 
                                } else {
358
 
                                        port = LDAP_PORT;
359
 
                                }
360
 
                        }
361
 
 
362
346
                        rc = ldap_connect_to_host( ld, conn->lconn_sb,
363
 
                                proto, host, port, async );
 
347
                                proto, srv, async );
364
348
 
365
349
                        if ( rc == -1 ) return rc;
366
 
 
367
350
#ifdef LDAP_DEBUG
368
351
                        ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_debug,
369
352
                                LBER_SBIOD_LEVEL_PROVIDER, (void *)"tcp_" );
375
358
 
376
359
#ifdef LDAP_CONNECTIONLESS
377
360
                case LDAP_PROTO_UDP:
378
 
                        port = srv->lud_port;
379
 
 
380
 
                        if ( srv->lud_host == NULL || *srv->lud_host == 0 ) {
381
 
                                host = NULL;
382
 
                        } else {
383
 
                                host = srv->lud_host;
384
 
                        }
385
 
 
386
 
                        if( !port ) port = LDAP_PORT;
387
 
 
388
361
                        LDAP_IS_UDP(ld) = 1;
389
362
                        rc = ldap_connect_to_host( ld, conn->lconn_sb,
390
 
                                proto, host, port, async );
 
363
                                proto, srv, async );
391
364
 
392
365
                        if ( rc == -1 ) return rc;
393
366
#ifdef LDAP_DEBUG
406
379
#ifdef LDAP_PF_LOCAL
407
380
                        /* only IPC mechanism supported is PF_LOCAL (PF_UNIX) */
408
381
                        rc = ldap_connect_to_path( ld, conn->lconn_sb,
409
 
                                srv->lud_host, async );
 
382
                                srv, async );
410
383
                        if ( rc == -1 ) return rc;
411
384
#ifdef LDAP_DEBUG
412
385
                        ber_sockbuf_add_io( conn->lconn_sb, &ber_sockbuf_io_debug,