summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/smb2_glue.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/smb2_glue.c b/source3/smbd/smb2_glue.c
index 1b2b4dd693..9fc1e49c2e 100644
--- a/source3/smbd/smb2_glue.c
+++ b/source3/smbd/smb2_glue.c
@@ -28,9 +28,13 @@ struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req)
struct smb_request *smbreq;
const uint8_t *inhdr = SMBD_SMB2_IN_HDR_PTR(req);
- smbreq = talloc_zero(req, struct smb_request);
- if (smbreq == NULL) {
- return NULL;
+ if (req->smb1req) {
+ smbreq = req->smb1req;
+ } else {
+ smbreq = talloc_zero(req, struct smb_request);
+ if (smbreq == NULL) {
+ return NULL;
+ }
}
smbreq->request_time = req->request_time;