]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sql/modify.c
fix access checking; fix operational attrs addition
[openldap] / servers / slapd / back-sql / modify.c
index 623362a487852af522bb3c47bc62fe0033d8d076..c9060f98eb4a62bb3cc81526517627dbeb8e7a34 100644 (file)
@@ -65,7 +65,6 @@ backsql_modify( Operation *op, SlapReply *rs )
        bsi.bsi_e = &m;
        rs->sr_err = backsql_init_search( &bsi, &op->o_req_ndn,
                        LDAP_SCOPE_BASE, 
-                       SLAP_NO_LIMIT, SLAP_NO_LIMIT,
                        (time_t)(-1), NULL, dbh, op, rs,
                        slap_anlist_all_attributes,
                        ( BACKSQL_ISF_MATCHED | BACKSQL_ISF_GET_ENTRY ) );
@@ -124,23 +123,7 @@ backsql_modify( Operation *op, SlapReply *rs )
        }
 
        oc = backsql_id2oc( bi, bsi.bsi_base_id.eid_oc_id );
-       if ( oc == NULL ) {
-               Debug( LDAP_DEBUG_TRACE, "   backsql_modify(): "
-                       "cannot determine objectclass of entry -- aborting\n",
-                       0, 0, 0 );
-               /*
-                * FIXME: should never occur, since the entry was built!!!
-                */
-
-               /*
-                * FIXME: we don't want to send back 
-                * excessively detailed messages
-                */
-               rs->sr_err = LDAP_OTHER;
-               rs->sr_text = "SQL-backend error";
-               e = NULL;
-               goto done;
-       }
+       assert( oc != NULL );
 
        if ( !acl_check_modlist( op, &m, op->oq_modify.rs_modlist ) ) {
                rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
@@ -167,7 +150,7 @@ backsql_modify( Operation *op, SlapReply *rs )
                        goto do_transact;
                }
 
-               rs->sr_err = entry_schema_check( op->o_bd, &m, NULL, 0,
+               rs->sr_err = entry_schema_check( op, &m, NULL, 0,
                        &rs->sr_text, textbuf, sizeof( textbuf ) );
                if ( rs->sr_err != LDAP_SUCCESS ) {
                        Debug( LDAP_DEBUG_TRACE, "   backsql_add(\"%s\"): "