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

« back to all changes in this revision

Viewing changes to servers/slapd/back-bdb/modrdn.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
/* modrdn.c - bdb backend modrdn routine */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/modrdn.c,v 1.185.2.11 2008/05/01 21:39:35 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/modrdn.c,v 1.185.2.14 2009/01/22 00:01:05 kurt Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
 
 * Copyright 2000-2008 The OpenLDAP Foundation.
 
5
 * Copyright 2000-2009 The OpenLDAP Foundation.
6
6
 * All rights reserved.
7
7
 *
8
8
 * Redistribution and use in source and binary forms, with or without
36
36
        char textbuf[SLAP_TEXT_BUFLEN];
37
37
        size_t textlen = sizeof textbuf;
38
38
        DB_TXN          *ltid = NULL, *lt2;
39
 
        struct bdb_op_info opinfo = {0};
 
39
        struct bdb_op_info opinfo = {{{ 0 }}};
40
40
        Entry dummy = {0};
41
41
 
42
42
        Entry           *np = NULL;                     /* newSuperior Entry */
46
46
 
47
47
        int             manageDSAit = get_manageDSAit( op );
48
48
 
49
 
        BDB_LOCKER      locker = 0;
50
49
        DB_LOCK         lock, plock, nplock;
51
50
 
52
51
        int             num_retries = 0;
164
163
                goto return_results;
165
164
        }
166
165
 
167
 
        locker = TXN_ID ( ltid );
168
 
 
169
166
        opinfo.boi_oe.oe_key = bdb;
170
167
        opinfo.boi_txn = ltid;
171
168
        opinfo.boi_err = 0;
174
171
 
175
172
        /* get entry */
176
173
        rs->sr_err = bdb_dn2entry( op, ltid, &op->o_req_ndn, &ei, 1,
177
 
                locker, &lock );
 
174
                &lock );
178
175
 
179
176
        switch( rs->sr_err ) {
180
177
        case 0:
309
306
                 * children.
310
307
                 */
311
308
                rs->sr_err = bdb_cache_find_id( op, ltid,
312
 
                        eip->bei_id, &eip, 0, locker, &plock );
 
309
                        eip->bei_id, &eip, 0, &plock );
313
310
 
314
311
                switch( rs->sr_err ) {
315
312
                case 0:
418
415
                        /* Get Entry with dn=newSuperior. Does newSuperior exist? */
419
416
 
420
417
                        rs->sr_err = bdb_dn2entry( op, ltid, np_ndn,
421
 
                                &neip, 0, locker, &nplock );
 
418
                                &neip, 0, &nplock );
422
419
 
423
420
                        switch( rs->sr_err ) {
424
421
                        case 0: np = neip->bei_e;
551
548
 
552
549
        /* Shortcut the search */
553
550
        nei = neip ? neip : eip;
554
 
        rs->sr_err = bdb_cache_find_ndn ( op, locker, &new_ndn, &nei );
 
551
        rs->sr_err = bdb_cache_find_ndn ( op, ltid, &new_ndn, &nei );
555
552
        if ( nei ) bdb_cache_entryinfo_unlock( nei );
556
553
        switch( rs->sr_err ) {
557
554
        case DB_LOCK_DEADLOCK:
747
744
 
748
745
        } else {
749
746
                rc = bdb_cache_modrdn( bdb, e, &op->orr_nnewrdn, &dummy, neip,
750
 
                        locker, &lock );
 
747
                        ltid, &lock );
751
748
                switch( rc ) {
752
749
                case DB_LOCK_DEADLOCK:
753
750
                case DB_LOCK_NOTGRANTED: