summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-28 11:29:56 +0100
committerGünther Deschner <gd@samba.org>2008-02-28 11:38:01 +0100
commit7347e1ff4797fea2ab3c463f18dfcd81cdac5a75 (patch)
treead040afe5aff896aba81c82b7943308e0ac34a3a /source3/libnet
parent46bdaa5d375f8c8f80045212eb7bdb7bbd3f266d (diff)
downloadsamba-7347e1ff4797fea2ab3c463f18dfcd81cdac5a75.tar.gz
samba-7347e1ff4797fea2ab3c463f18dfcd81cdac5a75.tar.bz2
samba-7347e1ff4797fea2ab3c463f18dfcd81cdac5a75.zip
Store domain_is_ad info as early as possible in libnetjoin.
Guenther (This used to be commit c4ba68aa94888eace393b91a669e22b27ffaba3e)
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_join.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 31eec80561..d2242ffb2c 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -152,9 +152,24 @@ static ADS_STATUS libnet_join_connect_ads(TALLOC_CTX *mem_ctx,
libnet_join_set_error_string(mem_ctx, r,
"failed to connect to AD: %s",
ads_errstr(status));
+ return status;
}
- return status;
+ if (!r->out.netbios_domain_name) {
+ r->out.netbios_domain_name = talloc_strdup(mem_ctx,
+ r->in.ads->server.workgroup);
+ ADS_ERROR_HAVE_NO_MEMORY(r->out.netbios_domain_name);
+ }
+
+ if (!r->out.dns_domain_name) {
+ r->out.dns_domain_name = talloc_strdup(mem_ctx,
+ r->in.ads->config.realm);
+ ADS_ERROR_HAVE_NO_MEMORY(r->out.dns_domain_name);
+ }
+
+ r->out.domain_is_ad = true;
+
+ return ADS_SUCCESS;
}
/****************************************************************