/* The following definitions come from rpc_client/cli_samr.c */
-NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- const char *username,
- const char *newpassword,
- const char *oldpassword);
+NTSTATUS rpccli_samr_chgpasswd_user2(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *username,
+ const char *newpassword,
+ const char *oldpassword);
NTSTATUS rpccli_samr_chng_pswd_auth_crap(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *username,
}
}
- result = rpccli_samr_chgpasswd_user(pipe_hnd, talloc_tos(),
- user_name, new_passwd, old_passwd);
+ result = rpccli_samr_chgpasswd_user2(pipe_hnd, talloc_tos(),
+ user_name, new_passwd, old_passwd);
if (NT_STATUS_IS_OK(result)) {
/* Great - it all worked! */
cli_shutdown(cli);
pipe_hnd = cli_rpc_pipe_open_noauth(cli, PI_SAMR, &result);
if ( pipe_hnd &&
- (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user(
+ (NT_STATUS_IS_OK(result = rpccli_samr_chgpasswd_user2(
pipe_hnd, talloc_tos(), user_name,
new_passwd, old_passwd)))) {
/* Great - it all worked! */
/* User change password */
-NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- const char *username,
- const char *newpassword,
- const char *oldpassword)
+NTSTATUS rpccli_samr_chgpasswd_user2(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *username,
+ const char *newpassword,
+ const char *oldpassword)
{
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
struct samr_CryptPassword new_nt_password;
uchar new_lanman_hash[16];
struct lsa_String server, account;
- DEBUG(10,("rpccli_samr_chgpasswd_user\n"));
+ DEBUG(10,("rpccli_samr_chgpasswd_user2\n"));
init_lsa_String(&server, cli->srv_name_slash);
init_lsa_String(&account, username);
struct lsa_String server, account;
- DEBUG(10,("rpccli_samr_chgpasswd_user3\n"));
+ DEBUG(10,("rpccli_samr_chgpasswd3\n"));
init_lsa_String(&server, cli->srv_name_slash);
init_lsa_String(&account, username);
goto done;
/* Change user password */
- result = rpccli_samr_chgpasswd_user(cli, mem_ctx, user, newpass, oldpass);
+ result = rpccli_samr_chgpasswd_user2(cli, mem_ctx, user, newpass, oldpass);
if (!NT_STATUS_IS_OK(result))
goto done;
got_info = True;
}
- /* only fallback when the chgpasswd3 call is not supported */
+ /* only fallback when the chgpasswd_user3 call is not supported */
if ((NT_STATUS_EQUAL(result, NT_STATUS(DCERPC_FAULT_OP_RNG_ERROR))) ||
(NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED)) ||
(NT_STATUS_EQUAL(result, NT_STATUS_NOT_IMPLEMENTED))) {
- DEBUG(10,("Password change with chgpasswd3 failed with: %s, retrying chgpasswd_user\n",
+ DEBUG(10,("Password change with chgpasswd3 failed with: %s, retrying chgpasswd_user2\n",
nt_errstr(result)));
- result = rpccli_samr_chgpasswd_user(cli, state->mem_ctx, user, newpass, oldpass);
+ result = rpccli_samr_chgpasswd_user2(cli, state->mem_ctx, user, newpass, oldpass);
/* Windows 2000 returns NT_STATUS_ACCOUNT_RESTRICTION.
Map to the same status code as Windows 2003. */