summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-01-11 14:41:34 +0100
committerGünther Deschner <gd@samba.org>2008-01-11 15:08:52 +0100
commit136b02de5e7ed05d144083ac1f0b9f7cbeee488c (patch)
treecc7e48274fb64c91af6162cd07367160fed61f9a /source3
parent28b852a893a439482991d84373fb083fb81fd4ea (diff)
downloadsamba-136b02de5e7ed05d144083ac1f0b9f7cbeee488c.tar.gz
samba-136b02de5e7ed05d144083ac1f0b9f7cbeee488c.tar.bz2
samba-136b02de5e7ed05d144083ac1f0b9f7cbeee488c.zip
Use domain_is_ad bool.
Guenther (This used to be commit 9707a5eb008788460937104575b7afd733a9f741)
Diffstat (limited to 'source3')
-rw-r--r--source3/libnet/libnet_join.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 8e6d91b38b..3bc1464f18 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -575,6 +575,10 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
NULL,
&r->out.domain_sid);
+ if (NT_STATUS_IS_OK(status)) {
+ r->out.domain_is_ad = true;
+ }
+
if (!NT_STATUS_IS_OK(status)) {
status = rpccli_lsa_query_info_policy(pipe_hnd, mem_ctx, &lsa_pol,
5,
@@ -833,7 +837,6 @@ done:
static WERROR do_join_modify_vals_config(struct libnet_JoinCtx *r)
{
WERROR werr;
- bool is_ad = false;
if (!(r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_TYPE)) {
@@ -845,10 +848,6 @@ static WERROR do_join_modify_vals_config(struct libnet_JoinCtx *r)
return werr;
}
- if (r->out.dns_domain_name) {
- is_ad = true;
- }
-
werr = libnet_conf_set_global_parameter("security", "domain");
W_ERROR_NOT_OK_RETURN(werr);
@@ -856,7 +855,7 @@ static WERROR do_join_modify_vals_config(struct libnet_JoinCtx *r)
r->out.netbios_domain_name);
W_ERROR_NOT_OK_RETURN(werr);
- if (is_ad) {
+ if (r->out.domain_is_ad) {
werr = libnet_conf_set_global_parameter("security", "ads");
W_ERROR_NOT_OK_RETURN(werr);