Add samdb_result_account_expires() function.
authorAndrew Kroeger <andrew@sprocks.gotdns.com>
Thu, 6 Mar 2008 12:02:46 +0000 (06:02 -0600)
committerAndrew Kroeger <andrew@sprocks.gotdns.com>
Fri, 7 Mar 2008 11:59:55 +0000 (05:59 -0600)
commit01b3d89aeccdd7bd6bc2a9636e59f0c928cc22dc
tree56b915bb9e73e4306edfce5e5756f7e895766783
parent07cb435d40245fc199e67c3cc869cf1f654e9a94
Add samdb_result_account_expires() function.

Windows uses 2 different values to indicate an account doesn't expire: 0 and
9223372036854775807 (0x7FFFFFFFFFFFFFFFULL).

This function looks up the value of the accountExpires attribute and if the
value is either value indicating the account doesn't expire,
0x7FFFFFFFFFFFFFFFULL is returned.

This simplifies the tests for account expiration.  There is no need to check
elsewhere in the code for both values, therefore a simple greater-than
expression can be used.
(This used to be commit 7ce5575a3a40cca4a45ec179a153f7e909065a87)
source4/dsdb/common/util.c