Modifications *mod, **modtail, *modlast;
int gotcsn = 0, gotmname = 0, gotmtime = 0;
- if ( SLAP_LASTMOD( op->o_bd ) ) {
+ if ( SLAP_LASTMOD( op->o_bd ) && !op->orm_no_opattrs ) {
char *ptr;
timestamp.bv_val = timebuf;
for ( modtail = modsp; *modtail; modtail = &(*modtail)->sml_next ) {
ptr = ber_bvchr( &csn, '#' );
if ( ptr ) {
- timestamp.bv_len = ptr - csn.bv_val;
- if ( timestamp.bv_len >= sizeof( timebuf ) ) { /* ?!? */
- timestamp.bv_len = sizeof( timebuf ) - 1;
- }
+ timestamp.bv_len = STRLENOF("YYYYMMDDHHMMSSZ");
AC_MEMCPY( timebuf, csn.bv_val, timestamp.bv_len );
+ timebuf[timestamp.bv_len-1] = 'Z';
timebuf[timestamp.bv_len] = '\0';
} else {