summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-11-08 01:34:58 +0000
committerTim Potter <tpot@samba.org>2002-11-08 01:34:58 +0000
commit5565aa9972bc47ae903a3186ac643b4651f49928 (patch)
treedd40fb00a5415e64153293e8da22709f5d158d96 /source3/auth
parente1adcd154a9e4371b48eac40f01ac0ffc8103953 (diff)
downloadsamba-5565aa9972bc47ae903a3186ac643b4651f49928.tar.gz
samba-5565aa9972bc47ae903a3186ac643b4651f49928.tar.bz2
samba-5565aa9972bc47ae903a3186ac643b4651f49928.zip
Don't set global_machine_password_needs_changing if
lp_machine_password_timeout() is set to zero. (This used to be commit 0fa87a68fea8b12242f644605aab7c2f81c1a4df)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_domain.c10
1 files changed, 6 insertions, 4 deletions
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;
+ }
}
/*