summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-06-13 19:12:27 +0200
committerAndreas Schneider <asn@samba.org>2013-08-05 10:30:01 +0200
commit1242ab0cb3bf575b695b39313604af9d0a7f1b3a (patch)
tree979f12f0a31f193afc76c4d643938f4d136b2884
parentd398a12f7907866189c1b253ca6a40e5454f42a1 (diff)
downloadsamba-1242ab0cb3bf575b695b39313604af9d0a7f1b3a.tar.gz
samba-1242ab0cb3bf575b695b39313604af9d0a7f1b3a.tar.bz2
samba-1242ab0cb3bf575b695b39313604af9d0a7f1b3a.zip
s3:libnet: let the caller truncate the pw in libnet_join_joindomain_rpc_unsecure()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source3/libnet/libnet_join.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index df3a86d092..26c037a675 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -803,7 +803,6 @@ static NTSTATUS libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *pipe_hnd = NULL;
unsigned char orig_trust_passwd_hash[16];
unsigned char new_trust_passwd_hash[16];
- fstring trust_passwd;
NTSTATUS status;
status = cli_rpc_pipe_open_noauth(cli, &ndr_table_netlogon,
@@ -822,19 +821,7 @@ static NTSTATUS libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
E_md4hash(r->in.machine_password, new_trust_passwd_hash);
/* according to WKSSVC_JOIN_FLAGS_MACHINE_PWD_PASSED */
- fstrcpy(trust_passwd, r->in.admin_password);
- if (!strlower_m(trust_passwd)) {
- return NT_STATUS_INVALID_PARAMETER;
- }
-
- /*
- * Machine names can be 15 characters, but the max length on
- * a password is 14. --jerry
- */
-
- trust_passwd[14] = '\0';
-
- E_md4hash(trust_passwd, orig_trust_passwd_hash);
+ E_md4hash(r->in.admin_password, orig_trust_passwd_hash);
status = rpccli_netlogon_set_trust_password(pipe_hnd, mem_ctx,
r->in.machine_name,