summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-10-08 00:34:05 +0200
committerGünther Deschner <gd@samba.org>2009-10-13 00:07:45 +0200
commit4a1b50afd567313cc25d5bbc14e01e170aa62a00 (patch)
tree655537d2d31a0f77e9b3284f25ea85d4cab2a8d8 /source3
parentfaad888e1a3bfd339df92d8d749e95034f64c80a (diff)
downloadsamba-4a1b50afd567313cc25d5bbc14e01e170aa62a00.tar.gz
samba-4a1b50afd567313cc25d5bbc14e01e170aa62a00.tar.bz2
samba-4a1b50afd567313cc25d5bbc14e01e170aa62a00.zip
s3-netlogon: pass down account name to remote password set functions.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/libnet/libnet_join.c1
-rw-r--r--source3/libsmb/trusts_util.c3
-rw-r--r--source3/rpc_client/cli_netlogon.c3
-rw-r--r--source3/utils/net_rpc.c1
5 files changed, 9 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a75904248a..7e31da064f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3307,6 +3307,7 @@ void update_trustdom_cache( void );
NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
const char *domain,
+ const char *account_name,
unsigned char orig_trust_passwd_hash[16],
uint32 sec_channel_type);
NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli,
@@ -5238,6 +5239,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
struct netr_SamInfo3 **info3);
NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *account_name,
const unsigned char orig_trust_passwd_hash[16],
const char *new_trust_pwd_cleartext,
const unsigned char new_trust_passwd_hash[16],
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 8c3030711b..aa5f54adaf 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -789,6 +789,7 @@ static NTSTATUS libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
E_md4hash(trust_passwd, orig_trust_passwd_hash);
status = rpccli_netlogon_set_trust_password(pipe_hnd, mem_ctx,
+ r->in.machine_name,
orig_trust_passwd_hash,
r->in.machine_password,
new_trust_passwd_hash,
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index adf1525812..e201814163 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -29,6 +29,7 @@
NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
const char *domain,
+ const char *account_name,
unsigned char orig_trust_passwd_hash[16],
uint32 sec_channel_type)
{
@@ -47,6 +48,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *m
E_md4hash(new_trust_passwd, new_trust_passwd_hash);
nt_status = rpccli_netlogon_set_trust_password(cli, mem_ctx,
+ account_name,
orig_trust_passwd_hash,
new_trust_passwd,
new_trust_passwd_hash,
@@ -88,6 +90,7 @@ NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli,
}
return trust_pw_change_and_store_it(cli, mem_ctx, domain,
+ global_myname(),
old_trust_passwd_hash,
sec_channel_type);
}
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 6caffd74a6..5e116c95de 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -509,6 +509,7 @@ NTSTATUS rpccli_netlogon_sam_network_logon_ex(struct rpc_pipe_client *cli,
NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *account_name,
const unsigned char orig_trust_passwd_hash[16],
const char *new_trust_pwd_cleartext,
const unsigned char new_trust_passwd_hash[16],
@@ -523,7 +524,7 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct rpc_pipe_client *cli,
cli->desthost, /* server name */
lp_workgroup(), /* domain */
global_myname(), /* client name */
- global_myname(), /* machine account name */
+ account_name, /* machine account name */
orig_trust_passwd_hash,
sec_channel_type,
&neg_flags);
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index c3d002c1b1..896ea8cc65 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -344,6 +344,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
E_md4hash(trust_passwd, orig_trust_passwd_hash);
result = trust_pw_change_and_store_it(pipe_hnd, mem_ctx, c->opt_target_workgroup,
+ global_myname(),
orig_trust_passwd_hash,
sec_channel_type);