~ubuntu-branches/ubuntu/hardy/openldap2.3/hardy-updates

« back to all changes in this revision

Viewing changes to servers/slapd/back-meta/init.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2008-07-31 16:06:53 UTC
  • mfrom: (16.1.3 hardy-proposed)
  • Revision ID: james.westby@ubuntu.com-20080731160653-np1dr19qfutmqb0v
Tags: 2.4.9-0ubuntu0.8.04.1
* SECURITY UPDATE: denial of service via broken BER decoding.
* Added debian/patches/security-ber-decoding.patch: upstream fixes.
* References
  CVE-2008-2952

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenLDAP: pkg/ldap/servers/slapd/back-meta/init.c,v 1.58.2.5 2007/08/31 23:14:03 quanah Exp $ */
 
1
/* $OpenLDAP: pkg/ldap/servers/slapd/back-meta/init.c,v 1.58.2.8 2008/04/14 22:46:48 quanah Exp $ */
2
2
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3
3
 *
4
 
 * Copyright 1999-2007 The OpenLDAP Foundation.
 
4
 * Copyright 1999-2008 The OpenLDAP Foundation.
5
5
 * Portions Copyright 2001-2003 Pierangelo Masarati.
6
6
 * Portions Copyright 1999-2003 Howard Chu.
7
7
 * All rights reserved.
99
99
                return -1;
100
100
        }
101
101
 
 
102
        /* set default flags */
 
103
        mi->mi_flags =
 
104
                META_BACK_F_DEFER_ROOTDN_BIND;
 
105
 
102
106
        /*
103
107
         * At present the default is no default target;
104
108
         * this may change
134
138
        ConfigReply     *cr )
135
139
{
136
140
        metainfo_t      *mi = (metainfo_t *)be->be_private;
 
141
        BackendInfo *bi;
137
142
 
138
143
        int             i,
139
144
                        not_always = 0,
148
153
                return 1;
149
154
        }
150
155
 
 
156
        bi = backend_info( "ldap" );
 
157
        if ( !bi || !bi->bi_extra ) {
 
158
                Debug( LDAP_DEBUG_ANY,
 
159
                        "meta_back_db_open: needs back-ldap\n",
 
160
                        0, 0, 0 );
 
161
                return 1;
 
162
        }
 
163
        mi->mi_ldap_extra = (ldap_extra_t *)bi->bi_extra;
 
164
 
151
165
        for ( i = 0; i < mi->mi_ntargets; i++ ) {
152
166
                slap_bindconf   sb = { BER_BVNULL };
153
167
                metatarget_t    *mt = mi->mi_targets[ i ];