mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3: Add some debugs to the winbind machine pwchange machinery
This commit is contained in:
parent
d3d37acb99
commit
d0ef9fbce6
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user