operationsError != Internal Error

hence, s/LDAP_OPERATIONS_ERROR/LDAP_OTHER/
This commit is contained in:
Kurt Zeilenga 2002-07-31 22:49:02 +00:00
parent 478a7103c0
commit 838643d5ad
32 changed files with 65 additions and 65 deletions

View File

@ -48,6 +48,6 @@ bdb_extended(
}
*text = "not supported within naming context";
return LDAP_OPERATIONS_ERROR;
return LDAP_UNWILLING_TO_PERFORM;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 );
}

View File

@ -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:

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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;

View File

@ -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 );
}

View File

@ -51,6 +51,6 @@ ldbm_back_extended(
}
*text = "not supported within naming context";
return LDAP_OPERATIONS_ERROR;
return LDAP_UNWILLING_TO_PERFORM;
}

View File

@ -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;
}

View File

@ -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 */

View File

@ -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;
}

View File

@ -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 );

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -98,7 +98,7 @@ meta_back_modrdn(
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;
}
@ -159,7 +159,7 @@ meta_back_modrdn(
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;
}
@ -189,7 +189,7 @@ meta_back_modrdn(
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;
}

View File

@ -144,7 +144,7 @@ meta_back_search(
*/
msgid = ch_calloc( sizeof( int ), li->ntargets );
if ( msgid == NULL ) {
send_search_result( conn, op, LDAP_OPERATIONS_ERROR,
send_search_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL, 0 );
return -1;
}
@ -294,8 +294,8 @@ meta_back_search(
goto finish;
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 finish;
@ -334,7 +334,7 @@ meta_back_search(
goto finish;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
rc = -1;
goto finish;
@ -438,7 +438,7 @@ meta_back_search(
( void )meta_clear_unused_candidates( li,
lc, -1, 0 );
send_search_result( conn, op,
LDAP_OPERATIONS_ERROR,
LDAP_REWRITE,
"", "", NULL, NULL, count );
/* anything else needs be done? */
@ -538,7 +538,7 @@ meta_back_search(
goto finish;
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR,
send_ldap_result( conn, op, LDAP_OTHER,
NULL, NULL, NULL, NULL );
rc = -1;
goto finish;

View File

@ -180,7 +180,7 @@ monitor_subsys_log_modify(
break;
default:
rc = LDAP_OPERATIONS_ERROR;
rc = LDAP_OTHER;
break;
}

View File

@ -144,7 +144,7 @@ passwd_back_search(
}
if ( !(e = pw2entry( be, pw, &text )) ) {
err = LDAP_OPERATIONS_ERROR;
err = LDAP_OTHER;
endpwent();
ldap_pvt_thread_mutex_unlock( &passwd_mutex );
goto done;
@ -198,7 +198,7 @@ passwd_back_search(
if ( ldap_bv2rdn( base, &rdn, (char **)&text,
LDAP_DN_FORMAT_LDAP ))
{
err = LDAP_OPERATIONS_ERROR;
err = LDAP_OTHER;
goto done;
}
@ -214,7 +214,7 @@ passwd_back_search(
e = pw2entry( be, pw, &text );
ldap_pvt_thread_mutex_unlock( &passwd_mutex );
if ( !e ) {
err = LDAP_OPERATIONS_ERROR;
err = LDAP_OTHER;
goto done;
}

View File

@ -34,7 +34,7 @@ shell_back_add(
}
if ( (op->o_private = (void *) forkandexec( si->si_add, &rfp, &wfp )) == (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
send_ldap_result( conn, op, LDAP_OTHER, NULL,
"could not fork/exec", NULL, NULL );
return( -1 );
}

View File

@ -39,7 +39,7 @@ shell_back_bind(
if ( (op->o_private = (void *) forkandexec( si->si_bind, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
send_ldap_result( conn, op, LDAP_OTHER, NULL,
"could not fork/exec", NULL, NULL );
return( -1 );
}

View File

@ -36,7 +36,7 @@ shell_back_compare(
if ( (op->o_private = (void *) forkandexec( si->si_compare, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
send_ldap_result( conn, op, LDAP_OTHER, NULL,
"could not fork/exec", NULL, NULL );
return( -1 );
}

View File

@ -35,7 +35,7 @@ shell_back_delete(
if ( (op->o_private = (void *) forkandexec( si->si_delete, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
send_ldap_result( conn, op, LDAP_OTHER, NULL,
"could not fork/exec", NULL, NULL );
return( -1 );
}

View File

@ -38,7 +38,7 @@ shell_back_modify(
if ( (op->o_private = (void *) forkandexec( si->si_modify, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
send_ldap_result( conn, op, LDAP_OTHER, NULL,
"could not fork/exec", NULL, NULL );
return( -1 );
}

View File

@ -53,7 +53,7 @@ shell_back_modrdn(
if ( (op->o_private = (void *) forkandexec( si->si_modrdn, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
send_ldap_result( conn, op, LDAP_OTHER, NULL,
"could not fork/exec", NULL, NULL );
return( -1 );
}

View File

@ -44,7 +44,7 @@ shell_back_search(
if ( (op->o_private = (void *) forkandexec( si->si_search, &rfp, &wfp ))
== (void *) -1 ) {
send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
send_ldap_result( conn, op, LDAP_OTHER, NULL,
"could not fork/exec", NULL, NULL );
return( -1 );
}

View File

@ -141,7 +141,7 @@ parse_input( FILE *ifp, FILE *ofp, struct ldop *op )
struct inputparams *ip;
if ( fgets( line, MAXLINELEN, ifp ) == NULL ) {
write_result( ofp, LDAP_OPERATIONS_ERROR, NULL, "Empty Input" );
write_result( ofp, LDAP_OTHER, NULL, "Empty Input" );
}
line[ strlen( line ) - 1 ] = '\0';
if ( strncasecmp( line, STR_OP_SEARCH, sizeof( STR_OP_SEARCH ) - 1 )
@ -174,7 +174,7 @@ parse_input( FILE *ifp, FILE *ofp, struct ldop *op )
if (( op->ldop_srch.ldsp_scope = atoi( args )) != LDAP_SCOPE_BASE &&
op->ldop_srch.ldsp_scope != LDAP_SCOPE_ONELEVEL &&
op->ldop_srch.ldsp_scope != LDAP_SCOPE_SUBTREE ) {
write_result( ofp, LDAP_OPERATIONS_ERROR, NULL, "Bad scope" );
write_result( ofp, LDAP_OTHER, NULL, "Bad scope" );
return( -1 );
}
break;
@ -214,7 +214,7 @@ parse_input( FILE *ifp, FILE *ofp, struct ldop *op )
if ( op->ldop_suffixes == NULL || op->ldop_dn == NULL ||
op->ldop_srch.ldsp_filter == NULL ) {
write_result( ofp, LDAP_OPERATIONS_ERROR, NULL,
write_result( ofp, LDAP_OTHER, NULL,
"Required suffix:, base:, or filter: missing" );
return( -1 );
}