summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2014-12-19 12:24:53 -0700
committerKarolin Seeger <kseeger@samba.org>2015-01-11 14:03:10 +0100
commit16f881c37260861957fe10f1a485f45bcb7e912e (patch)
treeb1b0bff0221643bdde9b9709beff2d0fe6117253 /source3
parentc6ede38e1d1e2fdbe80bd0cbf14062574729172c (diff)
downloadsamba-16f881c37260861957fe10f1a485f45bcb7e912e.tar.gz
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@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jan 6 02:58:57 CET 2015 on sn-devel-104 (cherry picked from commit a2670f15dea27c10e3827216adf572f9c3894f85) BUG: https://bugzilla.samba.org/show_bug.cgi?id=11034
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_dual_srv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 31ed2cf651..911fd7565b 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -696,6 +696,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->conn);
+ 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",