From 39a236883ee4015980ff3d3cab8a8e5fec858502 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 26 May 2004 08:02:20 +0000 Subject: r904: - fixed account expiry testing in auth_sam - added printf style format attribute checking to samdb varargs fns - fix nt_time_to_unix() for zero and -1 times (This used to be commit 41f9b144f9fe77e92f960bd11b1df397a63fd2d5) --- source4/auth/auth_sam.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/auth') diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c index af4dc4fbbc..3b51b2f396 100644 --- a/source4/auth/auth_sam.c +++ b/source4/auth/auth_sam.c @@ -90,8 +90,7 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx, } /* Test account expire time */ - - if ((*acct_expiry) != 0 && time(NULL) > nt_time_to_unix(*acct_expiry)) { + if ((*acct_expiry) != -1 && time(NULL) > nt_time_to_unix(*acct_expiry)) { DEBUG(1,("sam_account_ok: Account for user '%s' has expired.\n", username)); DEBUG(3,("sam_account_ok: Account expired at '%s'.\n", nt_time_string(mem_ctx, *acct_expiry))); -- cgit