summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_samr.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-02-10 23:09:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:03 -0500
commite83c7d0141c0726a74c7be48914e94bac7167ab1 (patch)
treeed3cab005159222c95c191d2fadd8eb3979beef7 /source3/rpc_client/cli_samr.c
parente493d329122e16a70f9f858aaa9ba51d20eba3c7 (diff)
downloadsamba-e83c7d0141c0726a74c7be48914e94bac7167ab1.tar.gz
samba-e83c7d0141c0726a74c7be48914e94bac7167ab1.tar.bz2
samba-e83c7d0141c0726a74c7be48914e94bac7167ab1.zip
r13442: Implement samr_chgpasswd_user3 server-side.
Guenther (This used to be commit f60eddc0a4dfe623e5f115533a62c03810fd5f38)
Diffstat (limited to 'source3/rpc_client/cli_samr.c')
-rw-r--r--source3/rpc_client/cli_samr.c39
1 files changed, 17 insertions, 22 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 79f27fe2bb..1910e3a25f 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -1253,12 +1253,12 @@ NTSTATUS rpccli_samr_chgpasswd3(struct rpc_pipe_client *cli,
const char *username,
const char *newpassword,
const char *oldpassword,
- SAM_UNK_INFO_1 **info,
- SAMR_CHANGE_REJECT **reject)
+ SAM_UNK_INFO_1 *info,
+ SAMR_CHANGE_REJECT *reject)
{
prs_struct qbuf, rbuf;
- SAMR_Q_CHGPASSWD3 q;
- SAMR_R_CHGPASSWD3 r;
+ SAMR_Q_CHGPASSWD_USER3 q;
+ SAMR_R_CHGPASSWD_USER3 r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uchar new_nt_password[516];
@@ -1273,14 +1273,11 @@ NTSTATUS rpccli_samr_chgpasswd3(struct rpc_pipe_client *cli,
char *srv_name_slash = talloc_asprintf(mem_ctx, "\\\\%s", cli->cli->desthost);
- DEBUG(10,("rpccli_samr_chgpasswd3\n"));
+ DEBUG(10,("rpccli_samr_chgpasswd_user3\n"));
ZERO_STRUCT(q);
ZERO_STRUCT(r);
- *info = NULL;
- *reject = NULL;
-
/* Calculate the MD4 hash (NT compatible) of the password */
E_md4hash(oldpassword, old_nt_hash);
E_md4hash(newpassword, new_nt_hash);
@@ -1309,27 +1306,25 @@ NTSTATUS rpccli_samr_chgpasswd3(struct rpc_pipe_client *cli,
/* Marshall data and send request */
- init_samr_q_chgpasswd3(&q, srv_name_slash, username,
- new_nt_password,
- old_nt_hash_enc,
- new_lm_password,
- old_lanman_hash_enc);
+ init_samr_q_chgpasswd_user3(&q, srv_name_slash, username,
+ new_nt_password,
+ old_nt_hash_enc,
+ new_lm_password,
+ old_lanman_hash_enc);
+ r.info = info;
+ r.reject = reject;
- CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_CHGPASSWD3,
+ CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_CHGPASSWD_USER3,
q, r,
qbuf, rbuf,
- samr_io_q_chgpasswd3,
- samr_io_r_chgpasswd3,
+ samr_io_q_chgpasswd_user3,
+ samr_io_r_chgpasswd_user3,
NT_STATUS_UNSUCCESSFUL);
/* Return output parameters */
- if (!NT_STATUS_IS_OK(result = r.status)) {
- *info = &r.info;
- *reject = &r.reject;
- goto done;
- }
-
+ result = r.status;
+
done:
return result;