[PATCHES] Retry ping-dc when session expires
Jeremy Allison
jra at samba.org
Mon Jan 5 16:32:48 MST 2015
On Mon, Jan 05, 2015 at 04:05:30PM -0700, Christof Schmitt wrote:
>
> Yes, here is the updated patch, sorry for the delay. This would also be
> an important fix for the currently active 4.x branches; i will open a
> bug for the backport of the patches.
LGTM - pushed !
> From 8fe2c392a0faeb35c0e9026999ff3f299920de36 Mon Sep 17 00:00:00 2001
> From: Christof Schmitt <cs at samba.org>
> Date: Fri, 19 Dec 2014 12:24:53 -0700
> Subject: [PATCH] winbind: Retry after SESSION_EXPIRED error in ping-dc
>
> Trying to establish a netlogon connection when the service ticket
> expires might fail with NT_STATUS_NETWORK_SESSION_EXPIRED. The
> underlying client code already marks the session as invalid, so retry
> the netlogon connect in this case.
>
> Signed-off-by: Christof Schmit <cs at samba.org>
> ---
> source3/winbindd/winbindd_dual_srv.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
> index 22e709f..061de72 100644
> --- a/source3/winbindd/winbindd_dual_srv.c
> +++ b/source3/winbindd/winbindd_dual_srv.c
> @@ -677,6 +677,14 @@ NTSTATUS _wbint_PingDc(struct pipes_struct *p, struct wbint_PingDc *r)
>
> reconnect:
> status = cm_connect_netlogon(domain, &netlogon_pipe);
> + if (NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_SESSION_EXPIRED)) {
> + /*
> + * Retry to open new connection with new kerberos ticket.
> + */
> + invalidate_cm_connection(domain);
> + 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: %s\n",
> --
> 1.7.1
>
More information about the samba-technical
mailing list