summaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorPavel Shilovsky2016-11-18 00:24:46 +0100
committerSteve French2017-02-01 23:46:36 +0100
commit4326ed2f6a16ae9d33e4209b540dc9a371aba840 (patch)
treea4690a2891b1404a967c0c9302ea9008fc90933e /fs/cifs/connect.c
parentCIFS: Add copy into pages callback for a read operation (diff)
downloadkernel-qcow2-linux-4326ed2f6a16ae9d33e4209b540dc9a371aba840.tar.gz
kernel-qcow2-linux-4326ed2f6a16ae9d33e4209b540dc9a371aba840.tar.xz
kernel-qcow2-linux-4326ed2f6a16ae9d33e4209b540dc9a371aba840.zip
CIFS: Decrypt and process small encrypted packets
Allow to decrypt transformed packets, find a corresponding mid and process as usual further. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 35faa6cb7f82..325e3cb17c4c 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -787,6 +787,15 @@ standard_receive3(struct TCP_Server_Info *server, struct mid_q_entry *mid)
dump_smb(buf, server->total_read);
+ return cifs_handle_standard(server, mid);
+}
+
+int
+cifs_handle_standard(struct TCP_Server_Info *server, struct mid_q_entry *mid)
+{
+ char *buf = server->large_buf ? server->bigbuf : server->smallbuf;
+ int length;
+
/*
* We know that we received enough to get to the MID as we
* checked the pdu_length earlier. Now check to see