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

« back to all changes in this revision

Viewing changes to servers/slapd/back-ldap/chain.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
1
/* chain.c - chain LDAP operations */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/back-ldap/chain.c,v 1.52.2.7 2008/02/11 23:26:46 kurt Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/back-ldap/chain.c,v 1.52.2.10 2009/01/22 00:01:06 kurt Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
 
 * Copyright 2003-2008 The OpenLDAP Foundation.
 
5
 * Copyright 2003-2009 The OpenLDAP Foundation.
6
6
 * Portions Copyright 2003 Howard Chu.
7
7
 * All rights reserved.
8
8
 *
63
63
        LDAP_CH_RES,
64
64
        LDAP_CH_ERR
65
65
} ldap_chain_status_t;
 
66
 
66
67
static BackendInfo      *lback;
67
68
 
68
69
typedef struct ldap_chain_t {
596
597
        struct berval   odn = op->o_req_dn,
597
598
                        ondn = op->o_req_ndn;
598
599
        slap_response   *save_response = op->o_callback->sc_response;
 
600
        Entry           *save_entry = rs->sr_entry;
 
601
        slap_mask_t     save_flags = rs->sr_flags;
599
602
 
600
603
        int             rc = LDAP_OTHER,
601
604
                        first_rc = -1;
760
763
        op->o_req_ndn = ondn;
761
764
        op->o_callback->sc_response = save_response;
762
765
        rs->sr_type = REP_SEARCHREF;
763
 
        rs->sr_entry = NULL;
 
766
        rs->sr_entry = save_entry;
 
767
        rs->sr_flags = save_flags;
764
768
 
765
769
        if ( rc != LDAP_SUCCESS ) {
766
770
                /* couldn't chase any of the referrals */
1096
1100
                "NAME 'olcChainDatabase' "
1097
1101
                "DESC 'Chain remote server configuration' "
1098
1102
                "AUXILIARY )",
1099
 
                Cft_Misc, chaincfg, chain_ldadd },
 
1103
                Cft_Misc, olcDatabaseDummy, chain_ldadd },
1100
1104
        { NULL, 0, NULL }
1101
1105
};
1102
1106
 
1187
1191
                }
1188
1192
        }
1189
1193
 
 
1194
        ca->ca_private = on;
 
1195
 
1190
1196
done:;
1191
1197
        if ( rc != LDAP_SUCCESS ) {
1192
1198
                (void)ldap_chain_db_destroy_one( ca->be, NULL );
1510
1516
        ldap_chain_t    *lc = NULL;
1511
1517
 
1512
1518
        if ( lback == NULL ) {
1513
 
                static BackendInfo      lback2;
1514
 
 
1515
1519
                lback = backend_info( "ldap" );
1516
1520
 
1517
1521
                if ( lback == NULL ) {
1518
1522
                        return 1;
1519
1523
                }
1520
 
 
1521
 
                lback2 = *lback;
1522
 
                lback2.bi_type = ldapchain.on_bi.bi_type;
1523
 
                lback = &lback2;
1524
1524
        }
1525
1525
 
1526
1526
        lc = ch_malloc( sizeof( ldap_chain_t ) );
2062
2062
int
2063
2063
chain_initialize( void )
2064
2064
{
2065
 
        int     rc;
 
2065
        int rc;
 
2066
        const char *text;
2066
2067
 
2067
2068
        /* Make sure we don't exceed the bits reserved for userland */
2068
2069
        config_check_userland( CH_LAST );