From 309a8fd7c62e7008b1a4c4c77c3a9ea35ed4bb07 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 23 May 2011 17:14:47 -0700 Subject: Fix bug #7054 - X account flag does not work when pwdlastset is 0. Don't allow pass_last_set_time to be set to zero (which means "user must change password on next logon") if user object doesn't allow password change. Don't automatically allow user object password change if "user must change password on next logon" is set. Jim please check. Jeremy. --- source3/passdb/pdb_get_set.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/passdb/pdb_get_set.c') diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index 6c1a2ab23d7..782c08fc1c3 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -123,8 +123,7 @@ time_t pdb_get_pass_must_change_time(const struct samu *sampass) bool pdb_get_pass_can_change(const struct samu *sampass) { - if (sampass->pass_can_change_time == get_time_t_max() && - sampass->pass_last_set_time != 0) + if (sampass->pass_can_change_time == get_time_t_max()) return False; return True; } -- cgit v1.2.1