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>
This commit is contained in:

committed by
Steve French

parent
284316dd42
commit
ef65aaede2
@@ -2073,7 +2073,8 @@ match_security(struct TCP_Server_Info *server, struct smb_vol *vol)
|
||||
* that was specified, or "Unspecified" if that sectype was not
|
||||
* compatible with the given NEGOTIATE request.
|
||||
*/
|
||||
if (select_sectype(server, vol->sectype) == Unspecified)
|
||||
if (server->ops->select_sectype(server, vol->sectype)
|
||||
== Unspecified)
|
||||
return false;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user