mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ignore non-critical control with unrecognized flags (ITS#6480)
This commit is contained in:
parent
a2dc37d053
commit
0394c805ab
@ -1671,6 +1671,24 @@ static int parseSearchOptions (
|
|||||||
return LDAP_PROTOCOL_ERROR;
|
return LDAP_PROTOCOL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( search_flags & ~(LDAP_SEARCH_FLAG_DOMAIN_SCOPE) ) {
|
||||||
|
/* Search flags not recognised so far,
|
||||||
|
* including:
|
||||||
|
* LDAP_SEARCH_FLAG_PHANTOM_ROOT
|
||||||
|
*/
|
||||||
|
if ( ctrl->ldctl_iscritical ) {
|
||||||
|
rs->sr_text = "searchOptions contained unrecognized flag";
|
||||||
|
return LDAP_UNWILLING_TO_PERFORM;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ignore */
|
||||||
|
Debug( LDAP_DEBUG_TRACE,
|
||||||
|
"searchOptions: conn=%lu unrecognized flag(s) 0x%x (non-critical)\n",
|
||||||
|
op->o_connid, (unsigned)search_flags, 0 );
|
||||||
|
|
||||||
|
return LDAP_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
if ( search_flags & LDAP_SEARCH_FLAG_DOMAIN_SCOPE ) {
|
if ( search_flags & LDAP_SEARCH_FLAG_DOMAIN_SCOPE ) {
|
||||||
if ( op->o_domain_scope != SLAP_CONTROL_NONE ) {
|
if ( op->o_domain_scope != SLAP_CONTROL_NONE ) {
|
||||||
rs->sr_text = "searchOptions control specified multiple times "
|
rs->sr_text = "searchOptions control specified multiple times "
|
||||||
@ -1683,15 +1701,6 @@ static int parseSearchOptions (
|
|||||||
: SLAP_CONTROL_NONCRITICAL;
|
: SLAP_CONTROL_NONCRITICAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( search_flags & ~(LDAP_SEARCH_FLAG_DOMAIN_SCOPE) ) {
|
|
||||||
/* Other search flags not recognised so far,
|
|
||||||
* including:
|
|
||||||
* LDAP_SEARCH_FLAG_PHANTOM_ROOM
|
|
||||||
*/
|
|
||||||
rs->sr_text = "searchOptions contained unrecognized flag";
|
|
||||||
return LDAP_UNWILLING_TO_PERFORM;
|
|
||||||
}
|
|
||||||
|
|
||||||
return LDAP_SUCCESS;
|
return LDAP_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user