diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/client.h | 1 | ||||
-rw-r--r-- | source3/libsmb/smb2cli_tcon.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/include/client.h b/source3/include/client.h index 9617c2a376..00a7e1b40c 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -111,6 +111,7 @@ struct cli_state { uint32_t pid; uint32_t tid; struct smbXcli_session *session; + struct smbXcli_tcon *tcon; /* SMB2 tcon */ uint8_t share_type; diff --git a/source3/libsmb/smb2cli_tcon.c b/source3/libsmb/smb2cli_tcon.c index b56a40282a..615dcfa2d9 100644 --- a/source3/libsmb/smb2cli_tcon.c +++ b/source3/libsmb/smb2cli_tcon.c @@ -130,6 +130,19 @@ static void smb2cli_tcon_done(struct tevent_req *subreq) cli->smb2.maximal_access = IVAL(body, 12); TALLOC_FREE(subreq); + + cli->smb2.tcon = smbXcli_tcon_create(cli); + if (tevent_req_nomem(cli->smb2.tcon, req)) { + return; + } + + smb2cli_tcon_set_values(cli->smb2.tcon, + cli->smb2.tid, + cli->smb2.share_type, + cli->smb2.share_flags, + cli->smb2.share_capabilities, + cli->smb2.maximal_access); + tevent_req_done(req); } @@ -229,6 +242,7 @@ static void smb2cli_tdis_done(struct tevent_req *subreq) return; } state->cli->smb2.tid = 0; + TALLOC_FREE(state->cli->smb2.tcon); tevent_req_done(req); } |