mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
r14060: Only set the last rebind timestamp when we did rebind after a non-read
LDAP operation. That way we avoid the replication sleep after a simple
redirected search operation
Guenther
(This used to be commit d236caac21
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
16ea81ba7f
commit
1b0211ca13
@ -853,8 +853,27 @@ static int rebindproc_connect_with_state (LDAP *ldap_struct,
|
|||||||
username and password to? */
|
username and password to? */
|
||||||
|
|
||||||
rc = ldap_simple_bind_s(ldap_struct, ldap_state->bind_dn, ldap_state->bind_secret);
|
rc = ldap_simple_bind_s(ldap_struct, ldap_state->bind_dn, ldap_state->bind_secret);
|
||||||
|
|
||||||
GetTimeOfDay(&ldap_state->last_rebind);
|
/* only set the last rebind timestamp when we did rebind after a
|
||||||
|
* non-read LDAP operation. That way we avoid the replication sleep
|
||||||
|
* after a simple redirected search operation - Guenther */
|
||||||
|
|
||||||
|
switch (request) {
|
||||||
|
|
||||||
|
case LDAP_REQ_MODIFY:
|
||||||
|
case LDAP_REQ_ADD:
|
||||||
|
case LDAP_REQ_DELETE:
|
||||||
|
case LDAP_REQ_MODDN:
|
||||||
|
case LDAP_REQ_EXTENDED:
|
||||||
|
DEBUG(10,("rebindproc_connect_with_state: "
|
||||||
|
"setting last_rebind timestamp "
|
||||||
|
"(req: 0x%02x)\n", request));
|
||||||
|
GetTimeOfDay(&ldap_state->last_rebind);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ZERO_STRUCT(ldap_state->last_rebind);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user