diff options
author | Jeremy Allison <jra@samba.org> | 2013-03-19 12:16:32 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-04-19 14:10:47 -0700 |
commit | ec9fc986da8279f15338b7682c629bfdfc36d016 (patch) | |
tree | a2851b70fe4d6dccfd99d1e417c6361ed403e961 | |
parent | 9791c1a24822d8b46bf7dd231b615d281b58540b (diff) | |
download | samba-ec9fc986da8279f15338b7682c629bfdfc36d016.tar.gz samba-ec9fc986da8279f15338b7682c629bfdfc36d016.tar.bz2 samba-ec9fc986da8279f15338b7682c629bfdfc36d016.zip |
If we already have an smb1req attached to the struct smbd_smb2_request, don't recreate it.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
-rw-r--r-- | source3/smbd/smb2_glue.c | 10 |
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; |