summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-06-04 10:30:27 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-25 20:55:06 +0200
commit1fffd35692c58349267079f770ced1eb33201553 (patch)
treee47cf075698af5dd19cc2aa0f563abbb9b158c22 /source3
parentc36bd677f325f052869418d3e74811e86567d206 (diff)
downloadsamba-1fffd35692c58349267079f770ced1eb33201553.tar.gz
samba-1fffd35692c58349267079f770ced1eb33201553.tar.bz2
samba-1fffd35692c58349267079f770ced1eb33201553.zip
s3:smbXsrv_session: init and disconnect smbXsrv_tcon for SMB2/3
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/smbXsrv_session.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/smbd/smbXsrv_session.c b/source3/smbd/smbXsrv_session.c
index 112a739950..d8514d87ad 100644
--- a/source3/smbd/smbXsrv_session.c
+++ b/source3/smbd/smbXsrv_session.c
@@ -749,6 +749,12 @@ NTSTATUS smbXsrv_session_create(struct smbXsrv_connection *conn,
global->session_wire_id = id;
+ status = smb2srv_tcon_table_init(session);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(session);
+ return status;
+ }
+
session->local_id = global->session_global_id;
key = smbXsrv_session_local_id_to_key(session->local_id, key_buf);
@@ -1005,6 +1011,20 @@ NTSTATUS smbXsrv_session_logoff(struct smbXsrv_session *session)
if (session->compat) {
file_close_user(conn->sconn, session->compat->vuid);
+ }
+
+ if (conn->protocol >= PROTOCOL_SMB2_02) {
+ status = smb2srv_tcon_disconnect_all(session);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("smbXsrv_session_logoff(0x%08x): "
+ "smb2srv_tcon_disconnect_all() failed: %s\n",
+ session->global->session_global_id,
+ nt_errstr(status)));
+ error = status;
+ }
+ }
+
+ if (session->compat) {
invalidate_vuid(conn->sconn, session->compat->vuid);
session->compat = NULL;
}