Return an error when no name servers were returned in net_ads.c
Jeremy Allison
jra at samba.org
Fri May 27 22:56:17 UTC 2016
On Sun, May 15, 2016 at 10:33:17AM -0700, Richard Sharpe wrote:
> Hi folks,
>
> Attached is a git format-patch formatted patch for
> source3/utils/net_ads.c to return an error in the case I uncovered
> while getting the self-test stuff working for net ads dns register etc
> ...
>
> Please review and push if acceptable ...
LGTM. Pushed !
> From 50700354acc3977cfc65c52d2fdfb6d99a129d5b Mon Sep 17 00:00:00 2001
> From: Richard Sharpe <rsharpe at samba.org>
> Date: Sun, 15 May 2016 10:28:04 -0700
> Subject: [PATCH] Return an error when no name servers were returned by the
> lookup so that we see an error in self test.
>
> Signed-off-by: Richard Sharpe <rsharpe at samba.org>
> ---
> source3/utils/net_ads.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
> index 2c2df8b..b0fcf68 100644
> --- a/source3/utils/net_ads.c
> +++ b/source3/utils/net_ads.c
> @@ -1209,6 +1209,9 @@ 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 (ns_count == 0) {
> + status = NT_STATUS_UNSUCCESSFUL;
> + }
> goto done;
> }
>
> --
> 2.4.3
>
More information about the samba-technical
mailing list