mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
Actually check the return value of the account_policy_get() call.
Andrew Bartlett
This commit is contained in:
parent
83360b211a
commit
a7b0a2334c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user