net ads dns register can appear to succeed when it failed ...
Richard Sharpe
realrichardsharpe at gmail.com
Sat May 14 18:31:05 UTC 2016
Hi folks,
There are so many mysteries in life.
One of them is that net ads dns register can appear to succeed while
it actually failed. If ads_dns_lookup_ns did not fail but also
returned zero name servers, it currently looks like
net_update_dns_internal succeeds.
Below is a patch to fix that.
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 2c2df8b..f815376 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1209,6 +1209,13 @@ static NTSTATUS net_update_dns_internal(struct
net_context *c,
if ( !NT_STATUS_IS_OK(status) || (ns_count == 0)) {
DEBUG(3,("net_update_dns_internal: Failed to
find name server for the %s "
"realm\n", ads->config.realm));
+ /*
+ * If there are no name servers, lets make it an error
+ */
+ if (ns_count == 0) {
+ status = NT_STATUS_UNSUCCESSFUL;
+ d_printf(_("No name servers found\n"));
+ }
goto done;
}
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
More information about the samba-technical
mailing list