From 66531104fed805080b53838eb720e81393675f98 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 8 Nov 2002 01:38:45 +0000 Subject: Don't set global_machine_password_needs_changing if lp_machine_password_timeout() is set to zero. (This used to be commit 3692919aee186498848715505047a1cde83758b7) --- source3/auth/auth_domain.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/auth') diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index e18d809efb..f58e8bac47 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -510,10 +510,12 @@ static NTSTATUS check_ntdomain_security(const struct auth_context *auth_context, return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; } - /* Test if machine password is expired and need to be changed */ - if (time(NULL) > last_change_time + lp_machine_password_timeout()) - { - global_machine_password_needs_changing = True; + /* Test if machine password has expired and needs to be changed */ + if (lp_machine_password_timeout()) { + if (time(NULL) > (last_change_time + + lp_machine_password_timeout())) { + global_machine_password_needs_changing = True; + } } /* -- cgit