Skip to content
Snippets Groups Projects
Commit bbbf2f4c authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Fix handling of non-critical controls for backends which

support no controls.
parent 5aa29206
No related branches found
No related tags found
No related merge requests found
......@@ -125,13 +125,15 @@ ldap_charray_inlist(
{
int i;
for ( i = 0; a[i] != NULL; i++ ) {
if( a == NULL ) return 0;
for ( i=0; a[i] != NULL; i++ ) {
if ( strcasecmp( s, a[i] ) == 0 ) {
return( 1 );
return 1;
}
}
return( 0 );
return 0;
}
char **
......
......@@ -736,16 +736,9 @@ backend_check_controls(
Operation *op,
const char **text )
{
LDAPControl **ctrls;
ctrls = op->o_ctrls;
if( ctrls == NULL ) {
return LDAP_SUCCESS;
}
LDAPControl **ctrls = op->o_ctrls;
if ( be->be_controls == NULL ) {
*text = "control unavailable in context";
return LDAP_UNAVAILABLE_CRITICAL_EXTENSION;
}
if( ctrls == NULL ) return LDAP_SUCCESS;
for( ; *ctrls != NULL ; ctrls++ ) {
if( (*ctrls)->ldctl_iscritical &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment