summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-19 17:11:32 +0100
committerVolker Lendecke <vl@samba.org>2009-11-19 19:04:39 +0100
commitd0ef9fbce63472411a20f26c0804322a07b28919 (patch)
tree87fb7ff7248a84632dbac52345f9316d589498ea /source3
parentd3d37acb998672dc9d2f36927151cce8393b6d44 (diff)
downloadsamba-d0ef9fbce63472411a20f26c0804322a07b28919.tar.gz
samba-d0ef9fbce63472411a20f26c0804322a07b28919.tar.bz2
samba-d0ef9fbce63472411a20f26c0804322a07b28919.zip
s3: Add some debugs to the winbind machine pwchange machinery
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_dual.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 07a49e0e08..ccb1745506 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -1019,6 +1019,7 @@ static bool calculate_next_machine_pwd_change(const char *domain,
time_t pass_last_set_time;
time_t timeout;
time_t next_change;
+ struct timeval tv;
char *pw;
pw = secrets_fetch_machine_password(domain,
@@ -1038,6 +1039,13 @@ static bool calculate_next_machine_pwd_change(const char *domain,
return false;
}
+ tv.tv_sec = pass_last_set_time;
+ DEBUG(10, ("password last changed %s\n",
+ timeval_string(talloc_tos(), &tv, false)));
+ tv.tv_sec += timeout;
+ DEBUGADD(10, ("password valid until %s\n",
+ timeval_string(talloc_tos(), &tv, false)));
+
if (time(NULL) < (pass_last_set_time + timeout)) {
next_change = pass_last_set_time + timeout;
DEBUG(10,("machine password still valid until: %s\n",
@@ -1071,9 +1079,13 @@ static void machine_password_change_handler(struct event_context *ctx,
if (!calculate_next_machine_pwd_change(child->domain->name,
&next_change)) {
+ DEBUG(10, ("calculate_next_machine_pwd_change failed\n"));
return;
}
+ DEBUG(10, ("calculate_next_machine_pwd_change returned %s\n",
+ timeval_string(talloc_tos(), &next_change, false)));
+
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",
@@ -1096,6 +1108,10 @@ static void machine_password_change_handler(struct event_context *ctx,
child->domain->name);
TALLOC_FREE(frame);
+ DEBUG(10, ("machine_password_change_handler: "
+ "trust_pw_find_change_and_store_it returned %s\n",
+ nt_errstr(result)));
+
if (!NT_STATUS_IS_OK(result)) {
DEBUG(10,("machine_password_change_handler: "
"failed to change machine password: %s\n",