Commit 838643d5 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

operationsError != Internal Error

hence, s/LDAP_OPERATIONS_ERROR/LDAP_OTHER/
parent 478a7103
......@@ -48,6 +48,6 @@ bdb_extended(
}
*text = "not supported within naming context";
return LDAP_OPERATIONS_ERROR;
return LDAP_UNWILLING_TO_PERFORM;
}
......@@ -449,7 +449,7 @@ retry: /* transaction retry */
0, 0, 0 );
#endif
rc = LDAP_OPERATIONS_ERROR;
rc = LDAP_OTHER;
goto return_results;
}
......@@ -588,7 +588,7 @@ retry: /* transaction retry */
"bdb_modrdn: can't figure out type(s)/values(s) "
"of newrdn\n", 0, 0, 0 );
#endif
rc = LDAP_OPERATIONS_ERROR;
rc = LDAP_INVALID_DN_SYNTAX;
text = "unknown type(s) used in RDN";
goto return_results;
}
......
......@@ -98,7 +98,7 @@ bdb_exop_passwd(
if( dn.bv_len == 0 ) {
*text = "No password is associated with the Root DSE";
rc = LDAP_OPERATIONS_ERROR;
rc = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
......
......@@ -99,7 +99,7 @@ ldap_back_add(
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error", NULL, NULL );
return( -1 );
}
......
......@@ -98,7 +98,7 @@ ldap_back_bind(
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error", NULL, NULL );
return( -1 );
}
......@@ -281,7 +281,7 @@ ldap_back_getconn(struct ldapinfo *li, Connection *conn, Operation *op)
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op,
LDAP_OPERATIONS_ERROR,
LDAP_OTHER,
NULL, "Operations error",
NULL, NULL );
return( NULL );
......@@ -322,7 +322,7 @@ ldap_back_getconn(struct ldapinfo *li, Connection *conn, Operation *op)
/* Err could be -1 in case a duplicate ldapconn is inserted */
if ( err != 0 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "internal server error", NULL, NULL );
/* better destroy the ldapconn struct? */
return( NULL );
......@@ -389,7 +389,7 @@ ldap_back_map_result(int err)
case LDAP_SERVER_DOWN:
return LDAP_UNAVAILABLE;
case LDAP_LOCAL_ERROR:
return LDAP_OPERATIONS_ERROR;
return LDAP_OTHER;
case LDAP_ENCODING_ERROR:
case LDAP_DECODING_ERROR:
return LDAP_PROTOCOL_ERROR;
......@@ -398,13 +398,13 @@ ldap_back_map_result(int err)
case LDAP_AUTH_UNKNOWN:
return LDAP_AUTH_METHOD_NOT_SUPPORTED;
case LDAP_FILTER_ERROR:
return LDAP_OPERATIONS_ERROR;
return LDAP_OTHER;
case LDAP_USER_CANCELLED:
return LDAP_OPERATIONS_ERROR;
return LDAP_OTHER;
case LDAP_PARAM_ERROR:
return LDAP_PROTOCOL_ERROR;
case LDAP_NO_MEMORY:
return LDAP_OPERATIONS_ERROR;
return LDAP_OTHER;
case LDAP_CONNECT_ERROR:
return LDAP_UNAVAILABLE;
case LDAP_NOT_SUPPORTED:
......
......@@ -89,7 +89,7 @@ ldap_back_compare(
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error", NULL, NULL );
return( -1 );
}
......
......@@ -89,7 +89,7 @@ ldap_back_delete(
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error", NULL, NULL );
return( -1 );
}
......
......@@ -93,7 +93,7 @@ ldap_back_modify(
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error", NULL, NULL );
return( -1 );
}
......
......@@ -101,7 +101,7 @@ ldap_back_modrdn(
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error",
NULL, NULL );
return( -1 );
......@@ -138,7 +138,7 @@ ldap_back_modrdn(
return( -1 );
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error", NULL, NULL );
return( -1 );
}
......
......@@ -169,7 +169,7 @@ ldap_back_search(
goto finish;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Operations error", NULL, NULL );
rc = -1;
goto finish;
......
......@@ -47,7 +47,7 @@ ldbm_back_add(
/* if (rc) something bad happened to ldbm cache */
ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);
send_ldap_result( conn, op,
rc ? LDAP_OPERATIONS_ERROR : LDAP_ALREADY_EXISTS,
rc ? LDAP_OTHER : LDAP_ALREADY_EXISTS,
NULL, NULL, NULL, NULL );
return( -1 );
}
......
......@@ -51,6 +51,6 @@ ldbm_back_extended(
}
*text = "not supported within naming context";
return LDAP_OPERATIONS_ERROR;
return LDAP_UNWILLING_TO_PERFORM;
}
......@@ -384,7 +384,7 @@ ldbm_back_modrdn(
np->e_dn, 0, 0 );
#endif
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "newSuperior is a referral", NULL, NULL );
goto return_results;
......@@ -475,7 +475,7 @@ ldbm_back_modrdn(
if ( ( rc_id = dn2id ( be, &new_ndn, &id ) ) || id != NOID ) {
/* if (rc_id) something bad happened to ldbm cache */
send_ldap_result( conn, op,
rc_id ? LDAP_OPERATIONS_ERROR : LDAP_ALREADY_EXISTS,
rc_id ? LDAP_OTHER : LDAP_ALREADY_EXISTS,
NULL, NULL, NULL, NULL );
goto return_results;
}
......@@ -506,7 +506,7 @@ ldbm_back_modrdn(
0, 0, 0 );
#endif
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_INVALID_DN_SYNTAX,
NULL, "unable to parse type(s)/value(s) used in RDN", NULL, NULL );
goto return_results;
}
......
......@@ -97,7 +97,7 @@ ldbm_back_exop_passwd(
if( dn.bv_len == 0 ) {
*text = "No password is associated with the Root DSE";
rc = LDAP_OPERATIONS_ERROR;
rc = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
......@@ -125,7 +125,7 @@ ldbm_back_exop_passwd(
goto done;
}
rc = LDAP_OPERATIONS_ERROR;
rc = LDAP_OTHER;
if( is_entry_referral( e ) ) {
/* entry is an referral, don't allow operation */
......
......@@ -103,7 +103,7 @@ meta_back_add(
lc = meta_back_getconn( li, conn, op, META_OP_REQUIRE_SINGLE,
&e->e_nname, &candidate );
if ( !lc || !meta_back_dobind( lc, op ) || !meta_back_is_valid( lc, candidate ) ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
return -1;
}
......@@ -135,7 +135,7 @@ meta_back_add(
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
return -1;
}
......
......@@ -124,7 +124,7 @@ meta_back_bind(
"meta_back_bind: no target for dn %s.\n%s%s",
dn->bv_val, "", "");
#endif /* !NEW_LOGGING */
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
return -1;
}
......@@ -260,7 +260,7 @@ meta_back_do_single_bind(
return LDAP_UNWILLING_TO_PERFORM;
case REWRITE_REGEXEC_ERR:
return LDAP_OPERATIONS_ERROR;
return LDAP_OTHER;
}
rc = ldap_bind_s( lc->conns[ candidate ]->ld, mdn.bv_val, cred->bv_val, method );
......
......@@ -143,8 +143,8 @@ meta_back_compare(
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, "Operations error",
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Rewrite error",
NULL, NULL );
return -1;
}
......@@ -227,7 +227,7 @@ meta_back_compare(
continue;
} else if ( lrc == LDAP_RES_COMPARE ) {
if ( count > 0 ) {
rres = LDAP_OPERATIONS_ERROR;
rres = LDAP_OTHER;
rc = -1;
goto finish;
}
......@@ -331,8 +331,8 @@ finish:;
goto cleanup;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
NULL, "Operations error",
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Rewrite error",
NULL, NULL );
rc = -1;
goto cleanup;
......
......@@ -308,10 +308,10 @@ init_one_conn(
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op,
LDAP_OPERATIONS_ERROR,
NULL, "Operations error",
LDAP_OTHER,
NULL, "Rewrite error",
NULL, NULL );
return LDAP_OPERATIONS_ERROR;
return LDAP_OTHER;
}
assert( lsc->bound_dn.bv_val );
......@@ -524,7 +524,7 @@ meta_back_getconn(
* Err could be -1 in case a duplicate metaconn is inserted
*/
if ( err != 0 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, "Internal server error", NULL, NULL );
metaconn_free( lc );
return NULL;
......
......@@ -93,7 +93,7 @@ meta_back_delete(
lc = meta_back_getconn( li, conn, op, META_OP_REQUIRE_SINGLE,
ndn, &candidate );
if ( !lc || !meta_back_dobind( lc, op ) || !meta_back_is_valid( lc, candidate ) ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
return -1;
}
......@@ -122,7 +122,7 @@ meta_back_delete(
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
return -1;
}
......
......@@ -97,7 +97,7 @@ meta_back_modify(
lc = meta_back_getconn( li, conn, op, META_OP_REQUIRE_SINGLE,
ndn, &candidate );
if ( !lc || !meta_back_dobind( lc, op ) || !meta_back_is_valid( lc, candidate ) ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
return -1;
}
......@@ -126,7 +126,7 @@ meta_back_modify(
return -1;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
return -1;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment