From 3760e52ca852c2818787720c9f33a4ddf5d66145 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jul 2002 05:04:18 +0000 Subject: Actually check the return value of the account_policy_get() call. Andrew Bartlett (This used to be commit a7b0a2334cd8e7234c5bcb284e4c6de7a8e45f98) --- source3/passdb/pdb_get_set.c | 9 ++++----- 1 file 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; } -- cgit