]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
Add pointer to an existing document since the netscape.com URLs are dead.
[openldap] / servers / slapd / modify.c
index 9f4bcd6f12ee359a69ea3219f5a6038786943bf0..0cd1d039ab85b9bafd28040c07d578db28de7483 100644 (file)
@@ -881,7 +881,7 @@ void slap_mods_opattrs(
        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 ) {
@@ -924,11 +924,9 @@ void slap_mods_opattrs(
 
                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 {