mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
netapi: Move DC check to NetJoinDomain() where it is needed.
This partially reverts 15f6e27bd5a9065c8b781fa21f5989ce2c355776. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10891 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
a12ae815b0
commit
b299409410
@ -115,6 +115,10 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
|
||||
struct dcerpc_binding_handle *b;
|
||||
DATA_BLOB session_key;
|
||||
|
||||
if (IS_DC) {
|
||||
return WERR_SETUP_DOMAIN_CONTROLLER;
|
||||
}
|
||||
|
||||
werr = libnetapi_open_pipe(ctx, r->in.server,
|
||||
&ndr_table_wkssvc,
|
||||
&pipe_cli);
|
||||
|
@ -1957,10 +1957,6 @@ static WERROR libnet_join_pre_processing(TALLOC_CTX *mem_ctx,
|
||||
return WERR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
if (IS_DC) {
|
||||
return WERR_SETUP_DOMAIN_CONTROLLER;
|
||||
}
|
||||
|
||||
if (!r->in.admin_domain) {
|
||||
char *admin_domain = NULL;
|
||||
char *admin_account = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user