summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2004-01-31 19:37:35 +0000
committerGerald Carter <jerry@samba.org>2004-01-31 19:37:35 +0000
commita2de8167ecbc84c230c5c1b09266bc5e9f012e5e (patch)
treebd2062a7d3e9b587218d4669c76bcab25bb21530
parent69de63235e2efdb0dd7196df0ecf78143f38343b (diff)
downloadsamba-a2de8167ecbc84c230c5c1b09266bc5e9f012e5e.tar.gz
samba-a2de8167ecbc84c230c5c1b09266bc5e9f012e5e.tar.xz
samba-a2de8167ecbc84c230c5c1b09266bc5e9f012e5e.zip
revert an accidential merge (part of the pw change patch in 3.0); fixed net join
-rw-r--r--source/utils/net_rpc.c8
-rw-r--r--source/utils/net_rpc_join.c9
2 files changed, 15 insertions, 2 deletions
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c
index 804faf3b9a4..eb5a9634c8e 100644
--- a/source/utils/net_rpc.c
+++ b/source/utils/net_rpc.c
@@ -1849,9 +1849,15 @@ static NTSTATUS rpc_trustdom_add_internals(const DOM_SID *domain_sid, struct cli
{
SAM_USERINFO_CTR ctr;
SAM_USER_INFO_24 p24;
+ fstring ucs2_trust_password;
+ int ucs2_pw_len;
uchar pwbuf[516];
- encode_pw_buffer((char *)pwbuf, argv[1], STR_UNICODE);
+ ucs2_pw_len = push_ucs2(NULL, ucs2_trust_password, argv[1],
+ sizeof(ucs2_trust_password), 0);
+
+ encode_pw_buffer((char *)pwbuf, ucs2_trust_password,
+ ucs2_pw_len);
ZERO_STRUCT(ctr);
ZERO_STRUCT(p24);
diff --git a/source/utils/net_rpc_join.c b/source/utils/net_rpc_join.c
index 6bfeedc8a0c..eb91a7df612 100644
--- a/source/utils/net_rpc_join.c
+++ b/source/utils/net_rpc_join.c
@@ -115,6 +115,8 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Password stuff */
char *clear_trust_password = NULL;
+ fstring ucs2_trust_password;
+ int ucs2_pw_len;
uchar pwbuf[516];
SAM_USERINFO_CTR ctr;
SAM_USER_INFO_24 p24;
@@ -262,7 +264,12 @@ int net_rpc_join_newstyle(int argc, const char **argv)
E_md4hash(clear_trust_password, md4_trust_password);
}
- encode_pw_buffer(pwbuf, clear_trust_password, STR_UNICODE);
+ ucs2_pw_len = push_ucs2(NULL, ucs2_trust_password,
+ clear_trust_password,
+ sizeof(ucs2_trust_password), 0);
+
+ encode_pw_buffer((char *)pwbuf, ucs2_trust_password,
+ ucs2_pw_len);
/* Set password on machine account */