summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_domain.c3
-rw-r--r--source3/passdb/secrets.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 79cf5b156d..b3f50072bc 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -432,7 +432,8 @@ static NTSTATUS check_ntdomain_security(const struct auth_context *auth_context,
/* Test if machine password has expired and needs to be changed */
if (lp_machine_password_timeout()) {
- if (time(NULL) > (last_change_time +
+ if (last_change_time > 0 &&
+ time(NULL) > (last_change_time +
lp_machine_password_timeout())) {
global_machine_password_needs_changing = True;
}
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index d30b13c3b6..5ba9f1dc1e 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -240,6 +240,7 @@ BOOL secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
DEBUG(4,("Using ADS machine password\n"));
E_md4hash(plaintext, ret_pwd);
SAFE_FREE(plaintext);
+ pass_last_set_time = 0;
return True;
}