void slap_free_ctrls(
Operation *op,
- LDAPControl **ctrls
-)
+ LDAPControl **ctrls )
{
int i;
if( sc->sc_extendedops != NULL ) {
int i;
for( i=0; sc->sc_extendedops[i] != NULL; i++ ) {
- if( strcmp( op->ore_reqoid.bv_val, sc->sc_extendedops[i] )
- == 0 )
+ if( strcmp( op->ore_reqoid.bv_val,
+ sc->sc_extendedops[i] ) == 0 )
{
tagmask=0L;
break;
}
rs->sr_err = sc->sc_parse( op, rs, c );
-
+ assert( rs->sr_err != LDAP_UNAVAILABLE_CRITICAL_EXTENSION );
if( rs->sr_err != LDAP_SUCCESS ) goto return_results;
if ( sc->sc_mask & SLAP_CTRL_FRONTEND ) {
LDAPControl *ctrl )
{
#if 0
- if ( op->o_parseModifyIncrement != SLAP_NO_CONTROL ) {
+ if ( op->o_modifyIncrement != SLAP_NO_CONTROL ) {
rs->sr_text = "modifyIncrement control specified multiple times";
return LDAP_PROTOCOL_ERROR;
}
}
#if 0
- op->o_parseModifyIncrement = ctrl->ldctl_iscritical
+ op->o_modifyIncrement = ctrl->ldctl_iscritical
? SLAP_CRITICAL_CONTROL
: SLAP_NONCRITICAL_CONTROL;
#endif
return LDAP_PROTOCOL_ERROR;
}
+ if ( op->o_sync != SLAP_NO_CONTROL ) {
+ rs->sr_text = "paged results control specified with sync control";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
if ( ctrl->ldctl_value.bv_len == 0 ) {
rs->sr_text = "paged results control value is empty (or absent)";
return LDAP_PROTOCOL_ERROR;
if ( search_flags & LDAP_SEARCH_FLAG_DOMAIN_SCOPE ) {
if ( op->o_domain_scope != SLAP_NO_CONTROL ) {
- rs->sr_text = "searchOptions control specified multiple times or with domainScope control";
+ rs->sr_text = "searchOptions control specified multiple times "
+ "or with domainScope control";
return LDAP_PROTOCOL_ERROR;
}
if ( search_flags & ~(LDAP_SEARCH_FLAG_DOMAIN_SCOPE) ) {
/* Other search flags not recognised so far */
- rs->sr_text = "searchOptions contained invalid flag";
- return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
+ rs->sr_text = "searchOptions contained unrecongized flag";
+ return LDAP_UNWILLING_TO_PERFORM;
}
return LDAP_SUCCESS;
struct slap_session_entry *se;
if ( op->o_sync != SLAP_NO_CONTROL ) {
- rs->sr_text = "LDAP Sync control specified multiple times";
+ rs->sr_text = "Sync control specified multiple times";
return LDAP_PROTOCOL_ERROR;
}
+ if ( op->o_pagedresults != SLAP_NO_CONTROL ) {
+ rs->sr_text = "Sync control specified with pagedResults control";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
+
if ( ctrl->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "LDAP Sync control value is empty (or absent)";
+ rs->sr_text = "Sync control value is empty (or absent)";
return LDAP_PROTOCOL_ERROR;
}
}
if ( (tag = ber_scanf( ber, "{i" /*}*/, &mode )) == LBER_ERROR ) {
- rs->sr_text = "LDAP Sync control : mode decoding error";
+ rs->sr_text = "Sync control : mode decoding error";
return LDAP_PROTOCOL_ERROR;
}
mode = SLAP_SYNC_REFRESH_AND_PERSIST;
break;
default:
- rs->sr_text = "LDAP Sync control : unknown update mode";
+ rs->sr_text = "Sync control : unknown update mode";
return LDAP_PROTOCOL_ERROR;
}
if ( tag == LDAP_TAG_SYNC_COOKIE ) {
struct berval tmp_bv;
if (( ber_scanf( ber, /*{*/ "o", &tmp_bv )) == LBER_ERROR ) {
- rs->sr_text = "LDAP Sync control : cookie decoding error";
+ rs->sr_text = "Sync control : cookie decoding error";
return LDAP_PROTOCOL_ERROR;
}
ber_bvarray_add( &op->o_sync_state.octet_str, &tmp_bv );
}
if ( tag == LDAP_TAG_RELOAD_HINT ) {
if (( ber_scanf( ber, /*{*/ "b", &op->o_sync_rhint )) == LBER_ERROR ) {
- rs->sr_text = "LDAP Sync control : rhint decoding error";
+ rs->sr_text = "Sync control : rhint decoding error";
return LDAP_PROTOCOL_ERROR;
}
}
if (( ber_scanf( ber, /*{*/ "}")) == LBER_ERROR ) {
- rs->sr_text = "LDAP Sync control : decoding error";
+ rs->sr_text = "Sync control : decoding error";
return LDAP_PROTOCOL_ERROR;
}