r16076: Fix for machine password timeout overflow from Shlomi Yaakobovich
authorJeremy Allison <jra@samba.org>
Wed, 7 Jun 2006 04:45:50 +0000 (04:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:17:19 +0000 (11:17 -0500)
<Shlomi@exanet.com>.
Jeremy.
(This used to be commit 5cd234a1fff1e9d025eea6600649e56c997eafc2)

source3/auth/auth_domain.c
source3/passdb/secrets.c

index 6360d10b692dcb3cf75b36d6238d3f46a1c08581..bedd318c3c3e5deaf29b7122694fdb74ca57ad84 100644 (file)
@@ -403,7 +403,7 @@ static NTSTATUS check_trustdomain_security(const struct auth_context *auth_conte
 
 #if 0
        /* Test if machine password is expired and need to be changed */
-       if (time(NULL) > last_change_time + lp_machine_password_timeout())
+       if (time(NULL) > last_change_time + (time_t)lp_machine_password_timeout())
        {
                global_machine_password_needs_changing = True;
        }
index db560b632fd0c89d3387d742af151aef99052984..ee7c441fcfceb0e3a106a7276fb756c7df773429 100644 (file)
@@ -310,7 +310,7 @@ BOOL secrets_fetch_trust_account_password(const char *domain, uint8 ret_pwd[16],
        /* Test if machine password has expired and needs to be changed */
        if (lp_machine_password_timeout()) {
                if (pass->mod_time > 0 && time(NULL) > (pass->mod_time +
-                               lp_machine_password_timeout())) {
+                               (time_t)lp_machine_password_timeout())) {
                        global_machine_password_needs_changing = True;
                }
        }