summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-03-28 13:53:33 +0100
committerGünther Deschner <gd@samba.org>2008-03-28 14:15:20 +0100
commited27b352effb87e4394f73decd30eaebf26b36a9 (patch)
tree7890a24a350444bb93fbc6c66b0c2ec79ae5718c /source3
parent33a8e9b5377d2d6bffeb0640d388fa4c8e2f8c65 (diff)
downloadsamba-ed27b352effb87e4394f73decd30eaebf26b36a9.tar.gz
samba-ed27b352effb87e4394f73decd30eaebf26b36a9.tar.bz2
samba-ed27b352effb87e4394f73decd30eaebf26b36a9.zip
Let libnetjoin find the dc in wkssvc NetrJoinDomain2/UnjoinDomain2.
Guenther (This used to be commit 9e7d673ac44f500863bcbd0198452adc7c5027f9)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index 6d03009d00..f864aad86a 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -292,9 +292,7 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
char *admin_domain = NULL;
char *admin_account = NULL;
WERROR werr;
- NTSTATUS status;
struct nt_user_token *token = p->pipe_user.nt_user_token;
- struct netr_DsRGetDCNameInfo *info = NULL;
if (!r->in.domain_name) {
return WERR_INVALID_PARAM;
@@ -321,24 +319,11 @@ WERROR _wkssvc_NetrJoinDomain2(pipes_struct *p,
&admin_domain,
&admin_account);
- status = dsgetdcname(p->mem_ctx,
- r->in.domain_name,
- NULL,
- NULL,
- DS_DIRECTORY_SERVICE_REQUIRED |
- DS_WRITABLE_REQUIRED |
- DS_RETURN_DNS_NAME,
- &info);
- if (!NT_STATUS_IS_OK(status)) {
- return ntstatus_to_werror(status);
- }
-
werr = libnet_init_JoinCtx(p->mem_ctx, &j);
if (!W_ERROR_IS_OK(werr)) {
return werr;
}
- j->in.dc_name = info->dc_unc;
j->in.domain_name = r->in.domain_name;
j->in.account_ou = r->in.account_ou;
j->in.join_flags = r->in.join_flags;
@@ -372,9 +357,7 @@ WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
char *admin_domain = NULL;
char *admin_account = NULL;
WERROR werr;
- NTSTATUS status;
struct nt_user_token *token = p->pipe_user.nt_user_token;
- struct netr_DsRGetDCNameInfo *info = NULL;
if (!user_has_privileges(token, &se_machine_account) &&
!nt_token_check_domain_rid(token, DOMAIN_GROUP_RID_ADMINS) &&
@@ -397,24 +380,11 @@ WERROR _wkssvc_NetrUnjoinDomain2(pipes_struct *p,
&admin_domain,
&admin_account);
- status = dsgetdcname(p->mem_ctx,
- lp_realm(),
- NULL,
- NULL,
- DS_DIRECTORY_SERVICE_REQUIRED |
- DS_WRITABLE_REQUIRED |
- DS_RETURN_DNS_NAME,
- &info);
- if (!NT_STATUS_IS_OK(status)) {
- return ntstatus_to_werror(status);
- }
-
werr = libnet_init_UnjoinCtx(p->mem_ctx, &u);
if (!W_ERROR_IS_OK(werr)) {
return werr;
}
- u->in.dc_name = info->dc_unc;
u->in.domain_name = lp_realm();
u->in.unjoin_flags = r->in.unjoin_flags |
WKSSVC_JOIN_FLAGS_JOIN_TYPE;