SMB 3.1.1 converted the reserved field to a flags field.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Feb 26 21:11:59 UTC 2020 on sn-devel-184
static struct tevent_req *smbd_smb2_tree_connect_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbd_smb2_request *smb2req,
static struct tevent_req *smbd_smb2_tree_connect_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbd_smb2_request *smb2req,
const char *in_path);
static NTSTATUS smbd_smb2_tree_connect_recv(struct tevent_req *req,
uint8_t *out_share_type,
const char *in_path);
static NTSTATUS smbd_smb2_tree_connect_recv(struct tevent_req *req,
uint8_t *out_share_type,
NTSTATUS smbd_smb2_request_process_tcon(struct smbd_smb2_request *req)
{
NTSTATUS smbd_smb2_request_process_tcon(struct smbd_smb2_request *req)
{
+ struct smbXsrv_connection *xconn = req->xconn;
uint16_t in_path_offset;
uint16_t in_path_length;
DATA_BLOB in_path_buffer;
uint16_t in_path_offset;
uint16_t in_path_length;
DATA_BLOB in_path_buffer;
}
inbody = SMBD_SMB2_IN_BODY_PTR(req);
}
inbody = SMBD_SMB2_IN_BODY_PTR(req);
+ if (xconn->protocol >= PROTOCOL_SMB3_11) {
+ in_flags = SVAL(inbody, 0x02);
+ } else {
+ in_flags = 0;
+ }
in_path_offset = SVAL(inbody, 0x04);
in_path_length = SVAL(inbody, 0x06);
in_path_offset = SVAL(inbody, 0x04);
in_path_length = SVAL(inbody, 0x06);
subreq = smbd_smb2_tree_connect_send(req,
req->sconn->ev_ctx,
req,
subreq = smbd_smb2_tree_connect_send(req,
req->sconn->ev_ctx,
req,
in_path_string);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
in_path_string);
if (subreq == NULL) {
return smbd_smb2_request_error(req, NT_STATUS_NO_MEMORY);
static struct tevent_req *smbd_smb2_tree_connect_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbd_smb2_request *smb2req,
static struct tevent_req *smbd_smb2_tree_connect_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct smbd_smb2_request *smb2req,
const char *in_path)
{
struct tevent_req *req;
const char *in_path)
{
struct tevent_req *req;