}
*text = "not supported within naming context";
- return LDAP_OPERATIONS_ERROR;
+ return LDAP_UNWILLING_TO_PERFORM;
}
0, 0, 0 );
#endif
- rc = LDAP_OPERATIONS_ERROR;
+ rc = LDAP_OTHER;
goto return_results;
}
"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;
}
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;
}
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 );
}
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 );
}
case REWRITE_REGEXEC_ERR:
send_ldap_result( conn, op,
- LDAP_OPERATIONS_ERROR,
+ LDAP_OTHER,
NULL, "Operations error",
NULL, NULL );
return( NULL );
/* 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 );
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;
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:
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 );
}
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 );
}
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 );
}
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 );
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 );
}
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;
/* 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 );
}
}
*text = "not supported within naming context";
- return LDAP_OPERATIONS_ERROR;
+ return LDAP_UNWILLING_TO_PERFORM;
}
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;
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;
}
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;
}
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;
}
goto done;
}
- rc = LDAP_OPERATIONS_ERROR;
+ rc = LDAP_OTHER;
if( is_entry_referral( e ) ) {
/* entry is an referral, don't allow operation */
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;
}
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;
}
"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;
}
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 );
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;
}
continue;
} else if ( lrc == LDAP_RES_COMPARE ) {
if ( count > 0 ) {
- rres = LDAP_OPERATIONS_ERROR;
+ rres = LDAP_OTHER;
rc = -1;
goto 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;
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 );
* 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;
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
*/
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;
}
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;
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;
( 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? */
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;
break;
default:
- rc = LDAP_OPERATIONS_ERROR;
+ rc = LDAP_OTHER;
break;
}
}
if ( !(e = pw2entry( be, pw, &text )) ) {
- err = LDAP_OPERATIONS_ERROR;
+ err = LDAP_OTHER;
endpwent();
ldap_pvt_thread_mutex_unlock( &passwd_mutex );
goto done;
if ( ldap_bv2rdn( base, &rdn, (char **)&text,
LDAP_DN_FORMAT_LDAP ))
{
- err = LDAP_OPERATIONS_ERROR;
+ err = LDAP_OTHER;
goto done;
}
e = pw2entry( be, pw, &text );
ldap_pvt_thread_mutex_unlock( &passwd_mutex );
if ( !e ) {
- err = LDAP_OPERATIONS_ERROR;
+ err = LDAP_OTHER;
goto done;
}
}
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 );
}
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 );
}
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 );
}
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 );
}
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 );
}
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 );
}
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 );
}
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 )
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;
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 );
}