summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-16 11:02:52 +0100
committerGünther Deschner <gd@samba.org>2008-01-16 11:08:05 +0100
commit41c72bd80465122d836fe19a784982bf5cb82cdd (patch)
tree3f92f3d182fb33662b5f62634e5695c6c0c1cc9b /source3/rpc_server
parent168e122682debee53041250292da214f88f534fa (diff)
downloadsamba-41c72bd80465122d836fe19a784982bf5cb82cdd.tar.gz
samba-41c72bd80465122d836fe19a784982bf5cb82cdd.tar.bz2
samba-41c72bd80465122d836fe19a784982bf5cb82cdd.zip
Fix (non-activated) _wkssvc_NetrJoinDomain2 server code.
Guenther (This used to be commit dea64a0d886919dfd5bcc550cb36deabe4ec010d)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index 849ec9c4eb..de2e33732d 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -287,7 +287,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p, struct wkssvc_NetrJoinDomain2 *r
{
#if 0
struct libnet_JoinCtx *j = NULL;
- char *pwd = NULL;
+ char *cleartext_pwd = NULL;
char *admin_domain = NULL;
char *admin_account = NULL;
WERROR werr;
@@ -308,12 +308,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p, struct wkssvc_NetrJoinDomain2 *r
werr = decode_wkssvc_join_password_buffer(p->mem_ctx,
r->in.encrypted_password,
&p->session_key,
- &pwd);
- if (!W_ERROR_IS_OK(werr)) {
- return werr;
- }
-
- werr = libnet_init_JoinCtx(p->mem_ctx, &j);
+ &cleartext_pwd);
if (!W_ERROR_IS_OK(werr)) {
return werr;
}
@@ -323,7 +318,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p, struct wkssvc_NetrJoinDomain2 *r
&admin_domain,
&admin_account);
- status = DsGetDcName(p->mem_ctx,
+ status = dsgetdcname(p->mem_ctx,
NULL,
r->in.domain_name,
NULL,
@@ -336,14 +331,18 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p, struct wkssvc_NetrJoinDomain2 *r
return ntstatus_to_werror(status);
}
- j->in.server_name = info->domain_controller_name;
+ werr = libnet_init_JoinCtx(p->mem_ctx, &j);
+ if (!W_ERROR_IS_OK(werr)) {
+ return werr;
+ }
+
+ j->in.dc_name = info->domain_controller_name;
j->in.domain_name = r->in.domain_name;
j->in.account_ou = r->in.account_ou;
j->in.join_flags = r->in.join_flags;
-
- j->in.admin_account = admin_account;
- j->in.password = pwd;
- j->in.modify_config = true;
+ j->in.admin_account = admin_account;
+ j->in.admin_password = cleartext_pwd;
+ j->in.modify_config = true;
become_root();
werr = libnet_Join(p->mem_ctx, j);