diff options
author | Volker Lendecke <vl@samba.org> | 2009-10-05 22:14:06 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-10-05 22:14:06 +0200 |
commit | 872f9c4f91731f122cfb2efc9e5a2d391408e916 (patch) | |
tree | fed53c678a63ab3be482dab743c9ecc07425dd2a /source3/rpc_client | |
parent | 5bafaa73f6dda13b05744b177cb18a310cb2f749 (diff) | |
download | samba-872f9c4f91731f122cfb2efc9e5a2d391408e916.tar.gz samba-872f9c4f91731f122cfb2efc9e5a2d391408e916.tar.bz2 samba-872f9c4f91731f122cfb2efc9e5a2d391408e916.zip |
Revert "s3: Attempt to fix machine password change"
This reverts commit 20a8ea91e10af167067cc794a251265aaf489e75.
Ooops, this should not have been committed.
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_netlogon.c | 51 |
1 files changed, 17 insertions, 34 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index db7d1357c7..911a50f393 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -512,12 +512,27 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli, const unsigned char orig_trust_passwd_hash[16], const char *new_trust_pwd_cleartext, const unsigned char new_trust_passwd_hash[16], - uint32_t sec_channel_type, - uint32_t neg_flags) + uint32_t sec_channel_type) { NTSTATUS result; + uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS; struct netr_Authenticator clnt_creds, srv_cred; + result = rpccli_netlogon_setup_creds(cli, + cli->desthost, /* server name */ + lp_workgroup(), /* domain */ + global_myname(), /* client name */ + global_myname(), /* machine account name */ + orig_trust_passwd_hash, + sec_channel_type, + &neg_flags); + + if (!NT_STATUS_IS_OK(result)) { + DEBUG(3,("rpccli_netlogon_set_trust_password: unable to setup creds (%s)!\n", + nt_errstr(result))); + return result; + } + netlogon_creds_client_authenticator(cli->dc, &clnt_creds); if (neg_flags & NETLOGON_NEG_PASSWORD_SET2) { @@ -571,35 +586,3 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli, return result; } -NTSTATUS rpccli_netlogon_auth_set_trust_password(struct rpc_pipe_client *cli, - TALLOC_CTX *mem_ctx, - const unsigned char orig_trust_passwd_hash[16], - const char *new_trust_pwd_cleartext, - const unsigned char new_trust_passwd_hash[16], - uint32_t sec_channel_type) -{ - NTSTATUS result; - uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS; - - result = rpccli_netlogon_setup_creds(cli, - cli->desthost, /* server name */ - lp_workgroup(), /* domain */ - global_myname(), /* client name */ - global_myname(), /* machine account name */ - orig_trust_passwd_hash, - sec_channel_type, - &neg_flags); - - if (!NT_STATUS_IS_OK(result)) { - DEBUG(3,("rpccli_netlogon_set_trust_password: unable to setup creds (%s)!\n", - nt_errstr(result))); - return result; - } - - return rpccli_netlogon_set_trust_password(cli, mem_ctx, - orig_trust_passwd_hash, - new_trust_pwd_cleartext, - new_trust_passwd_hash, - sec_channel_type, - neg_flags); -} |