]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/modify.c
Per ITS#419, don't require SLAPD_RLOOKUPS when HAVE_TCPD
[openldap] / servers / slapd / modify.c
index 6ac98f292d3d7910d0116d1c87e33252338cc4cd..2eea03e3ef3619dbe136fcac4d40dde85c350970 100644 (file)
@@ -178,6 +178,14 @@ do_modify(
                goto cleanup;
        }
 
+       /* make sure this backend recongizes critical controls */
+       rc = backend_check_controls( be, conn, op ) ;
+
+       if( rc != LDAP_SUCCESS ) {
+               send_ldap_result( conn, op, rc,
+                       NULL, NULL, NULL, NULL );
+       }
+
        if ( global_readonly || be->be_readonly ) {
                Debug( LDAP_DEBUG_ANY, "do_modify: database is read-only\n",
                       0, 0, 0 );
@@ -244,8 +252,6 @@ do_modify(
 cleanup:
        free( dn );
        free( ndn );
-       if ( modtail != NULL && *modtail != NULL )
-               free( *modtail );
        if ( modlist != NULL )
                modlist_free( modlist );
        return rc;
@@ -288,13 +294,8 @@ add_modified_attrs( Operation *op, LDAPModList **modlist )
 
        currenttime = slap_get_time();
        ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-#ifndef LDAP_LOCALTIME
        ltm = gmtime( &currenttime );
        strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
-#else
-       ltm = localtime( &currenttime );
-       strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
-#endif
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
 
        bv.bv_val = buf;
@@ -320,7 +321,9 @@ modlist_free(
        for ( ; ml != NULL; ml = next ) {
                next = ml->ml_next;
 
-               free( ml->ml_type );
+               if (ml->ml_type)
+                       free( ml->ml_type );
+
                if ( ml->ml_bvalues != NULL )
                        ber_bvecfree( ml->ml_bvalues );