diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 2 | ||||
-rw-r--r-- | source3/rpc_client/cli_samr.c | 2 | ||||
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 7 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 21 | ||||
-rw-r--r-- | source3/smbd/chgpasswd.c | 18 | ||||
-rw-r--r-- | source3/winbindd/winbindd_pam.c | 4 |
6 files changed, 26 insertions, 28 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index d31483a02e..dd46bdda83 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5427,7 +5427,7 @@ NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli, const char *newpassword, const char *oldpassword, struct samr_DomInfo1 **dominfo1, - struct samr_ChangeReject **reject); + struct userPwdChangeFailureInformation **reject); void get_query_dispinfo_params(int loop_count, uint32 *max_entries, uint32 *max_size); NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli, diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 5a0dff2965..df22ecb284 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -187,7 +187,7 @@ NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli, const char *newpassword, const char *oldpassword, struct samr_DomInfo1 **dominfo1, - struct samr_ChangeReject **reject) + struct userPwdChangeFailureInformation **reject) { NTSTATUS status; diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 9e95c48033..d3a3372107 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -2025,7 +2025,7 @@ NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p, const char *wks = NULL; uint32 reject_reason; struct samr_DomInfo1 *dominfo = NULL; - struct samr_ChangeReject *reject = NULL; + struct userPwdChangeFailureInformation *reject = NULL; uint32_t tmp; DEBUG(5,("_samr_ChangePasswordUser3: %d\n", __LINE__)); @@ -2070,7 +2070,8 @@ NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p, return NT_STATUS_NO_MEMORY; } - reject = TALLOC_ZERO_P(p->mem_ctx, struct samr_ChangeReject); + reject = TALLOC_ZERO_P(p->mem_ctx, + struct userPwdChangeFailureInformation); if (!reject) { return NT_STATUS_NO_MEMORY; } @@ -2105,7 +2106,7 @@ NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p, dominfo->password_properties |= DOMAIN_PASSWORD_COMPLEX; } - reject->reason = reject_reason; + reject->extendedFailureReason = reject_reason; *r->out.dominfo = dominfo; *r->out.reject = reject; diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 699b54d364..e52411f8f7 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -2538,7 +2538,7 @@ static NTSTATUS cmd_samr_chgpasswd3(struct rpc_pipe_client *cli, const char *user, *oldpass, *newpass; uint32 access_mask = MAXIMUM_ALLOWED_ACCESS; struct samr_DomInfo1 *info = NULL; - struct samr_ChangeReject *reject = NULL; + struct userPwdChangeFailureInformation *reject = NULL; if (argc < 3) { printf("Usage: %s username oldpass newpass\n", argv[0]); @@ -2581,22 +2581,19 @@ static NTSTATUS cmd_samr_chgpasswd3(struct rpc_pipe_client *cli, display_sam_dom_info_1(info); - switch (reject->reason) { - case SAMR_REJECT_TOO_SHORT: - d_printf("SAMR_REJECT_TOO_SHORT\n"); + switch (reject->extendedFailureReason) { + case SAM_PWD_CHANGE_PASSWORD_TOO_SHORT: + d_printf("SAM_PWD_CHANGE_PASSWORD_TOO_SHORT\n"); break; - case SAMR_REJECT_IN_HISTORY: - d_printf("SAMR_REJECT_IN_HISTORY\n"); + case SAM_PWD_CHANGE_PWD_IN_HISTORY: + d_printf("SAM_PWD_CHANGE_PWD_IN_HISTORY\n"); break; - case SAMR_REJECT_COMPLEXITY: - d_printf("SAMR_REJECT_COMPLEXITY\n"); - break; - case SAMR_REJECT_OTHER: - d_printf("SAMR_REJECT_OTHER\n"); + case SAM_PWD_CHANGE_NOT_COMPLEX: + d_printf("SAM_PWD_CHANGE_NOT_COMPLEX\n"); break; default: d_printf("unknown reject reason: %d\n", - reject->reason); + reject->extendedFailureReason); break; } } diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c index eaee3d8509..e2069060aa 100644 --- a/source3/smbd/chgpasswd.c +++ b/source3/smbd/chgpasswd.c @@ -778,7 +778,7 @@ NTSTATUS pass_oem_change(char *user, const uchar old_lm_hash_encrypted[16], uchar password_encrypted_with_nt_hash[516], const uchar old_nt_hash_encrypted[16], - uint32 *reject_reason) + enum samPwdChangeReason *reject_reason) { char *new_passwd = NULL; struct samu *sampass = NULL; @@ -1081,7 +1081,7 @@ static bool check_passwd_history(struct samu *sampass, const char *plaintext) is correct before calling. JRA. ************************************************************/ -NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, uint32 *samr_reject_reason) +NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passwd, bool as_root, enum samPwdChangeReason *samr_reject_reason) { uint32 min_len; uint32 refuse; @@ -1091,14 +1091,14 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw time_t can_change_time = pdb_get_pass_can_change_time(hnd); if (samr_reject_reason) { - *samr_reject_reason = Undefined; + *samr_reject_reason = SAM_PWD_CHANGE_NO_ERROR; } /* check to see if the secdesc has previously been set to disallow */ if (!pdb_get_pass_can_change(hnd)) { DEBUG(1, ("user %s does not have permissions to change password\n", username)); if (samr_reject_reason) { - *samr_reject_reason = SAMR_REJECT_OTHER; + *samr_reject_reason = SAM_PWD_CHANGE_NO_ERROR; } return NT_STATUS_ACCOUNT_RESTRICTION; } @@ -1112,7 +1112,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw "denied by Refuse Machine Password Change policy\n", username)); if (samr_reject_reason) { - *samr_reject_reason = SAMR_REJECT_OTHER; + *samr_reject_reason = SAM_PWD_CHANGE_NO_ERROR; } return NT_STATUS_ACCOUNT_RESTRICTION; } @@ -1125,7 +1125,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw "wait until %s\n", username, http_timestring(tosctx, can_change_time))); if (samr_reject_reason) { - *samr_reject_reason = SAMR_REJECT_OTHER; + *samr_reject_reason = SAM_PWD_CHANGE_NO_ERROR; } return NT_STATUS_ACCOUNT_RESTRICTION; } @@ -1135,7 +1135,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw username)); DEBUGADD(1, (" account policy min password len = %d\n", min_len)); if (samr_reject_reason) { - *samr_reject_reason = SAMR_REJECT_TOO_SHORT; + *samr_reject_reason = SAM_PWD_CHANGE_PASSWORD_TOO_SHORT; } return NT_STATUS_PASSWORD_RESTRICTION; /* return NT_STATUS_PWD_TOO_SHORT; */ @@ -1143,7 +1143,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw if (check_passwd_history(hnd,new_passwd)) { if (samr_reject_reason) { - *samr_reject_reason = SAMR_REJECT_IN_HISTORY; + *samr_reject_reason = SAM_PWD_CHANGE_PWD_IN_HISTORY; } return NT_STATUS_PASSWORD_RESTRICTION; } @@ -1171,7 +1171,7 @@ NTSTATUS change_oem_password(struct samu *hnd, char *old_passwd, char *new_passw if (check_ret != 0) { DEBUG(1, ("change_oem_password: check password script said new password is not good enough!\n")); if (samr_reject_reason) { - *samr_reject_reason = SAMR_REJECT_COMPLEXITY; + *samr_reject_reason = SAM_PWD_CHANGE_NOT_COMPLEX; } TALLOC_FREE(pass); return NT_STATUS_PASSWORD_RESTRICTION; diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 178b3ea74b..edbaa55e9b 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -2060,7 +2060,7 @@ enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact struct rpc_pipe_client *cli; bool got_info = false; struct samr_DomInfo1 *info = NULL; - struct samr_ChangeReject *reject = NULL; + struct userPwdChangeFailureInformation *reject = NULL; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; fstring domain, user; @@ -2102,7 +2102,7 @@ enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact fill_in_password_policy(state->response, info); state->response->data.auth.reject_reason = - reject->reason; + reject->extendedFailureReason; got_info = true; } |