1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-04 19:33:18 +03:00

rename rpccli_samr_chgpasswd_user to rpccli_samr_chgpasswd_user2.

Guenther
This commit is contained in:
Günther Deschner
2008-06-25 10:35:59 +02:00
parent 2181770e45
commit 5b4650d56c
5 changed files with 19 additions and 19 deletions

View File

@@ -7144,11 +7144,11 @@ uint32 reg_init_regval_buffer( REGVAL_BUFFER *buf2, REGISTRY_VALUE *val );
/* 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,

View File

@@ -177,8 +177,8 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
}
}
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);
@@ -207,7 +207,7 @@ NTSTATUS remote_password_change(const char *remote_machine, const char *user_nam
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! */

View File

@@ -25,11 +25,11 @@
/* 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;
@@ -43,7 +43,7 @@ NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
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);
@@ -149,7 +149,7 @@ NTSTATUS rpccli_samr_chgpasswd3(struct rpc_pipe_client *cli,
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);

View File

@@ -2463,7 +2463,7 @@ static NTSTATUS cmd_samr_chgpasswd2(struct rpc_pipe_client *cli,
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;

View File

@@ -2093,15 +2093,15 @@ enum winbindd_result winbindd_dual_pam_chauthtok(struct winbindd_domain *contact
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. */