[PATCH] Silence a debug message

Jeremy Allison jra at samba.org
Tue Nov 1 22:47:26 UTC 2016


On Tue, Nov 01, 2016 at 04:44:26PM +0100, Volker Lendecke wrote:
> Hi!
> 
> Spent a while trying to diagnose gss problems until I managed to get
> debug level 10 logs. Does the attached patch make sense? This message
> spammed syslog at a customer site for no good reason.

LGTM - pushed !

> From 9d7fd8ecc3e9a8a3418d37108592803b63e12de9 Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Tue, 1 Nov 2016 16:32:57 +0100
> Subject: [PATCH] libcli: Increase the debug level for expired tickets
> 
> In libads/sasl.c we do a retry in this case. We should not
> spam syslog with that.
> 
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
>  source3/librpc/crypto/gse.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/source3/librpc/crypto/gse.c b/source3/librpc/crypto/gse.c
> index e67065a..3ccbb0e 100644
> --- a/source3/librpc/crypto/gse.c
> +++ b/source3/librpc/crypto/gse.c
> @@ -341,8 +341,13 @@ static NTSTATUS gse_get_client_auth_token(TALLOC_CTX *mem_ctx,
>  		status = NT_STATUS_MORE_PROCESSING_REQUIRED;
>  		break;
>  	default:
> -		DEBUG(0, ("gss_init_sec_context failed with [%s]\n",
> -			  gse_errstr(talloc_tos(), gss_maj, gss_min)));
> +		if ((gss_maj == GSS_S_FAILURE) &&
> +		    (gss_min == KRB5KRB_AP_ERR_TKT_EXPIRED)) {
> +			DBG_NOTICE("Ticket expired\n");
> +		} else {
> +			DBG_ERR("gss_init_sec_context failed with [%s]\n",
> +				gse_errstr(talloc_tos(), gss_maj, gss_min));
> +		}
>  		status = NT_STATUS_INTERNAL_ERROR;
>  		goto done;
>  	}
> -- 
> 2.9.2
> 




More information about the samba-technical mailing list