From 1276959d7c32b98f0115b008765772bf33c72eab Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 13 Jan 2003 21:49:49 +0000 Subject: Always initialise this variable - and don't set the 'must change now' if it was last changed at '0'. We need to actually change this password sometime... Andrew Bartlett (This used to be commit 740bf439d2d1512127c873cf0e57697161d6566b) --- source3/auth/auth_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/auth/auth_domain.c') 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; } -- cgit