summaryrefslogtreecommitdiff
path: root/source4/auth/auth_sam.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-26 08:02:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:19 -0500
commit39a236883ee4015980ff3d3cab8a8e5fec858502 (patch)
tree6d20f1364cf4f1dd0cc9e2237bfc9c96ce301186 /source4/auth/auth_sam.c
parent0eb7588cc4d1fa423430e61ccbef19ec2453e164 (diff)
downloadsamba-39a236883ee4015980ff3d3cab8a8e5fec858502.tar.gz
samba-39a236883ee4015980ff3d3cab8a8e5fec858502.tar.bz2
samba-39a236883ee4015980ff3d3cab8a8e5fec858502.zip
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)
Diffstat (limited to 'source4/auth/auth_sam.c')
-rw-r--r--source4/auth/auth_sam.c3
1 files changed, 1 insertions, 2 deletions
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)));