cifs: fix parsing of symbolic link error response
authorRonnie Sahlberg <lsahlber@redhat.com>
Tue, 9 Jul 2019 08:41:11 +0000 (18:41 +1000)
committerSteve French <stfrench@microsoft.com>
Wed, 10 Jul 2019 21:15:45 +0000 (16:15 -0500)
commitdf070afd9b8c952eacf49db54cae7138eb9deaeb
tree537e6118629e984ee62764f450abe0bf66738f3b
parentf5f111c231f56e56e186c9a61a9d22fb8bf05faa
cifs: fix parsing of symbolic link error response

RHBZ: 1672539

In smb2_query_symlink(), if we are parsing the error buffer but it is not something
we recognize as a symlink we should return -EINVAL and not -ENOENT.
I.e. the entry does exist, it is just not something we recognize.

Additionally, add check to verify that that the errortag and the reparsetag all make sense.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Acked-by: Paulo Alcantara <palcantara@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.h