1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

s3: Re-check the timeout in machine_password_change_handler()

Someone else might have come in between and changed the password since we
created that timed request
This commit is contained in:
Volker Lendecke 2009-11-19 17:14:40 +01:00
parent d0ef9fbce6
commit 4d0ebc90dc

View File

@ -1086,6 +1086,11 @@ static void machine_password_change_handler(struct event_context *ctx,
DEBUG(10, ("calculate_next_machine_pwd_change returned %s\n",
timeval_string(talloc_tos(), &next_change, false)));
if (!timeval_expired(&next_change)) {
DEBUG(10, ("Someone else has already changed the pw\n"));
goto done;
}
if (!winbindd_can_contact_domain(child->domain)) {
DEBUG(10,("machine_password_change_handler: Removing myself since I "
"do not have an incoming trust to domain %s\n",
@ -1129,6 +1134,7 @@ static void machine_password_change_handler(struct event_context *ctx,
"successfully changed machine password\n"));
}
done:
child->machine_password_change_event = event_add_timed(winbind_event_context(), NULL,
next_change,
machine_password_change_handler,