As winbindd uses SMB2/3 if available, we might get NT_STATUS_NETWORK_SESSION_EXPIRED from the server, which means we have to do a reauthentication. A simple fix could be to disconnect the connection and reconnect.
Created attachment 8097 [details] Untested patches for master
Created attachment 8135 [details] Patches for v4-0-test
Comment on attachment 8135 [details] Patches for v4-0-test ACK
==> Karolin for v4-0-test
Pushed to autobuild-v4-0-test.
Pushed to v4-0-test. Closing out bug report. Thanks!
The patch in attachment #8135 [details] never worked for SMB2, as the previous signing check smb2_signing_check_pdu() a few lines above overwrites the status variable with NT_STATUS_OK.
Created attachment 14660 [details] Patch for 4.8 and 4.9 cherry-picked from master
(In reply to Ralph Böhme from comment #8) Pushed to autobuild-v4-{8,9}-test.
(In reply to Karolin Seeger from comment #9) Pushed to both branches. Closing out bug report. Thanks!