summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-02-10 23:41:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:03 -0500
commit72b30eba6463cd4479b4f2c5076209bf77e4fc57 (patch)
treeaaa34716f76abe78433f560e33ecc4d483124255 /source3/smbd
parentfbf45d8ce90e88233ce386c1275d38fed3974433 (diff)
downloadsamba-72b30eba6463cd4479b4f2c5076209bf77e4fc57.tar.gz
samba-72b30eba6463cd4479b4f2c5076209bf77e4fc57.tar.bz2
samba-72b30eba6463cd4479b4f2c5076209bf77e4fc57.zip
r13444: Add REJECT_REASON_OTHER for samr_chgpasswd_user3
Guenther (This used to be commit 58baf718be90d750f51cf51a25714fcdcd5679b7)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/chgpasswd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index 501aba3336..e04e902b3a 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/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;
}
}