1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

Actually check the return value of the account_policy_get() call.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett -
parent 83360b211a
commit a7b0a2334c

View File

@ -1028,15 +1028,14 @@ BOOL pdb_set_pass_changed_now (SAM_ACCOUNT *sampass)
if (!pdb_set_pass_last_set_time (sampass, time(NULL))) if (!pdb_set_pass_last_set_time (sampass, time(NULL)))
return False; return False;
account_policy_get(AP_MAX_PASSWORD_AGE, &expire); if (!account_policy_get(AP_MAX_PASSWORD_AGE, &expire)
|| (expire==(uint32)-1)) {
if (expire==(uint32)-1) {
if (!pdb_set_pass_must_change_time (sampass, get_time_t_max(), False)) if (!pdb_set_pass_must_change_time (sampass, get_time_t_max(), False))
return False; return False;
} else { } else {
if (!pdb_set_pass_must_change_time (sampass, if (!pdb_set_pass_must_change_time (sampass,
pdb_get_pass_last_set_time(sampass) pdb_get_pass_last_set_time(sampass)
+ expire, True)) + expire, True))
return False; return False;
} }