done:
- op->oq_abandon.rs_msgid = id;
+ op->orn_msgid = id;
for ( i = 0; i < nbackends; i++ ) {
op->o_bd = &backends[i];
}
#endif /* LDAP_SLAPI */
- op->oq_add.rs_e = e;
+ op->ora_e = e;
if ( (op->o_bd->be_add)( op, rs ) == 0 ) {
#ifdef SLAPD_MULTIMASTER
if ( !repl_user )
#endif
#endif
- result = lutil_passwd( &op->o_bd->be_rootpw, &op->oq_bind.rb_cred, NULL );
+ result = lutil_passwd( &op->o_bd->be_rootpw, &op->orb_cred, NULL );
#if defined( SLAPD_CRYPT ) || defined( SLAPD_SPASSWD )
#ifdef SLAPD_SPASSWD
Slapi_PBlock *pb = op->o_pb;
int rc;
- slapi_x_connection_set_pb( pb, op->o_conn );
- slapi_x_operation_set_pb( pb, op );
+ slapi_x_pblock_set_operation( pb, op );
#endif /* defined( LDAP_SLAPI ) */
for ( i = 0; i < nbackends; i++ ) {
* and the backend supports specific operational attributes,
* add them to the attribute list
*/
- if ( opattrs || ( op->oq_search.rs_attrs &&
- ad_inlist( slap_schema.si_ad_subschemaSubentry, op->oq_search.rs_attrs )) ) {
+ if ( opattrs || ( op->ors_attrs &&
+ ad_inlist( slap_schema.si_ad_subschemaSubentry, op->ors_attrs )) ) {
*ap = slap_operational_subschemaSubentry( op->o_bd );
ap = &(*ap)->a_next;
}
- if ( ( opattrs || op->oq_search.rs_attrs ) && op->o_bd && op->o_bd->be_operational != NULL ) {
+ if ( ( opattrs || op->ors_attrs ) && op->o_bd && op->o_bd->be_operational != NULL ) {
( void )op->o_bd->be_operational( op, rs, opattrs, ap );
}
gs.prevcb = op->o_callback;
- if (op->oq_search.rs_tlimit) {
- stoptime = slap_get_time () + op->oq_search.rs_tlimit;
+ if (op->ors_tlimit) {
+ stoptime = slap_get_time () + op->ors_tlimit;
}
- switch (op->oq_search.rs_scope) {
+ switch (op->ors_scope) {
case LDAP_SCOPE_BASE:
op->o_bd = glue_back_select (b0, op->o_req_ndn.bv_val);
case LDAP_SCOPE_SUBTREE:
op->o_callback = &cb;
rs->sr_err = gs.err = LDAP_UNWILLING_TO_PERFORM;
- scope0 = op->oq_search.rs_scope;
- slimit0 = op->oq_search.rs_slimit;
- tlimit0 = op->oq_search.rs_tlimit;
+ scope0 = op->ors_scope;
+ slimit0 = op->ors_slimit;
+ tlimit0 = op->ors_tlimit;
dn = op->o_req_dn;
ndn = op->o_req_ndn;
if (!gi->n[i].be || !gi->n[i].be->be_search)
continue;
if (tlimit0) {
- op->oq_search.rs_tlimit = stoptime - slap_get_time ();
- if (op->oq_search.rs_tlimit <= 0) {
+ op->ors_tlimit = stoptime - slap_get_time ();
+ if (op->ors_tlimit <= 0) {
rs->sr_err = gs.err = LDAP_TIMELIMIT_EXCEEDED;
break;
}
}
if (slimit0) {
- op->oq_search.rs_slimit = slimit0 - gs.nentries;
- if (op->oq_search.rs_slimit <= 0) {
+ op->ors_slimit = slimit0 - gs.nentries;
+ if (op->ors_slimit <= 0) {
rs->sr_err = gs.err = LDAP_SIZELIMIT_EXCEEDED;
break;
}
op->o_bd = gi->n[i].be;
if (scope0 == LDAP_SCOPE_ONELEVEL &&
dn_match(&gi->n[i].pdn, &ndn)) {
- op->oq_search.rs_scope = LDAP_SCOPE_BASE;
+ op->ors_scope = LDAP_SCOPE_BASE;
op->o_req_dn = op->o_bd->be_suffix[0];
op->o_req_ndn = op->o_bd->be_nsuffix[0];
rs->sr_err = op->o_bd->be_search(op, rs);
}
}
end_of_loop:;
- op->oq_search.rs_scope = scope0;
- op->oq_search.rs_slimit = slimit0;
- op->oq_search.rs_tlimit = tlimit0;
+ op->ors_scope = scope0;
+ op->ors_slimit = slimit0;
+ op->ors_tlimit = tlimit0;
op->o_req_dn = dn;
op->o_req_ndn = ndn;
op->o_protocol = version;
if( method != LDAP_AUTH_SASL ) {
- tag = ber_scanf( ber, /*{*/ "m}", &op->oq_bind.rb_cred );
+ tag = ber_scanf( ber, /*{*/ "m}", &op->orb_cred );
} else {
tag = ber_scanf( ber, "{m" /*}*/, &mech );
tag = ber_peek_tag( ber, &len );
if ( tag == LDAP_TAG_LDAPCRED ) {
- tag = ber_scanf( ber, "m", &op->oq_bind.rb_cred );
+ tag = ber_scanf( ber, "m", &op->orb_cred );
} else {
tag = LDAP_TAG_LDAPCRED;
- op->oq_bind.rb_cred.bv_val = NULL;
- op->oq_bind.rb_cred.bv_len = 0;
+ op->orb_cred.bv_val = NULL;
+ op->orb_cred.bv_len = 0;
}
if ( tag != LBER_ERROR ) {
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
if( rs->sr_err == LDAP_SUCCESS ) {
- op->o_conn->c_dn = op->oq_bind.rb_edn;
- if( op->oq_bind.rb_edn.bv_len != 0 ) {
+ op->o_conn->c_dn = op->orb_edn;
+ if( op->orb_edn.bv_len != 0 ) {
/* edn is always normalized already */
ber_dupbv( &op->o_conn->c_ndn, &op->o_conn->c_dn );
}
op->o_conn->c_sasl_bind_mech.bv_len = 0;
op->o_conn->c_sasl_bind_in_progress = 0;
- op->o_conn->c_sasl_ssf = op->oq_bind.rb_ssf;
- if( op->oq_bind.rb_ssf > op->o_conn->c_ssf ) {
- op->o_conn->c_ssf = op->oq_bind.rb_ssf;
+ op->o_conn->c_sasl_ssf = op->orb_ssf;
+ if( op->orb_ssf > op->o_conn->c_ssf ) {
+ op->o_conn->c_ssf = op->orb_ssf;
}
if( op->o_conn->c_dn.bv_len != 0 ) {
"conn=%lu op=%lu BIND dn=\"%s\" mech=%s ssf=%d\n",
op->o_connid, op->o_opid,
op->o_conn->c_dn.bv_val ? op->o_conn->c_dn.bv_val : "<empty>",
- op->o_conn->c_authmech.bv_val, op->oq_bind.rb_ssf );
+ op->o_conn->c_authmech.bv_val, op->orb_ssf );
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, DETAIL1,
"do_bind: SASL/%s bind: dn=\"%s\" ssf=%d\n",
op->o_conn->c_authmech.bv_val,
op->o_conn->c_dn.bv_val ? op->o_conn->c_dn.bv_val : "<empty>",
- op->oq_bind.rb_ssf );
+ op->orb_ssf );
#else
Debug( LDAP_DEBUG_TRACE,
"do_bind: SASL/%s bind: dn=\"%s\" ssf=%d\n",
op->o_conn->c_authmech.bv_val,
op->o_conn->c_dn.bv_val ? op->o_conn->c_dn.bv_val : "<empty>",
- op->oq_bind.rb_ssf );
+ op->orb_ssf );
#endif
} else if ( rs->sr_err == LDAP_SASL_BIND_IN_PROGRESS ) {
if ( method == LDAP_AUTH_SIMPLE ) {
/* accept "anonymous" binds */
- if ( op->oq_bind.rb_cred.bv_len == 0 || op->o_req_ndn.bv_len == 0 ) {
+ if ( op->orb_cred.bv_len == 0 || op->o_req_ndn.bv_len == 0 ) {
rs->sr_err = LDAP_SUCCESS;
- if( op->oq_bind.rb_cred.bv_len &&
+ if( op->orb_cred.bv_len &&
!( global_allows & SLAP_ALLOW_BIND_ANON_CRED ))
{
/* cred is not empty, disallow */
slapi_x_pblock_set_operation( pb, op );
slapi_pblock_set( pb, SLAPI_BIND_TARGET, (void *)dn.bv_val );
slapi_pblock_set( pb, SLAPI_BIND_METHOD, (void *)method );
- slapi_pblock_set( pb, SLAPI_BIND_CREDENTIALS, (void *)&op->oq_bind.rb_cred );
+ slapi_pblock_set( pb, SLAPI_BIND_CREDENTIALS, (void *)&op->orb_cred );
slapi_pblock_set( pb, SLAPI_MANAGEDSAIT, (void *)(0) );
rs->sr_err = doPluginFNs( op->o_bd, SLAPI_PLUGIN_PRE_BIND_FN, pb );
if ( slapi_pblock_get( pb, SLAPI_RESULT_CODE, (void *)&ldapRc ) != 0 )
ldapRc = LDAP_OTHER;
- op->oq_bind.rb_edn.bv_val = NULL;
- op->oq_bind.rb_edn.bv_len = 0;
+ op->orb_edn.bv_val = NULL;
+ op->orb_edn.bv_len = 0;
if ( rs->sr_err != SLAPI_BIND_FAIL && ldapRc == LDAP_SUCCESS ) {
/* Set the new connection DN. */
if ( rs->sr_err != SLAPI_BIND_ANONYMOUS ) {
- slapi_pblock_get( pb, SLAPI_CONN_DN, (void *)&op->oq_bind.rb_edn.bv_val );
+ slapi_pblock_get( pb, SLAPI_CONN_DN, (void *)&op->orb_edn.bv_val );
}
- rs->sr_err = dnPrettyNormal( NULL, &op->oq_bind.rb_edn, &op->o_req_dn, &op->o_req_ndn );
+ rs->sr_err = dnPrettyNormal( NULL, &op->orb_edn, &op->o_req_dn, &op->o_req_ndn );
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
op->o_conn->c_dn = op->o_req_dn;
op->o_conn->c_ndn = op->o_req_ndn;
#endif /* defined( LDAP_SLAPI ) */
if ( op->o_bd->be_bind ) {
- op->oq_bind.rb_method = method;
+ op->orb_method = method;
rs->sr_err = (op->o_bd->be_bind)( op, rs );
if ( rs->sr_err == 0 ) {
op->o_conn->c_authz_backend = op->o_bd;
}
- if(op->oq_bind.rb_edn.bv_len) {
- op->o_conn->c_dn = op->oq_bind.rb_edn;
+ if(op->orb_edn.bv_len) {
+ op->o_conn->c_dn = op->orb_edn;
} else {
op->o_conn->c_dn = op->o_req_dn;
op->o_req_dn.bv_val = NULL;
/* send this here to avoid a race condition */
send_ldap_result( op, rs );
- } else if (op->oq_bind.rb_edn.bv_val != NULL) {
- free( op->oq_bind.rb_edn.bv_val );
+ } else if (op->orb_edn.bv_val != NULL) {
+ free( op->orb_edn.bv_val );
}
} else {
BerElement *ber;
int i;
- assert( ber_bvcmp( &slap_EXOP_CANCEL, &op->oq_extended.rs_reqoid ) == 0 );
+ assert( ber_bvcmp( &slap_EXOP_CANCEL, &op->ore_reqoid ) == 0 );
- if ( op->oq_extended.rs_reqdata == NULL ) {
+ if ( op->ore_reqdata == NULL ) {
rs->sr_text = "no message ID supplied";
return LDAP_PROTOCOL_ERROR;
}
- ber = ber_init( op->oq_extended.rs_reqdata );
+ ber = ber_init( op->ore_reqdata );
if ( ber == NULL ) {
rs->sr_text = "internal error";
return LDAP_OTHER;
)
{
Entry *entry = NULL;
- Entry *fentry = NULL;
struct berval dn = { 0, NULL };
struct berval desc = { 0, NULL };
struct berval value = { 0, NULL };
AttributeAssertion ava = { NULL, { 0, NULL } };
- Backend *be;
int manageDSAit;
#ifdef LDAP_SLAPI
goto cleanup;
}
- fentry = entry;
-
} else if ( bvmatch( &op->o_req_ndn, &global_schemandn ) ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ARGS,
rs->sr_err = 0;
goto cleanup;
}
- fentry = entry;
}
if( entry ) {
rs->sr_err = compare_entry( op, entry, &ava );
- if( fentry) entry_free( fentry );
+ entry_free( entry );
send_ldap_result( op, rs );
#endif /* defined( LDAP_SLAPI ) */
if ( op->o_bd->be_compare ) {
- op->oq_compare.rs_ava = &ava;
+ op->orc_ava = &ava;
op->o_bd->be_compare( op, rs );
} else {
send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
break;
case LDAP_REQ_EXTENDED:
tagmask=~0L;
- assert( op->oq_extended.rs_reqoid.bv_val != NULL );
+ assert( op->ore_reqoid.bv_val != NULL );
if( sc->sc_extendedops != NULL ) {
int i;
for( i=0; sc->sc_extendedops[i] != NULL; i++ ) {
- if( strcmp( op->oq_extended.rs_reqoid.bv_val, sc->sc_extendedops[i] )
+ if( strcmp( op->ore_reqoid.bv_val, sc->sc_extendedops[i] )
== 0 )
{
tagmask=0L;
goto done;
}
- if ( ber_scanf( op->o_ber, "{m" /*}*/, &op->oq_extended.rs_reqoid ) == LBER_ERROR ) {
+ if ( ber_scanf( op->o_ber, "{m" /*}*/, &op->ore_reqoid ) == LBER_ERROR ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR, "do_extended: conn %d ber_scanf failed\n",
op->o_connid, 0, 0 );
}
#ifdef LDAP_SLAPI
- getPluginFunc( &op->oq_extended.rs_reqoid, &funcAddr ); /* NS-SLAPI extended operation */
- if( !funcAddr && !(ext = find_extop(supp_ext_list, &op->oq_extended.rs_reqoid )))
+ getPluginFunc( &op->ore_reqoid, &funcAddr ); /* NS-SLAPI extended operation */
+ if( !funcAddr && !(ext = find_extop(supp_ext_list, &op->ore_reqoid )))
#else
- if( !(ext = find_extop(supp_ext_list, &op->oq_extended.rs_reqoid )))
+ if( !(ext = find_extop(supp_ext_list, &op->ore_reqoid )))
#endif
{
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
"do_extended: conn %d unsupported operation \"%s\"\n",
- op->o_connid, op->oq_extended.rs_reqoid.bv_val, 0 );
+ op->o_connid, op->ore_reqoid.bv_val, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_extended: unsupported operation \"%s\"\n",
- op->oq_extended.rs_reqoid.bv_val, 0 ,0 );
+ op->ore_reqoid.bv_val, 0 ,0 );
#endif
send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
"unsupported extended operation" );
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, DETAIL1,
- "do_extended: conn %d oid=%s\n.", op->o_connid, op->oq_extended.rs_reqoid.bv_val, 0 );
+ "do_extended: conn %d oid=%s\n.", op->o_connid, op->ore_reqoid.bv_val, 0 );
#else
- Debug( LDAP_DEBUG_ARGS, "do_extended: oid=%s\n", op->oq_extended.rs_reqoid.bv_val, 0 ,0 );
+ Debug( LDAP_DEBUG_ARGS, "do_extended: oid=%s\n", op->ore_reqoid.bv_val, 0 ,0 );
#endif
#if defined(LDAP_SLAPI)
if (ext != NULL) { /* OpenLDAP extended operation */
#endif /* defined(LDAP_SLAPI) */
- if (reqdata.bv_val) op->oq_extended.rs_reqdata = &reqdata;
+ if (reqdata.bv_val) op->ore_reqdata = &reqdata;
rs->sr_err = (ext->ext_main)( op, rs );
if( rs->sr_err != SLAPD_ABANDON ) {
} else { /* start of Netscape extended operation */
rs->sr_err = slapi_pblock_set( pb, SLAPI_EXT_OP_REQ_OID,
- (void *)op->oq_extended.rs_reqoid.bv_val);
+ (void *)op->ore_reqoid.bv_val);
if ( rs->sr_err != LDAP_SUCCESS ) {
rs->sr_err = LDAP_OTHER;
goto done;
{
struct berval *bv;
- if ( op->oq_extended.rs_reqdata != NULL ) {
+ if ( op->ore_reqdata != NULL ) {
/* no request data should be provided */
rs->sr_text = "no request data expected";
return LDAP_PROTOCOL_ERROR;
}
}
- op->oq_modify.rs_modlist = modlist;
+ op->orm_modlist = modlist;
if ( (op->o_bd->be_modify)( op, rs ) == 0
#ifdef SLAPD_MULTIMASTER
&& !repl_user
rs->sr_err = SLAPD_DISCONNECT;
goto cleanup;
}
- op->oq_modrdn.rs_newSup = &pnewSuperior;
- op->oq_modrdn.rs_nnewSup = &nnewSuperior;
+ op->orr_newSup = &pnewSuperior;
+ op->orr_nnewSup = &nnewSuperior;
}
#ifdef NEW_LOGGING
/* FIXME: should have/use rdnPretty / rdnNormalize routines */
- rs->sr_err = dnPrettyNormal( NULL, &newrdn, &op->oq_modrdn.rs_newrdn, &op->oq_modrdn.rs_nnewrdn );
+ rs->sr_err = dnPrettyNormal( NULL, &newrdn, &op->orr_newrdn, &op->orr_nnewrdn );
if( rs->sr_err != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, INFO,
goto cleanup;
}
- if( rdnValidate( &op->oq_modrdn.rs_newrdn ) != LDAP_SUCCESS ) {
+ if( rdnValidate( &op->orr_newrdn ) != LDAP_SUCCESS ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ERR,
- "do_modrdn: invalid rdn (%s).\n", op->oq_modrdn.rs_newrdn.bv_val, 0, 0 );
+ "do_modrdn: invalid rdn (%s).\n", op->orr_newrdn.bv_val, 0, 0 );
#else
Debug( LDAP_DEBUG_ANY, "do_modrdn: invalid rdn (%s)\n",
- op->oq_modrdn.rs_newrdn.bv_val, 0, 0 );
+ op->orr_newrdn.bv_val, 0, 0 );
#endif
send_ldap_error( op, rs, LDAP_INVALID_DN_SYNTAX, "invalid new RDN" );
goto cleanup;
}
- if( op->oq_modrdn.rs_newSup ) {
+ if( op->orr_newSup ) {
rs->sr_err = dnPrettyNormal( NULL, &newSuperior, &pnewSuperior,
&nnewSuperior );
if( rs->sr_err != LDAP_SUCCESS ) {
/* Make sure that the entry being changed and the newSuperior are in
* the same backend, otherwise we return an error.
*/
- if( op->oq_modrdn.rs_newSup ) {
+ if( op->orr_newSup ) {
newSuperior_be = select_backend( &nnewSuperior, 0, 0 );
if ( newSuperior_be != op->o_bd ) {
if ( !op->o_bd->be_update_ndn.bv_len || repl_user )
#endif
{
- op->oq_modrdn.rs_deleteoldrdn = deloldrdn;
+ op->orr_deleteoldrdn = deloldrdn;
if ( (op->o_bd->be_modrdn)( op, rs ) == 0
#ifdef SLAPD_MULTIMASTER
&& ( !op->o_bd->be_update_ndn.bv_len || !repl_user )
free( op->o_req_dn.bv_val );
free( op->o_req_ndn.bv_val );
- free( op->oq_modrdn.rs_newrdn.bv_val );
- free( op->oq_modrdn.rs_nnewrdn.bv_val );
+ free( op->orr_newrdn.bv_val );
+ free( op->orr_nnewrdn.bv_val );
if ( pnewSuperior.bv_val ) free( pnewSuperior.bv_val );
if ( nnewSuperior.bv_val ) free( nnewSuperior.bv_val );
int a_cnt, d_cnt;
assert( new_rdn != NULL );
- assert( !op->oq_modrdn.rs_deleteoldrdn || old_rdn != NULL );
+ assert( !op->orr_deleteoldrdn || old_rdn != NULL );
/* Add new attribute values to the entry */
for ( a_cnt = 0; new_rdn[0][a_cnt]; a_cnt++ ) {
}
/* Remove old rdn value if required */
- if ( op->oq_modrdn.rs_deleteoldrdn ) {
+ if ( op->orr_deleteoldrdn ) {
for ( d_cnt = 0; old_rdn[0][d_cnt]; d_cnt++ ) {
AttributeDescription *desc = NULL;
Modifications *mod_tmp;
Operation *op,
SlapReply *rs )
{
- assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->oq_extended.rs_reqoid ) == 0 );
+ assert( ber_bvcmp( &slap_EXOP_MODIFY_PASSWD, &op->ore_reqoid ) == 0 );
if( op->o_dn.bv_len == 0 ) {
rs->sr_text = "only authenticated users may change passwords";
/* assume change parameter is a Modfications* */
/* fall thru */
case LDAP_REQ_MODIFY:
- for ( ml = op->oq_modify.rs_modlist; ml != NULL; ml = ml->sml_next ) {
+ for ( ml = op->orm_modlist; ml != NULL; ml = ml->sml_next ) {
int is_in, exclude;
is_in = ad_inlist( ml->sml_desc, op->o_bd->be_replica[i]->ri_attrs );
}
break;
case LDAP_REQ_ADD:
- for ( a = op->oq_add.rs_e->e_attrs; a != NULL; a = a->a_next ) {
+ for ( a = op->ora_e->e_attrs; a != NULL; a = a->a_next ) {
int is_in, exclude;
is_in = ad_inlist( a->a_desc, op->o_bd->be_replica[i]->ri_attrs );
case LDAP_REQ_MODIFY:
fprintf( fp, "changetype: modify\n" );
- ml = first ? first : op->oq_modify.rs_modlist;
+ ml = first ? first : op->orm_modlist;
for ( ; ml != NULL; ml = ml->sml_next ) {
char *type;
if ( ri && ri->ri_attrs ) {
case LDAP_REQ_ADD:
fprintf( fp, "changetype: add\n" );
- a = first ? first : op->oq_add.rs_e->e_attrs;
+ a = first ? first : op->ora_e->e_attrs;
for ( ; a != NULL; a=a->a_next ) {
if ( ri && ri->ri_attrs ) {
int is_in = ad_inlist( a->a_desc, ri->ri_attrs );
case LDAP_REQ_MODRDN:
fprintf( fp, "changetype: modrdn\n" );
- fprintf( fp, "newrdn: %s\n", op->oq_modrdn.rs_newrdn.bv_val );
- fprintf( fp, "deleteoldrdn: %d\n", op->oq_modrdn.rs_deleteoldrdn ? 1 : 0 );
- if( op->oq_modrdn.rs_newSup != NULL ) {
- fprintf( fp, "newsuperior: %s\n", op->oq_modrdn.rs_newSup->bv_val );
+ fprintf( fp, "newrdn: %s\n", op->orr_newrdn.bv_val );
+ fprintf( fp, "deleteoldrdn: %d\n", op->orr_deleteoldrdn ? 1 : 0 );
+ if( op->orr_newSup != NULL ) {
+ fprintf( fp, "newsuperior: %s\n", op->orr_newSup->bv_val );
}
}
fprintf( fp, "\n" );
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ENTRY,
"send_search_entry: conn %lu dn=\"%s\"%s\n",
- op->o_connid, rs->sr_entry->e_name.bv_val, op->oq_search.rs_attrsonly ? " (attrsOnly)" : "" );
+ op->o_connid, rs->sr_entry->e_name.bv_val, op->ors_attrsonly ? " (attrsOnly)" : "" );
#else
Debug( LDAP_DEBUG_TRACE,
"=> send_search_entry: dn=\"%s\"%s\n",
- rs->sr_entry->e_name.bv_val, op->oq_search.rs_attrsonly ? " (attrsOnly)" : "", 0 );
+ rs->sr_entry->e_name.bv_val, op->ors_attrsonly ? " (attrsOnly)" : "", 0 );
#endif
if ( ! access_allowed( op, rs->sr_entry, ad_entry, NULL, ACL_READ, NULL ) )
goto error_return;
}
- if ( ! op->oq_search.rs_attrsonly ) {
+ if ( ! op->ors_attrsonly ) {
for ( i = 0; a->a_vals[i].bv_val != NULL; i++ ) {
if ( ! access_allowed( op, rs->sr_entry,
desc, &a->a_vals[i], ACL_READ, &acl_state ) )
goto error_return;
}
- if ( ! op->oq_search.rs_attrsonly ) {
+ if ( ! op->ors_attrsonly ) {
for ( i = 0; a->a_vals[i].bv_val != NULL; i++ ) {
if ( ! access_allowed( op, rs->sr_entry,
desc, &a->a_vals[i], ACL_READ, &acl_state ) )
*/
ctx.cac_pb = op->o_pb;
ctx.cac_attrs = rs->sr_attrs;
- ctx.cac_attrsonly = op->oq_search.rs_attrsonly;
+ ctx.cac_attrsonly = op->ors_attrsonly;
ctx.cac_userattrs = userattrs;
ctx.cac_opattrs = opattrs;
ctx.cac_acl_state = acl_state;
op->o_req_dn.bv_len ? op->o_req_dn.bv_val : "",
op->o_conn->c_sasl_bind_in_progress ? "<continuing>" :
op->o_conn->c_sasl_bind_mech.bv_val,
- op->oq_bind.rb_cred.bv_len );
+ op->orb_cred.bv_len );
#else
Debug(LDAP_DEBUG_ARGS,
"==> sasl_bind: dn=\"%s\" mech=%s datalen=%ld\n",
op->o_req_dn.bv_len ? op->o_req_dn.bv_val : "",
op->o_conn->c_sasl_bind_in_progress ? "<continuing>" :
op->o_conn->c_sasl_bind_mech.bv_val,
- op->oq_bind.rb_cred.bv_len );
+ op->orb_cred.bv_len );
#endif
if ( !op->o_conn->c_sasl_bind_in_progress ) {
sc = START( ctx,
op->o_conn->c_sasl_bind_mech.bv_val,
- op->oq_bind.rb_cred.bv_val, op->oq_bind.rb_cred.bv_len,
+ op->orb_cred.bv_val, op->orb_cred.bv_len,
(SASL_CONST char **)&response.bv_val, &reslen, &rs->sr_text );
} else {
sc = STEP( ctx,
- op->oq_bind.rb_cred.bv_val, op->oq_bind.rb_cred.bv_len,
+ op->orb_cred.bv_val, op->orb_cred.bv_len,
(SASL_CONST char **)&response.bv_val, &reslen, &rs->sr_text );
}
if ( sc == SASL_OK ) {
sasl_ssf_t *ssf = NULL;
- op->oq_bind.rb_edn = op->o_conn->c_sasl_dn;
+ op->orb_edn = op->o_conn->c_sasl_dn;
op->o_conn->c_sasl_dn.bv_val = NULL;
op->o_conn->c_sasl_dn.bv_len = 0;
rs->sr_err = LDAP_SUCCESS;
(void) sasl_getprop( ctx, SASL_SSF, (void *)&ssf );
- op->oq_bind.rb_ssf = ssf ? *ssf : 0;
+ op->orb_ssf = ssf ? *ssf : 0;
- if( op->oq_bind.rb_ssf ) {
+ if( op->orb_ssf ) {
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
op->o_conn->c_sasl_layers++;
ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
/* baseObject, scope, derefAliases, sizelimit, timelimit, attrsOnly */
if ( ber_scanf( op->o_ber, "{miiiib" /*}*/,
- &base, &op->oq_search.rs_scope, &op->oq_search.rs_deref, &op->oq_search.rs_slimit,
- &op->oq_search.rs_tlimit, &op->oq_search.rs_attrsonly ) == LBER_ERROR )
+ &base, &op->ors_scope, &op->ors_deref, &op->ors_slimit,
+ &op->ors_tlimit, &op->ors_attrsonly ) == LBER_ERROR )
{
send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR, "decoding error" );
rs->sr_err = SLAPD_DISCONNECT;
goto return_results;
}
- switch( op->oq_search.rs_scope ) {
+ switch( op->ors_scope ) {
case LDAP_SCOPE_BASE:
case LDAP_SCOPE_ONELEVEL:
case LDAP_SCOPE_SUBTREE:
goto return_results;
}
- switch( op->oq_search.rs_deref ) {
+ switch( op->ors_deref ) {
case LDAP_DEREF_NEVER:
case LDAP_DEREF_FINDING:
case LDAP_DEREF_SEARCHING:
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ARGS, "SRCH \"%s\" %d %d",
- base.bv_val, op->oq_search.rs_scope, op->oq_search.rs_deref );
+ base.bv_val, op->ors_scope, op->ors_deref );
LDAP_LOG( OPERATION, ARGS, " %d %d %d\n",
- op->oq_search.rs_slimit, op->oq_search.rs_tlimit, op->oq_search.rs_attrsonly);
+ op->ors_slimit, op->ors_tlimit, op->ors_attrsonly);
#else
Debug( LDAP_DEBUG_ARGS, "SRCH \"%s\" %d %d",
- base.bv_val, op->oq_search.rs_scope, op->oq_search.rs_deref );
+ base.bv_val, op->ors_scope, op->ors_deref );
Debug( LDAP_DEBUG_ARGS, " %d %d %d\n",
- op->oq_search.rs_slimit, op->oq_search.rs_tlimit, op->oq_search.rs_attrsonly);
+ op->ors_slimit, op->ors_tlimit, op->ors_attrsonly);
#endif
/* filter - returns a "normalized" version */
- rs->sr_err = get_filter( op->o_conn, op->o_ber, &op->oq_search.rs_filter, &rs->sr_text );
+ rs->sr_err = get_filter( op->o_conn, op->o_ber, &op->ors_filter, &rs->sr_text );
if( rs->sr_err != LDAP_SUCCESS ) {
if( rs->sr_err == SLAPD_DISCONNECT ) {
rs->sr_err = LDAP_PROTOCOL_ERROR;
}
goto return_results;
}
- filter2bv( op->oq_search.rs_filter, &op->oq_search.rs_filterstr );
+ filter2bv( op->ors_filter, &op->ors_filterstr );
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ARGS,
"do_search: conn %d filter: %s\n",
- op->o_connid, op->oq_search.rs_filterstr.bv_len ? op->oq_search.rs_filterstr.bv_val : "empty", 0 );
+ op->o_connid, op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0 );
#else
Debug( LDAP_DEBUG_ARGS, " filter: %s\n",
- op->oq_search.rs_filterstr.bv_len ? op->oq_search.rs_filterstr.bv_val : "empty", 0, 0 );
+ op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0, 0 );
#endif
/* attributes */
siz = sizeof(AttributeName);
off = 0;
- if ( ber_scanf( op->o_ber, "{M}}", &op->oq_search.rs_attrs, &siz, off ) == LBER_ERROR ) {
+ if ( ber_scanf( op->o_ber, "{M}}", &op->ors_attrs, &siz, off ) == LBER_ERROR ) {
send_ldap_discon( op, rs, LDAP_PROTOCOL_ERROR, "decoding attrs error" );
rs->sr_err = SLAPD_DISCONNECT;
goto return_results;
}
for ( i=0; i<siz; i++ ) {
const char *dummy; /* ignore msgs from bv2ad */
- op->oq_search.rs_attrs[i].an_desc = NULL;
- op->oq_search.rs_attrs[i].an_oc = NULL;
- slap_bv2ad(&op->oq_search.rs_attrs[i].an_name, &op->oq_search.rs_attrs[i].an_desc, &dummy);
+ op->ors_attrs[i].an_desc = NULL;
+ op->ors_attrs[i].an_oc = NULL;
+ slap_bv2ad(&op->ors_attrs[i].an_name, &op->ors_attrs[i].an_desc, &dummy);
}
if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {
for ( i = 0; i<siz; i++ ) {
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ARGS,
- "do_search: %s", op->oq_search.rs_attrs[i].an_name.bv_val, 0, 0 );
+ "do_search: %s", op->ors_attrs[i].an_name.bv_val, 0, 0 );
#else
- Debug( LDAP_DEBUG_ARGS, " %s", op->oq_search.rs_attrs[i].an_name.bv_val, 0, 0 );
+ Debug( LDAP_DEBUG_ARGS, " %s", op->ors_attrs[i].an_name.bv_val, 0, 0 );
#endif
}
}
Statslog( LDAP_DEBUG_STATS,
"conn=%lu op=%lu SRCH base=\"%s\" scope=%d filter=\"%s\"\n",
- op->o_connid, op->o_opid, op->o_req_dn.bv_val, op->oq_search.rs_scope, op->oq_search.rs_filterstr.bv_val );
+ op->o_connid, op->o_opid, op->o_req_dn.bv_val, op->ors_scope, op->ors_filterstr.bv_val );
for ( i = 0; i<siz; i++ ) {
- alen = op->oq_search.rs_attrs[i].an_name.bv_len;
+ alen = op->ors_attrs[i].an_name.bv_len;
if (alen >= sizeof(abuf)) {
alen = sizeof(abuf)-1;
}
*ptr++ = ' ';
len++;
}
- ptr = lutil_strncopy(ptr, op->oq_search.rs_attrs[i].an_name.bv_val, alen);
+ ptr = lutil_strncopy(ptr, op->ors_attrs[i].an_name.bv_val, alen);
len += alen;
*ptr = '\0';
}
manageDSAit = get_manageDSAit( op );
- if ( op->oq_search.rs_scope == LDAP_SCOPE_BASE ) {
+ if ( op->ors_scope == LDAP_SCOPE_BASE ) {
Entry *entry = NULL;
if ( op->o_req_ndn.bv_len == 0 ) {
}
#ifdef LDAP_SLAPI
- attrs = anlist2charray( op->oq_search.rs_attrs );
+ attrs = anlist2charray( op->ors_attrs );
initSearchPlugin( op, attrs, manageDSAit );
rs->sr_err = doPreSearchPluginFNs( op );
if ( rs->sr_err == LDAP_SUCCESS ) {
}
#ifdef LDAP_SLAPI
- attrs = anlist2charray( op->oq_search.rs_attrs );
+ attrs = anlist2charray( op->ors_attrs );
initSearchPlugin( op, attrs, manageDSAit );
rs->sr_err = doPreSearchPluginFNs( op );
if ( rs->sr_err == LDAP_SUCCESS ) {
goto return_results;
} else if ( entry != NULL ) {
- rs->sr_err = test_filter( op, entry, op->oq_search.rs_filter );
+ rs->sr_err = test_filter( op, entry, op->ors_filter );
if( rs->sr_err == LDAP_COMPARE_TRUE ) {
rs->sr_entry = entry;
- rs->sr_attrs = op->oq_search.rs_attrs;
+ rs->sr_attrs = op->ors_attrs;
send_search_entry( op, rs );
rs->sr_entry = NULL;
}
*/
if ( (op->o_bd = select_backend( &op->o_req_ndn, manageDSAit, 1 )) == NULL ) {
rs->sr_ref = referral_rewrite( default_referral,
- NULL, &op->o_req_dn, op->oq_search.rs_scope );
+ NULL, &op->o_req_dn, op->ors_scope );
if (!rs->sr_ref) rs->sr_ref = default_referral;
rs->sr_err = LDAP_REFERRAL;
}
#ifdef LDAP_SLAPI
- attrs = anlist2charray( op->oq_search.rs_attrs );
+ attrs = anlist2charray( op->ors_attrs );
initSearchPlugin( op, attrs, manageDSAit );
rs->sr_err = doPreSearchPluginFNs( op );
if ( rs->sr_err != LDAP_SUCCESS ) {
if( op->o_req_dn.bv_val != NULL) free( op->o_req_dn.bv_val );
if( op->o_req_ndn.bv_val != NULL) free( op->o_req_ndn.bv_val );
- if( op->oq_search.rs_filterstr.bv_val != NULL) free( op->oq_search.rs_filterstr.bv_val );
- if( op->oq_search.rs_filter != NULL) filter_free( op->oq_search.rs_filter );
- if( op->oq_search.rs_attrs != NULL ) free( op->oq_search.rs_attrs );
+ if( op->ors_filterstr.bv_val != NULL) free( op->ors_filterstr.bv_val );
+ if( op->ors_filter != NULL) filter_free( op->ors_filter );
+ if( op->ors_attrs != NULL ) free( op->ors_attrs );
#ifdef LDAP_SLAPI
if( attrs != NULL) ch_free( attrs );
#endif /* LDAP_SLAPI */
{
slapi_x_pblock_set_operation( op->o_pb, op );
slapi_pblock_set( op->o_pb, SLAPI_SEARCH_TARGET, (void *)op->o_req_dn.bv_val );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SCOPE, (void *)op->oq_search.rs_scope );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_DEREF, (void *)op->oq_search.rs_deref );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SIZELIMIT, (void *)op->oq_search.rs_slimit );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_TIMELIMIT, (void *)op->oq_search.rs_tlimit );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_FILTER, (void *)op->oq_search.rs_filter );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_STRFILTER, (void *)op->oq_search.rs_filterstr.bv_val );
+ slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SCOPE, (void *)op->ors_scope );
+ slapi_pblock_set( op->o_pb, SLAPI_SEARCH_DEREF, (void *)op->ors_deref );
+ slapi_pblock_set( op->o_pb, SLAPI_SEARCH_SIZELIMIT, (void *)op->ors_slimit );
+ slapi_pblock_set( op->o_pb, SLAPI_SEARCH_TIMELIMIT, (void *)op->ors_tlimit );
+ slapi_pblock_set( op->o_pb, SLAPI_SEARCH_FILTER, (void *)op->ors_filter );
+ slapi_pblock_set( op->o_pb, SLAPI_SEARCH_STRFILTER, (void *)op->ors_filterstr.bv_val );
slapi_pblock_set( op->o_pb, SLAPI_SEARCH_ATTRS, (void *)attrs );
- slapi_pblock_set( op->o_pb, SLAPI_SEARCH_ATTRSONLY, (void *)op->oq_search.rs_attrsonly );
+ slapi_pblock_set( op->o_pb, SLAPI_SEARCH_ATTRSONLY, (void *)op->ors_attrsonly );
slapi_pblock_set( op->o_pb, SLAPI_MANAGEDSAIT, (void *)managedsait );
}
* The plugin can set the SLAPI_SEARCH_FILTER.
* SLAPI_SEARCH_STRFILER is not normative.
*/
- slapi_pblock_get( op->o_pb, SLAPI_SEARCH_FILTER, (void *)&op->oq_search.rs_filter);
- ch_free( op->oq_search.rs_filterstr.bv_val );
- filter2bv( op->oq_search.rs_filter, &op->oq_search.rs_filterstr );
+ slapi_pblock_get( op->o_pb, SLAPI_SEARCH_FILTER, (void *)&op->ors_filter);
+ ch_free( op->ors_filterstr.bv_val );
+ filter2bv( op->ors_filter, &op->ors_filterstr );
#ifdef NEW_LOGGING
LDAP_LOG( OPERATION, ARGS,
"doSearchRewriteFNs: after compute_rewrite_search filter: %s\n",
- op->oq_search.rs_filterstr.bv_len ? op->oq_search.rs_filterstr.bv_val : "empty", 0, 0 );
+ op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0, 0 );
#else
Debug( LDAP_DEBUG_ARGS, " after compute_rewrite_search filter: %s\n",
- op->oq_search.rs_filterstr.bv_len ? op->oq_search.rs_filterstr.bv_val : "empty", 0, 0 );
+ op->ors_filterstr.bv_len ? op->ors_filterstr.bv_val : "empty", 0, 0 );
#endif
}
void *ctx;
int rc;
- if ( op->oq_extended.rs_reqdata != NULL ) {
+ if ( op->ore_reqdata != NULL ) {
/* no request data should be provided */
rs->sr_text = "no request data expected";
return LDAP_PROTOCOL_ERROR;