diff options
author | Günther Deschner <gd@samba.org> | 2006-02-10 23:41:41 +0000 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2006-02-10 23:41:41 +0000 |
commit | 60f6cba8f5c06da8512dbf00b551c551aa07f6fd (patch) | |
tree | 27a3b57b5bf64b00e03067932d672b3878124db9 /source/smbd/chgpasswd.c | |
parent | 47c93b05addc007a7c9006648b64d40f48029777 (diff) | |
download | samba-60f6cba8f5c06da8512dbf00b551c551aa07f6fd.tar.gz samba-60f6cba8f5c06da8512dbf00b551c551aa07f6fd.tar.xz samba-60f6cba8f5c06da8512dbf00b551c551aa07f6fd.zip |
r13444: Add REJECT_REASON_OTHER for samr_chgpasswd_user3
Guenther
Diffstat (limited to 'source/smbd/chgpasswd.c')
-rw-r--r-- | source/smbd/chgpasswd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c index 501aba3336f..e04e902b3a3 100644 --- a/source/smbd/chgpasswd.c +++ b/source/smbd/chgpasswd.c @@ -1016,6 +1016,10 @@ NTSTATUS change_oem_password(SAM_ACCOUNT *hnd, char *old_passwd, char *new_passw time_t last_change_time = pdb_get_pass_last_set_time(hnd); time_t can_change_time = pdb_get_pass_can_change_time(hnd); + if (samr_reject_reason) { + *samr_reject_reason = Undefined; + } + if (pdb_get_account_policy(AP_MIN_PASSWORD_AGE, &min_age)) { /* * Windows calculates the minimum password age check @@ -1026,6 +1030,9 @@ NTSTATUS change_oem_password(SAM_ACCOUNT *hnd, char *old_passwd, char *new_passw DEBUG(1, ("user %s cannot change password now, must " "wait until %s\n", username, http_timestring(last_change_time+min_age))); + if (samr_reject_reason) { + *samr_reject_reason = REJECT_REASON_OTHER; + } return NT_STATUS_ACCOUNT_RESTRICTION; } } else { @@ -1033,6 +1040,9 @@ NTSTATUS change_oem_password(SAM_ACCOUNT *hnd, char *old_passwd, char *new_passw DEBUG(1, ("user %s cannot change password now, must " "wait until %s\n", username, http_timestring(can_change_time))); + if (samr_reject_reason) { + *samr_reject_reason = REJECT_REASON_OTHER; + } return NT_STATUS_ACCOUNT_RESTRICTION; } } |