mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 19:49:35 -05:00
Add NOOP search support.
This commit is contained in:
parent
90b1e7bd45
commit
132506e13c
2 changed files with 22 additions and 15 deletions
|
|
@ -19,18 +19,19 @@
|
|||
|
||||
#include "../../libraries/liblber/lber-int.h"
|
||||
|
||||
#define SLAP_CTRL_FRONTEND 0x80000000U
|
||||
#define SLAP_CTRL_FRONTEND 0x80000000U
|
||||
#define SLAP_CTRL_FRONTEND_SEARCH 0x01000000U /* for NOOP */
|
||||
|
||||
#define SLAP_CTRL_OPFLAGS 0x0000FFFFU
|
||||
#define SLAP_CTRL_ABANDON 0x00000001U
|
||||
#define SLAP_CTRL_ADD 0x00002002U
|
||||
#define SLAP_CTRL_BIND 0x00000004U
|
||||
#define SLAP_CTRL_COMPARE 0x00001008U
|
||||
#define SLAP_CTRL_DELETE 0x00002010U
|
||||
#define SLAP_CTRL_MODIFY 0x00002020U
|
||||
#define SLAP_CTRL_RENAME 0x00002040U
|
||||
#define SLAP_CTRL_SEARCH 0x00001080U
|
||||
#define SLAP_CTRL_UNBIND 0x00000100U
|
||||
#define SLAP_CTRL_OPFLAGS 0x0000FFFFU
|
||||
#define SLAP_CTRL_ABANDON 0x00000001U
|
||||
#define SLAP_CTRL_ADD 0x00002002U
|
||||
#define SLAP_CTRL_BIND 0x00000004U
|
||||
#define SLAP_CTRL_COMPARE 0x00001008U
|
||||
#define SLAP_CTRL_DELETE 0x00002010U
|
||||
#define SLAP_CTRL_MODIFY 0x00002020U
|
||||
#define SLAP_CTRL_RENAME 0x00002040U
|
||||
#define SLAP_CTRL_SEARCH 0x00001080U
|
||||
#define SLAP_CTRL_UNBIND 0x00000100U
|
||||
|
||||
#define SLAP_CTRL_INTROGATE (SLAP_CTRL_COMPARE|SLAP_CTRL_SEARCH)
|
||||
#define SLAP_CTRL_UPDATE \
|
||||
|
|
@ -68,7 +69,7 @@ static struct slap_control {
|
|||
#endif
|
||||
#ifdef LDAP_CONTROL_NOOP
|
||||
{ LDAP_CONTROL_NOOP,
|
||||
SLAP_CTRL_UPDATE, NULL,
|
||||
SLAP_CTRL_ACCESS, NULL,
|
||||
parseNoOp },
|
||||
#endif
|
||||
#ifdef LDAP_CONTROL_PAGEDRESULTS_REQUEST
|
||||
|
|
@ -331,7 +332,13 @@ int get_ctrls(
|
|||
|
||||
if( rc != LDAP_SUCCESS ) goto return_results;
|
||||
|
||||
if( sc->sc_mask & SLAP_CTRL_FRONTEND ) {
|
||||
if ( sc->sc_mask & SLAP_CTRL_FRONTEND ) {
|
||||
/* kludge to disable backend_control() check */
|
||||
c->ldctl_iscritical = 0;
|
||||
|
||||
} else if ( tagmask == SLAP_CTRL_SEARCH &&
|
||||
sc->sc_mask & SLAP_CTRL_FRONTEND_SEARCH )
|
||||
{
|
||||
/* kludge to disable backend_control() check */
|
||||
c->ldctl_iscritical = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,7 @@ send_search_entry(
|
|||
return( 1 );
|
||||
}
|
||||
|
||||
bytes = send_ldap_ber( conn, ber );
|
||||
bytes = op->o_noop ? 0 : send_ldap_ber( conn, ber );
|
||||
ber_free_buf( ber );
|
||||
|
||||
if ( bytes < 0 ) {
|
||||
|
|
@ -1301,7 +1301,7 @@ send_search_reference(
|
|||
return -1;
|
||||
}
|
||||
|
||||
bytes = send_ldap_ber( conn, ber );
|
||||
bytes = op->o_noop ? 0 : send_ldap_ber( conn, ber );
|
||||
ber_free_buf( ber );
|
||||
|
||||
ldap_pvt_thread_mutex_lock( &num_sent_mutex );
|
||||
|
|
|
|||
Loading…
Reference in a new issue