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

« back to all changes in this revision

Viewing changes to servers/slapd/slapadd.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/slapadd.c,v 1.36.2.4 2007/11/15 00:27:55 quanah Exp $ */
 
1
/* $OpenLDAP: pkg/ldap/servers/slapd/slapadd.c,v 1.36.2.7 2008/04/14 21:15:47 quanah Exp $ */
2
2
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3
3
 *
4
 
 * Copyright 1998-2007 The OpenLDAP Foundation.
 
4
 * Copyright 1998-2008 The OpenLDAP Foundation.
5
5
 * Portions Copyright 1998-2003 Kurt D. Zeilenga.
6
6
 * Portions Copyright 2003 IBM Corporation.
7
7
 * All rights reserved.
203
203
                                        if( continuemode ) continue;
204
204
                                        break;
205
205
                                }
 
206
                                textbuf[ 0 ] = '\0';
206
207
                        }
207
208
                }
208
209
 
255
256
                                attr_merge( e, slap_schema.si_ad_creatorsName, vals, nvals );
256
257
                        }
257
258
 
258
 
                        if( attr_find( e->e_attrs, slap_schema.si_ad_modifiersName )
259
 
                                == NULL )
260
 
                        {
261
 
                                vals[0] = name;
262
 
                                nvals[0] = nname;
263
 
                                attr_merge( e, slap_schema.si_ad_modifiersName, vals, nvals );
264
 
                        }
265
 
 
266
259
                        if( attr_find( e->e_attrs, slap_schema.si_ad_createTimestamp )
267
260
                                == NULL )
268
261
                        {
270
263
                                attr_merge( e, slap_schema.si_ad_createTimestamp, vals, NULL );
271
264
                        }
272
265
 
273
 
                        if( attr_find( e->e_attrs, slap_schema.si_ad_modifyTimestamp )
274
 
                                == NULL )
275
 
                        {
276
 
                                vals[0] = timestamp;
277
 
                                attr_merge( e, slap_schema.si_ad_modifyTimestamp, vals, NULL );
278
 
                        }
279
 
 
280
266
                        if( attr_find( e->e_attrs, slap_schema.si_ad_entryCSN )
281
267
                                == NULL )
282
268
                        {
284
270
                                attr_merge( e, slap_schema.si_ad_entryCSN, vals, NULL );
285
271
                        }
286
272
 
 
273
                        if( attr_find( e->e_attrs, slap_schema.si_ad_modifiersName )
 
274
                                == NULL )
 
275
                        {
 
276
                                vals[0] = name;
 
277
                                nvals[0] = nname;
 
278
                                attr_merge( e, slap_schema.si_ad_modifiersName, vals, nvals );
 
279
                        }
 
280
 
 
281
                        if( attr_find( e->e_attrs, slap_schema.si_ad_modifyTimestamp )
 
282
                                == NULL )
 
283
                        {
 
284
                                vals[0] = timestamp;
 
285
                                attr_merge( e, slap_schema.si_ad_modifyTimestamp, vals, NULL );
 
286
                        }
 
287
 
287
288
                        if ( update_ctxcsn ) {
288
289
                                int rc_sid;
289
290