From 45105afffc5678082b23165ff74610d67e57a82a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 22 Oct 2012 14:31:20 +0200 Subject: [PATCH] s3:winbindd: disconnection after getting NETWORK_SESSION_EXPIRED (bug #9175) Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- source3/winbindd/winbindd_cm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 0639be1fb54..c403b32b20c 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -979,6 +979,17 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain, session_setup_done: + /* + * This should be a short term hack until + * dynamic re-authentication is implemented. + * + * See Bug 9175 - winbindd doesn't recover from + * NT_STATUS_NETWORK_SESSION_EXPIRED + */ + if (smbXcli_conn_protocol((*cli)->conn) >= PROTOCOL_SMB2_02) { + smbXcli_session_set_disconnect_expired((*cli)->smb2.session); + } + /* cache the server name for later connections */ saf_store(domain->name, controller); -- 2.11.4.GIT