From: Stefan Metzmacher Date: Mon, 22 Oct 2012 12:31:20 +0000 (+0200) Subject: s3:winbindd: disconnection after getting NETWORK_SESSION_EXPIRED (bug #9175) X-Git-Tag: ldb-1.1.14~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=45105afffc5678082b23165ff74610d67e57a82a;p=thirdparty%2Fsamba.git s3:winbindd: disconnection after getting NETWORK_SESSION_EXPIRED (bug #9175) Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- 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);