diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-19 17:14:40 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-19 19:04:39 +0100 |
commit | 4d0ebc90dce05a66736c070d97d01c4167265a9a (patch) | |
tree | deba946b6af60a54b23e02138bd2eb08e27cd5c6 /source3 | |
parent | d0ef9fbce63472411a20f26c0804322a07b28919 (diff) | |
download | samba-4d0ebc90dce05a66736c070d97d01c4167265a9a.tar.gz samba-4d0ebc90dce05a66736c070d97d01c4167265a9a.tar.bz2 samba-4d0ebc90dce05a66736c070d97d01c4167265a9a.zip |
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
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index ccb1745506..904d3e4ed3 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -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, |