summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-05-25 13:57:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:14 -0500
commit579c13da43d5b40ac6d6c1436399fbc1d8dfd054 (patch)
tree42299570746f2d7f80356b689cb15e3db6c53d3c /source4/auth
parent81e8de9ca85fe9a6658beb1dab0d231c13cda063 (diff)
downloadsamba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.gz
samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.tar.bz2
samba-579c13da43d5b40ac6d6c1436399fbc1d8dfd054.zip
r873: converted samba4 to use real 64 bit integers instead of
structures. This was suggested by metze recently. I checked on the build farm and all the machines we have support 64 bit ints, and support the LL suffix for 64 bit constants. I suspect some won't support strtoll() and related functions, so we will probably need replacements for those. (This used to be commit 9a9244a1c66654c12abe4379661cba83a73c4c21)
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/auth_sam.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 1c33b26528..549b5ab362 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -91,28 +91,28 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
/* Test account expire time */
- if (!nt_time_is_zero(acct_expiry) && time(NULL) > nt_time_to_unix(acct_expiry)) {
+ if ((*acct_expiry) != 0 && 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)));
+ nt_time_string(mem_ctx, *acct_expiry)));
return NT_STATUS_ACCOUNT_EXPIRED;
}
if (!(acct_flags & ACB_PWNOEXP)) {
/* check for immediate expiry "must change at next logon" */
- if (nt_time_is_zero(must_change_time) && !nt_time_is_zero(last_set_time)) {
+ if (*must_change_time == 0 && *last_set_time != 0) {
DEBUG(1,("sam_account_ok: Account for user '%s' password must change!.\n",
username));
return NT_STATUS_PASSWORD_MUST_CHANGE;
}
/* check for expired password */
- if (!nt_time_is_zero(must_change_time) && nt_time_to_unix(must_change_time) < time(NULL)) {
+ if ((*must_change_time) != 0 && nt_time_to_unix(*must_change_time) < time(NULL)) {
DEBUG(1,("sam_account_ok: Account for user '%s' password expired!.\n",
username));
DEBUG(1,("sam_account_ok: Password expired at '%s' unix time.\n",
- nt_time_string(mem_ctx, must_change_time)));
+ nt_time_string(mem_ctx, *must_change_time)));
return NT_STATUS_PASSWORD_EXPIRED;
}
}