s3:smbd: add a comment stating that file_close_user() is redundant for SMB2
authorRalph Boehme <slow@samba.org>
Thu, 30 Aug 2018 13:57:33 +0000 (15:57 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 31 Aug 2018 23:26:35 +0000 (01:26 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13549

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Sep  1 01:26:35 CEST 2018 on sn-devel-144

source3/smbd/smbXsrv_session.c

index 1193b4a3bea2dd800d18db2034187b2a0ef1761a..19f4bc05600b507f88597b8084c5b4a32f838297 100644 (file)
@@ -1664,6 +1664,12 @@ NTSTATUS smbXsrv_session_logoff(struct smbXsrv_session *session)
        session->status = NT_STATUS_USER_SESSION_DELETED;
 
        if (session->compat) {
        session->status = NT_STATUS_USER_SESSION_DELETED;
 
        if (session->compat) {
+               /*
+                * For SMB2 this is a bit redundant as files are also close
+                * below via smb2srv_tcon_disconnect_all() -> ... ->
+                * smbXsrv_tcon_disconnect() -> close_cnum() ->
+                * file_close_conn().
+                */
                file_close_user(sconn, session->compat->vuid);
        }
 
                file_close_user(sconn, session->compat->vuid);
        }