~james-page/ubuntu/maverick/openldap/fix-666028

« back to all changes in this revision

Viewing changes to servers/slapd/overlays/accesslog.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2010-02-18 00:58:13 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100218005813-8230cn0y207m8wzy
Tags: 2.4.21-0ubuntu1
* New upstream release.
* debian/rules, debian/schema/extra/: 
  Fix get-orig-source rule to supports extra schemas shipped as part of the
  debian/schema/ directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* accesslog.c - log operations for audit/history purposes */
2
 
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/accesslog.c,v 1.37.2.23 2009/03/05 18:26:47 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/overlays/accesslog.c,v 1.37.2.25 2009/11/24 05:50:11 quanah Exp $ */
3
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
4
 *
5
5
 * Copyright 2005-2009 The OpenLDAP Foundation.
580
580
        a = attr_find( rs->sr_entry->e_attrs,
581
581
                slap_schema.si_ad_entryCSN );
582
582
        if ( a ) {
583
 
                ber_len_t len = a->a_vals[0].bv_len;
584
 
                if ( len > pd->csn.bv_len )
585
 
                        len = pd->csn.bv_len;
586
 
                if ( memcmp( a->a_vals[0].bv_val, pd->csn.bv_val, len ) > 0 ) {
587
 
                        AC_MEMCPY( pd->csn.bv_val, a->a_vals[0].bv_val, len );
 
583
                ber_len_t len = a->a_nvals[0].bv_len;
 
584
                /* Paranoid len check, normalized CSNs are always the same length */
 
585
                if ( len > LDAP_LUTIL_CSNSTR_BUFSIZE )
 
586
                        len = LDAP_LUTIL_CSNSTR_BUFSIZE;
 
587
                if ( memcmp( a->a_nvals[0].bv_val, pd->csn.bv_val, len ) > 0 ) {
 
588
                        AC_MEMCPY( pd->csn.bv_val, a->a_nvals[0].bv_val, len );
588
589
                        pd->csn.bv_len = len;
589
590
                }
590
591
        }