return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len ) {
- rs->sr_text = "dontUseCopy control value not empty";
+ if ( !BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "dontUseCopy control value not absent";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len ) {
- rs->sr_text = "relax control value not empty";
+ if ( !BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "relax control value not absent";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len ) {
- rs->sr_text = "manageDSAit control value not empty";
+ if ( !BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "manageDSAit control value not absent";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "proxy authorization control value absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
if ( !( global_allows & SLAP_ALLOW_PROXY_AUTHZ_ANON )
&& BER_BVISEMPTY( &op->o_ndn ) )
{
ctrl->ldctl_value.bv_len ? ctrl->ldctl_value.bv_val : "anonymous",
0 );
- if ( ctrl->ldctl_value.bv_len == 0 ) {
+ if ( BER_BVISEMPTY( &ctrl->ldctl_value )) {
Debug( LDAP_DEBUG_TRACE,
"parseProxyAuthz: conn=%lu anonymous\n",
op->o_connid, 0, 0 );
return LDAP_PROTOCOL_ERROR;
}
+ if ( BER_BVISNULL( &ctrl->ldctl_value ) ) {
+ rs->sr_text = "paged results control value is absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
if ( BER_BVISEMPTY( &ctrl->ldctl_value ) ) {
- rs->sr_text = "paged results control value is empty (or absent)";
+ rs->sr_text = "paged results control value is empty";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
+ if ( BER_BVISNULL( &ctrl->ldctl_value ) ) {
+ rs->sr_text = "sorted results control value is absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
if ( BER_BVISEMPTY( &ctrl->ldctl_value ) ) {
- rs->sr_text = "sorted results control value is empty (or absent)";
+ rs->sr_text = "sorted results control value is empty";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "assert control value is empty (or absent)";
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "assert control value is absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
+ if ( BER_BVISEMPTY( &ctrl->ldctl_value )) {
+ rs->sr_text = "assert control value is empty";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "preread control value is empty (or absent)";
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "preread control value is absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
+ if ( BER_BVISEMPTY( &ctrl->ldctl_value )) {
+ rs->sr_text = "preread control value is empty";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "postread control value is empty (or absent)";
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "postread control value is absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
+ if ( BER_BVISEMPTY( &ctrl->ldctl_value )) {
+ rs->sr_text = "postread control value is empty";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "valuesReturnFilter control value is empty (or absent)";
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "valuesReturnFilter control value is absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
+ if ( BER_BVISEMPTY( &ctrl->ldctl_value )) {
+ rs->sr_text = "valuesReturnFilter control value is empty";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len ) {
- rs->sr_text = "permissiveModify control value not empty";
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "permissiveModify control value not absent";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len ) {
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
rs->sr_text = "domainScope control value not empty";
return LDAP_PROTOCOL_ERROR;
}
return LDAP_PROTOCOL_ERROR;
}
- if ( ctrl->ldctl_value.bv_len ) {
- rs->sr_text = "treeDelete control value not empty";
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "treeDelete control value not absent";
return LDAP_PROTOCOL_ERROR;
}
ber_int_t search_flags;
ber_tag_t tag;
- if ( ctrl->ldctl_value.bv_len == 0 ) {
- rs->sr_text = "searchOptions control value is empty (or absent)";
+ if ( BER_BVISNULL( &ctrl->ldctl_value )) {
+ rs->sr_text = "searchOptions control value is absent";
+ return LDAP_PROTOCOL_ERROR;
+ }
+
+ if ( BER_BVISEMPTY( &ctrl->ldctl_value )) {
+ rs->sr_text = "searchOptions control value is empty";
return LDAP_PROTOCOL_ERROR;
}