X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-passwd%2Fsearch.c;h=1317459fd5b2fb227bff4bfd897969ff6c14cc16;hb=7f773613f8486b1ce4ed30efba4520e0249fd202;hp=1932583d17a1c5d2e0a2c7785159b9bd36ea331d;hpb=091246c6fd1f0b45281a0adeb213a214c18214a3;p=openldap diff --git a/servers/slapd/back-passwd/search.c b/servers/slapd/back-passwd/search.c index 1932583d17..1317459fd5 100644 --- a/servers/slapd/back-passwd/search.c +++ b/servers/slapd/back-passwd/search.c @@ -65,15 +65,13 @@ passwd_back_search( time_t stoptime; LDAPRDN rdn = NULL; - struct berval parent = { 0, NULL }; + struct berval parent = BER_BVNULL; AttributeDescription *ad_objectClass = slap_schema.si_ad_objectClass; - op->ors_tlimit = (op->ors_tlimit > op->o_bd->be_timelimit || op->ors_tlimit < 1) ? op->o_bd->be_timelimit - : op->ors_tlimit; - stoptime = op->o_time + op->ors_tlimit; - op->ors_slimit = (op->ors_slimit > op->o_bd->be_sizelimit || op->ors_slimit < 1) ? op->o_bd->be_sizelimit - : op->ors_slimit; + if (op->ors_tlimit != SLAP_NO_LIMIT ) { + stoptime = op->o_time + op->ors_tlimit; + } /* Handle a query for the base of this backend */ if ( be_issuffix( op->o_bd, &op->o_req_ndn ) ) { @@ -131,6 +129,7 @@ passwd_back_search( if ( test_filter( op, e, op->ors_filter ) == LDAP_COMPARE_TRUE ) { rs->sr_entry = e; rs->sr_attrs = op->ors_attrs; + rs->sr_flags = REP_ENTRY_MODIFIABLE; send_search_entry( op, rs ); } } @@ -149,7 +148,9 @@ passwd_back_search( } /* check time limit */ - if ( slap_get_time() > stoptime ) { + if ( op->ors_tlimit != SLAP_NO_LIMIT + && slap_get_time() > stoptime ) + { send_ldap_error( op, rs, LDAP_TIMELIMIT_EXCEEDED, NULL ); endpwent(); ldap_pvt_thread_mutex_unlock( &passwd_mutex ); @@ -174,6 +175,7 @@ passwd_back_search( rs->sr_entry = e; rs->sr_attrs = op->ors_attrs; + rs->sr_flags = REP_ENTRY_MODIFIABLE; send_search_entry( op, rs ); } @@ -233,6 +235,7 @@ passwd_back_search( if ( test_filter( op, e, op->ors_filter ) == LDAP_COMPARE_TRUE ) { rs->sr_entry = e; rs->sr_attrs = op->ors_attrs; + rs->sr_flags = REP_ENTRY_MODIFIABLE; send_search_entry( op, rs ); }