mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 18:19:52 -05:00
ITS#9853 Allow inheriting lastbind precision from the frontend
This commit is contained in:
parent
a033c1e74e
commit
294a16c10c
3 changed files with 12 additions and 4 deletions
|
|
@ -1508,7 +1508,9 @@ will be updated. More than
|
|||
.B integer
|
||||
seconds must have passed since the last successful bind. In a
|
||||
replicated environment with frequent bind activity it may be
|
||||
useful to set this to a large value.
|
||||
useful to set this to a large value. On a backend, if set to
|
||||
.B 0
|
||||
(the default), the value set on the frontend is used.
|
||||
.TP
|
||||
.B olcLimits: <selector> <limit> [<limit> [...]]
|
||||
Specify time and size limits based on the operation's initiator or
|
||||
|
|
|
|||
|
|
@ -1411,7 +1411,9 @@ will be updated. More than
|
|||
.B integer
|
||||
seconds must have passed since the last successful bind. In a
|
||||
replicated environment with frequent bind activity it may be
|
||||
useful to set this to a large value.
|
||||
useful to set this to a large value. On a backend, if set to
|
||||
.B 0
|
||||
(the default), the value set on the frontend is used.
|
||||
.TP
|
||||
.B limits <selector> <limit> [<limit> [...]]
|
||||
Specify time and size limits based on the operation's initiator or
|
||||
|
|
|
|||
|
|
@ -424,6 +424,11 @@ fe_op_lastbind( Operation *op )
|
|||
if ( (a = attr_find( e->e_attrs, slap_schema.si_ad_pwdLastSuccess )) != NULL ) {
|
||||
struct lutil_tm tm;
|
||||
struct lutil_timet tt;
|
||||
unsigned int precision = op->o_bd->be_lastbind_precision;
|
||||
|
||||
if ( precision == 0 ) {
|
||||
precision = frontendDB->be_lastbind_precision;
|
||||
}
|
||||
|
||||
if ( lutil_parsetime( a->a_nvals[0].bv_val, &tm ) == 0 ) {
|
||||
lutil_tm2time( &tm, &tt );
|
||||
|
|
@ -437,8 +442,7 @@ fe_op_lastbind( Operation *op )
|
|||
* TODO: If the recorded bind time is within configurable precision,
|
||||
* it doesn't need to be updated (save a write for nothing)
|
||||
*/
|
||||
if ( bindtime != (time_t)-1 &&
|
||||
op->o_time <= bindtime + op->o_bd->be_lastbind_precision ) {
|
||||
if ( bindtime != (time_t)-1 && op->o_time <= bindtime + precision ) {
|
||||
be_entry_release_r( op, e );
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue