From d41d9b6fc55c358fadac5389cec541e429c8d555 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 11 May 2002 03:30:21 +0000 Subject: merge from SAMBA_2_2 (This used to be commit b41cefb4c0670b06564ac79fa10aff8d60069f10) --- source3/utils/net_rpc.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/utils/net_rpc.c') diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 20f2b83156..471e414683 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -235,6 +235,14 @@ static NTSTATUS rpc_join_oldstyle_internals(const DOM_SID *domain_sid, struct cl fstrcpy(trust_passwd, global_myname); strlower(trust_passwd); + + /* + * Machine names can be 15 characters, but the max length on + * a password is 14. --jerry + */ + + trust_passwd[14] = '\0'; + E_md4hash( (uchar *)trust_passwd, orig_trust_passwd_hash); return trust_pw_change_and_store_it(cli, mem_ctx, orig_trust_passwd_hash); -- cgit