File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1825,9 +1825,8 @@ static int match_session(struct cifs_ses *ses,
18251825 struct smb3_fs_context * ctx ,
18261826 bool match_super )
18271827{
1828- if (ctx -> sectype != Unspecified &&
1829- ctx -> sectype != ses -> sectype )
1830- return 0 ;
1828+ struct TCP_Server_Info * server = ses -> server ;
1829+ enum securityEnum ctx_sec , ses_sec ;
18311830
18321831 if (!match_super && ctx -> dfs_root_ses != ses -> dfs_root_ses )
18331832 return 0 ;
@@ -1839,11 +1838,20 @@ static int match_session(struct cifs_ses *ses,
18391838 if (ses -> chan_max < ctx -> max_channels )
18401839 return 0 ;
18411840
1842- switch (ses -> sectype ) {
1841+ ctx_sec = server -> ops -> select_sectype (server , ctx -> sectype );
1842+ ses_sec = server -> ops -> select_sectype (server , ses -> sectype );
1843+
1844+ if (ctx_sec != ses_sec )
1845+ return 0 ;
1846+
1847+ switch (ctx_sec ) {
1848+ case IAKerb :
18431849 case Kerberos :
18441850 if (!uid_eq (ctx -> cred_uid , ses -> cred_uid ))
18451851 return 0 ;
18461852 break ;
1853+ case NTLMv2 :
1854+ case RawNTLMSSP :
18471855 default :
18481856 /* NULL username means anonymous session */
18491857 if (ses -> user_name == NULL ) {
You can’t perform that action at this time.
0 commit comments