#define RB_ERR_MASK (0x00FFU)
#define RB_ERR (0x1000U)
-#define RB_UNWILLING (0x2000U)
+#define RB_UNSUPPORTED_FLAG (0x2000U)
#define RB_REFERRAL (0x4000U)
#define RB_SEND (0x8000U)
-#define RB_UNWILLING_SEND (RB_UNWILLING|RB_SEND)
+#define RB_UNSUPPORTED (LDAP_UNWILLING_TO_PERFORM|RB_ERR|RB_UNSUPPORTED_FLAG)
+#define RB_UNSUPPORTED_SEND (RB_UNSUPPORTED|RB_SEND)
#define RB_REFERRAL_SEND (RB_REFERRAL|RB_SEND)
#define RB_ERR_SEND (RB_ERR|RB_SEND)
Debug( LDAP_DEBUG_ANY,
"%s: back-relay for DN=\"%s\" would call self.\n",
op->o_log_prefix, op->o_req_dn.bv_val, 0 );
- if ( fail_mode & RB_UNWILLING ) {
- rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
-
- } else if ( fail_mode & RB_ERR ) {
+ if ( fail_mode & RB_ERR ) {
rs->sr_err = rc;
- }
-
- if ( fail_mode & RB_SEND ) {
- send_ldap_result( op, rs );
+ if ( fail_mode & RB_SEND ) {
+ send_ldap_result( op, rs );
+ }
}
return NULL;
op->o_callback = op->o_callback->sc_next;
}
- } else {
- if ( fail_mode & RB_ERR ) {
- rs->sr_err = rc;
-
- } else if ( fail_mode & RB_UNWILLING ) {
- rc = rs->sr_err = LDAP_UNWILLING_TO_PERFORM;
+ } else if ( fail_mode & RB_ERR ) {
+ rs->sr_err = rc;
+ if ( fail_mode & RB_UNSUPPORTED_FLAG ) {
rs->sr_text = "operation not supported within naming context";
}
}
return relay_back_op( op, rs, bd, bd->be_search,
- RB_UNWILLING_SEND );
+ RB_UNSUPPORTED_SEND );
}
int
}
return relay_back_op( op, rs, bd, bd->be_compare,
- RB_UNWILLING_SEND );
+ RB_UNSUPPORTED_SEND );
}
int
}
return relay_back_op( op, rs, bd, bd->be_modify,
- RB_UNWILLING_SEND );
+ RB_UNSUPPORTED_SEND );
}
int
}
return relay_back_op( op, rs, bd, bd->be_modrdn,
- RB_UNWILLING_SEND );
+ RB_UNSUPPORTED_SEND );
}
int
}
return relay_back_op( op, rs, bd, bd->be_add,
- RB_UNWILLING_SEND );
+ RB_UNSUPPORTED_SEND );
}
int
}
return relay_back_op( op, rs, bd, bd->be_delete,
- RB_UNWILLING_SEND );
+ RB_UNSUPPORTED_SEND );
}
int
}
return relay_back_op( op, rs, bd, bd->be_extended,
- RB_UNWILLING );
+ RB_UNSUPPORTED );
}
int