diff options
author | Günther Deschner <gd@samba.org> | 2008-02-28 11:29:56 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-28 11:38:01 +0100 |
commit | 7347e1ff4797fea2ab3c463f18dfcd81cdac5a75 (patch) | |
tree | ad040afe5aff896aba81c82b7943308e0ac34a3a /source3 | |
parent | 46bdaa5d375f8c8f80045212eb7bdb7bbd3f266d (diff) | |
download | samba-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')
-rw-r--r-- | source3/libnet/libnet_join.c | 17 |
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; } /**************************************************************** |