[PATCH] winbind: Print error code on connection error in ping_dc

Jeremy Allison jra at samba.org
Fri May 24 18:05:17 MDT 2013


On Fri, May 24, 2013 at 12:40:49PM -0700, Christof Schmitt wrote:
> For debugging, it is useful to include the error code in the message.
> ---
>  source3/winbindd/winbindd_dual_srv.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
> index 744e251..e23d048 100644
> --- a/source3/winbindd/winbindd_dual_srv.c
> +++ b/source3/winbindd/winbindd_dual_srv.c
> @@ -690,7 +690,8 @@ NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r)
>  	status = cm_connect_netlogon(domain, &netlogon_pipe);
>  	reset_cm_connection_on_error(domain, status);
>          if (!NT_STATUS_IS_OK(status)) {
> -                DEBUG(3, ("could not open handle to NETLOGON pipe\n"));
> +		DEBUG(3, ("could not open handle to NETLOGON pipe: %s\n",
> +			  nt_errstr(status)));
>  		return status;
>          }

+1 Reviewed-by: Jeremy Allison <jra at samba.org>


More information about the samba-technical mailing list