cifs: To match file servers, make sure the server hostname matches
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 14 Oct 2021 11:52:39 +0000 (11:52 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:06 +0000 (19:16 +0100)
commit1c35a216ef77db708178ca225d796271f2f60a7a
tree051f345d346ea6639051248a5742263ae9124a58
parent120d9dca7d512ed3d36327fa95ba41747563595b
cifs: To match file servers, make sure the server hostname matches

commit 7be3248f313930ff3d3436d4e9ddbe9fccc1f541 upstream.

We generally rely on a bunch of factors to differentiate between servers.
For example, IP address, port etc.

For certain server types (like Azure), it is important to make sure
that the server hostname matches too, even if the both hostnames currently
resolve to the same IP address.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/connect.c
fs/cifs/fs_context.c
fs/cifs/fs_context.h