diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-07-24 05:04:18 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-07-24 05:04:18 +0000 |
commit | 3760e52ca852c2818787720c9f33a4ddf5d66145 (patch) | |
tree | 840d34ce66f5434f9224bd6eaebc1cfd9bad1efd /source3 | |
parent | 3dc7717878d28aa4c1ee3e8dc2ef987c14b269bc (diff) | |
download | samba-3760e52ca852c2818787720c9f33a4ddf5d66145.tar.gz samba-3760e52ca852c2818787720c9f33a4ddf5d66145.tar.bz2 samba-3760e52ca852c2818787720c9f33a4ddf5d66145.zip |
Actually check the return value of the account_policy_get() call.
Andrew Bartlett
(This used to be commit a7b0a2334cd8e7234c5bcb284e4c6de7a8e45f98)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/pdb_get_set.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index ca1d54ebef..2da6de7270 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -1028,15 +1028,14 @@ BOOL pdb_set_pass_changed_now (SAM_ACCOUNT *sampass) if (!pdb_set_pass_last_set_time (sampass, time(NULL))) return False; - account_policy_get(AP_MAX_PASSWORD_AGE, &expire); - - if (expire==(uint32)-1) { + if (!account_policy_get(AP_MAX_PASSWORD_AGE, &expire) + || (expire==(uint32)-1)) { if (!pdb_set_pass_must_change_time (sampass, get_time_t_max(), False)) return False; } else { if (!pdb_set_pass_must_change_time (sampass, - pdb_get_pass_last_set_time(sampass) - + expire, True)) + pdb_get_pass_last_set_time(sampass) + + expire, True)) return False; } |