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

« back to all changes in this revision

Viewing changes to servers/slapd/ad.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
/* ad.c - routines for dealing with attribute descriptions */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/ad.c,v 1.95.2.4 2008/02/11 23:26:43 kurt Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/ad.c,v 1.95.2.7 2009/02/09 16:01:20 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
 
 * Copyright 1998-2008 The OpenLDAP Foundation.
 
5
 * Copyright 1998-2009 The OpenLDAP Foundation.
6
6
 * All rights reserved.
7
7
 *
8
8
 * Redistribution and use in source and binary forms, with or without
64
64
static Attr_option *options = &lang_option;
65
65
static int option_count = 1;
66
66
 
 
67
static int msad_range_hack = 0;
 
68
 
67
69
static Attr_option *ad_find_option_definition( const char *opt, int optlen );
68
70
 
69
71
static int ad_keystring(
76
78
        }
77
79
 
78
80
        for( i=1; i<bv->bv_len; i++ ) {
79
 
                if( !AD_CHAR( bv->bv_val[i] ) ) {
 
81
                if( !AD_CHAR( bv->bv_val[i] )) {
 
82
                        if ( msad_range_hack && bv->bv_val[i] == '=' )
 
83
                                continue;
80
84
                        return 1;
81
85
                }
82
86
        }
234
238
                } else if ( ad_find_option_definition( opt, optlen ) ) {
235
239
                        int i;
236
240
 
237
 
                        if( opt[optlen-1] == '-' ) {
 
241
                        if( opt[optlen-1] == '-' ||
 
242
                                ( opt[optlen-1] == '=' && msad_range_hack )) {
238
243
                                desc.ad_flags |= SLAP_DESC_TAG_RANGE;
239
244
                        }
240
245
 
817
822
 
818
823
                        *u_ad = (*u_ad)->ad_next;
819
824
 
 
825
                        tmp->ad_type = nat;
820
826
                        tmp->ad_next = NULL;
 
827
                        /* ad_cname was contiguous, no leak here */
 
828
                        tmp->ad_cname = nat->sat_cname;
821
829
                        *n_ad = tmp;
822
830
                        n_ad = &tmp->ad_next;
823
831
                } else {
1175
1183
        optlen = 0;
1176
1184
        do {
1177
1185
                if ( !DESC_CHAR( name[optlen] ) ) {
 
1186
                        /* allow trailing '=', same as '-' */
 
1187
                        if ( name[optlen] == '=' && !name[optlen+1] ) {
 
1188
                                msad_range_hack = 1;
 
1189
                                continue;
 
1190
                        }
1178
1191
                        Debug( LDAP_DEBUG_ANY,
1179
1192
                               "%s: line %d: illegal option name \"%s\"\n",
1180
1193
                                    fname, lineno, name );
1201
1214
 
1202
1215
        options[i].name.bv_val = ch_strdup( name );
1203
1216
        options[i].name.bv_len = optlen;
1204
 
        options[i].prefix = (name[optlen-1] == '-');
 
1217
        options[i].prefix = (name[optlen-1] == '-') ||
 
1218
                (name[optlen-1] == '=');
1205
1219
 
1206
1220
        if ( i != option_count &&
1207
1221
             options[i].prefix &&