]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
trace illegal condition in backsql_strfcat
[openldap] / servers / slapd / modify.c
index 391fa3bf4c4c9a00d0d134c8af1df372d58a74ee..d0b81b15c7d37299f1dd783ee0e05ab0b384e33f 100644 (file)
@@ -205,7 +205,7 @@ do_modify(
                goto cleanup;
 
 #if defined( SLAPD_SCHEMA_DN )
-       } else if ( strcasecmp( ndn.bv_val, SLAPD_SCHEMA_DN ) == 0 ) {
+       } else if ( bvmatch( &ndn, &global_schemandn ) ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( OPERATION, ERR,
                        "do_modify: attempt to modify subschema subentry.\n" , 0, 0, 0  );
@@ -563,7 +563,7 @@ int slap_mods_opattrs(
 
                ldap_pvt_thread_mutex_lock( &gmtime_mutex );
                ltm = gmtime( &now );
-               strftime( timebuf, sizeof(timebuf), "%Y%m%d%H%M%SZ", ltm );
+               lutil_gentime( timebuf, sizeof(timebuf), ltm );
 
                csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), 0, 0 );
                ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
@@ -589,18 +589,17 @@ int slap_mods_opattrs(
                        if( rc != LDAP_SUCCESS ) {
                                return rc;
                        }
-                       if ( tmpval.bv_len ) {
-                               mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
-                               mod->sml_op = mop;
-                               mod->sml_type.bv_val = NULL;
-                               mod->sml_desc = slap_schema.si_ad_structuralObjectClass;
-                               mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
-                               ber_dupbv( &mod->sml_bvalues[0], &tmpval );
-                               mod->sml_bvalues[1].bv_val = NULL;
-                               assert( mod->sml_bvalues[0].bv_val );
-                               *modtail = mod;
-                               modtail = &mod->sml_next;
-                       }
+
+                       mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
+                       mod->sml_op = mop;
+                       mod->sml_type.bv_val = NULL;
+                       mod->sml_desc = slap_schema.si_ad_structuralObjectClass;
+                       mod->sml_bvalues = (BerVarray) ch_malloc( 2 * sizeof( struct berval ) );
+                       ber_dupbv( &mod->sml_bvalues[0], &tmpval );
+                       mod->sml_bvalues[1].bv_val = NULL;
+                       assert( mod->sml_bvalues[0].bv_val );
+                       *modtail = mod;
+                       modtail = &mod->sml_next;
                }
 
                if( SLAP_LASTMOD(be) ) {