const char *fname = "compound_invalid1.dat";
struct smb2_close cl;
bool ret = true;
- struct smb2_request *req[2];
+ struct smb2_request *req[3];
- smb2_transport_credits_ask_num(tree->session->transport, 2);
+ smb2_transport_credits_ask_num(tree->session->transport, 3);
smb2_util_unlink(tree, fname);
0x00200000;
cr.in.fname = fname;
- smb2_transport_compound_start(tree->session->transport, 2);
+ smb2_transport_compound_start(tree->session->transport, 3);
/* passing the first request with the related flag is invalid */
smb2_transport_compound_set_related(tree->session->transport, true);
cl.in.file.handle = hd;
req[1] = smb2_close_send(tree, &cl);
+ smb2_transport_compound_set_related(tree->session->transport, false);
+ req[2] = smb2_close_send(tree, &cl);
+
status = smb2_create_recv(req[0], tree, &cr);
/* TODO: check why this fails with --signing=required */
CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
status = smb2_close_recv(req[1], &cl);
CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
+ status = smb2_close_recv(req[2], &cl);
+ CHECK_STATUS(status, NT_STATUS_FILE_CLOSED);
smb2_util_unlink(tree, fname);
done: