summaryrefslogtreecommitdiff
path: root/source/utils/net_rpc_join.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-12 20:01:36 +0100
committerGünther Deschner <gd@samba.org>2008-02-12 20:29:13 +0100
commit1b48b9d73d971ef18b8a2ea240e48902b703b74b (patch)
tree653e47893beaa22dcc55c25b1810e2b1fd46a216 /source/utils/net_rpc_join.c
parentd493f98cd1da5e8a5995e3adea2f28b434baae99 (diff)
downloadsamba-1b48b9d73d971ef18b8a2ea240e48902b703b74b.tar.gz
Use rpccli_samr_SetUserInfo2() in place of rpccli_samr_set_userinfo().
Guenther
Diffstat (limited to 'source/utils/net_rpc_join.c')
-rw-r--r--source/utils/net_rpc_join.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source/utils/net_rpc_join.c b/source/utils/net_rpc_join.c
index f94e08edef8..a20dc9a0c47 100644
--- a/source/utils/net_rpc_join.c
+++ b/source/utils/net_rpc_join.c
@@ -152,8 +152,6 @@ int net_rpc_join_newstyle(int argc, const char **argv)
char *clear_trust_password = NULL;
uchar pwbuf[516];
- SAM_USERINFO_CTR ctr;
- SAM_USER_INFO_24 p24;
uchar md4_trust_password[16];
union samr_UserInfo set_info;
@@ -344,16 +342,15 @@ int net_rpc_join_newstyle(int argc, const char **argv)
/* Set password on machine account */
- ZERO_STRUCT(ctr);
- ZERO_STRUCT(p24);
+ init_samr_user_info24(&set_info.info24, pwbuf, 24);
- init_sam_user_info24(&p24, (char *)pwbuf,24);
+ SamOEMhashBlob(set_info.info24.password.data, 516,
+ &cli->user_session_key);
- ctr.switch_value = 24;
- ctr.info.id24 = &p24;
-
- CHECK_RPC_ERR(rpccli_samr_set_userinfo(pipe_hnd, mem_ctx, &user_pol, 24,
- &cli->user_session_key, &ctr),
+ CHECK_RPC_ERR(rpccli_samr_SetUserInfo2(pipe_hnd, mem_ctx,
+ &user_pol,
+ 24,
+ &set_info),
"error setting trust account password");
/* Why do we have to try to (re-)set the ACB to be the same as what