]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
smb2: Enforce sec= mount option
authorSachin Prabhu <sprabhu@redhat.com>
Wed, 18 Jan 2017 10:05:57 +0000 (15:35 +0530)
committerSteve French <smfrench@gmail.com>
Fri, 3 Mar 2017 05:13:37 +0000 (23:13 -0600)
commitef65aaede23f75977af56a8c330bb9be8c6e125c
tree6c7c8bc54081d74d2e4e579639af6f4f528eaf50
parent284316dd42a2027afe37df34c5199eb4eabed8fd
smb2: Enforce sec= mount option

If the security type specified using a mount option is not supported,
the SMB2 session setup code changes the security type to RawNTLMSSP. We
should instead fail the mount and return an error.

The patch changes the code for SMB2 to make it similar to the code used
for SMB1. Like in SMB1, we now use the global security flags to select
the security method to be used when no security method is specified and
to return an error when the requested auth method is not available.

For SMB2, we also use ntlmv2 as a synonym for nltmssp.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Acked-by: Pavel Shilovsky <pshilov@microsoft.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifsglob.h
fs/cifs/cifsproto.h
fs/cifs/connect.c
fs/cifs/sess.c
fs/cifs/smb1ops.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.c
fs/cifs/smb2proto.h