summaryrefslogtreecommitdiff
path: root/source3/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
commit68855a99d0206889e5af018d956a2ea5cd33d264 (patch)
tree15ea8733106824636d5f91d70c337af5a209f7e9 /source3/utils/net_rpc_join.c
parentb69a590f6bec4219879beb87dc375417153983a2 (diff)
downloadsamba-68855a99d0206889e5af018d956a2ea5cd33d264.tar.gz
samba-68855a99d0206889e5af018d956a2ea5cd33d264.tar.bz2
samba-68855a99d0206889e5af018d956a2ea5cd33d264.zip
Use rpccli_samr_SetUserInfo2() in place of rpccli_samr_set_userinfo().
Guenther (This used to be commit 1b48b9d73d971ef18b8a2ea240e48902b703b74b)
Diffstat (limited to 'source3/utils/net_rpc_join.c')
-rw-r--r--source3/utils/net_rpc_join.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index f94e08edef..a20dc9a0c4 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/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